cancel
Showing results for 
Search instead for 
Did you mean: 

nfs zero byte file problem

flados
Champ in-the-making
Champ in-the-making
:? Hi,

I've installed Alfresco Enterprise 3.1 Release on a rhel4 and configured the alfresco nfs server.

The section in the file-servers.xml is this:
<config evaluator="string-compare" condition="NFS Server">
      <serverEnable enabled="${nfs.enabled}"/>
      <PortMapperPort>111</PortMapperPort>
      <MountServerPort>1678</MountServerPort>
      <NFSServerPort>12049</NFSServerPort>
      <!– Map NFS user/group ids to Alfresco users –>     
      <rpcAuthenticator>
         <userMappings>
            <user name="admin" uid="0" gid="0"/>
         </userMappings>
      </rpcAuthenticator>
</config>

I've created a folder in /home/alfresco and mount the nfs path with this command: mount -t nfs <myalfrescoservername>:/alfresco /home/alfresco
After this i can browse correctly the folder of alfresco under /home/alfresco, but if I try to copy some files, or create new file, this are created with zero byte.

There's someone that can help me ?
Thank you very much for your support.
bye, Flavio
6 REPLIES 6

bmarbury
Champ in-the-making
Champ in-the-making
Having the exact same issue.  If you figure it out let me know and I'll do the same.

bmarbury
Champ in-the-making
Champ in-the-making
flados:

Can you enable debug logging as specified on the wiki?

I enabled debugging and am getting the following exception:

Exception in thread "NFSFileExpiry_167772493" net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
.
.
.

Anyone know what is causing this?

flados
Champ in-the-making
Champ in-the-making
Hi,

I've enabled the debug with this options : <debug flags="RxData,Search,Info,File,FileIO,Error,Directory,Timing,Session"/>.

After I've unmount and re-mount : mount -t nfs <myalfrescoservername>:/alfresco /home/alfresco

If I try to copy a file (alfresco.log for example) with this command : cp /opt/Alfresco/Alfresco.lg /home/alfresco/Provvigioni/Alfresco.log apparently the file is copied, but with 0 byte lenght.

The trace of the log in alfresco.log is this (note the write response underlained):
15:50:15,267 DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,268 DEBUG [org.alfresco.nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,268 DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr request from T192.168.0.49:665, handle=[File:share=0x65d1d071,dir=0x5aa381f0,file=0x4c6e293]
15:50:15,276 DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr path=\Provvigioni\alfresco.log, info=alfresco.log   —- 0          - Wed Jun 03 15:50:15 CEST 2009
15:50:15,276 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,277 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,277 DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,277 DEBUG [org.alfresco.nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,277 DEBUG [org.alfresco.fileserver] [NFS_AU_2] Write request from T192.168.0.49:665 , count=22220, offset=0
15:50:15,305 DEBUG [org.alfresco.fileserver] [NFS_AU_2] Write fid=80142995, name=\Provvigioni\alfresco.log, wrlen=22220
15:50:15,305 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,306 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,306 DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,306 DEBUG [org.alfresco.nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,306 DEBUG [org.alfresco.fileserver] [NFS_AU_2] Commit request from T192.168.0.49:665
15:50:15,307 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,307 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,308 DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,308 DEBUG [org.alfresco.nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,308 DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr request from T192.168.0.49:665, handle=[File:share=0x65d1d071,dir=0x5aa381f0,file=0x4c6e293]
15:50:15,315 DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr path=\Provvigioni\alfresco.log, info=alfresco.log   —- 0          - Wed Jun 03 15:50:15 CEST 2009

The trace of the log in catalina.out is this (note the write response underlained):
15:50:15,267  DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,268  DEBUG [nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,268  DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr request from T192.168.0.49:665, handle=[File:share=0x65d1d071,dir=0x5aa381f0,file=0x4c6e293]
15:50:15,276  DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr path=\Provvigioni\alfresco.log, info=alfresco.log   —- 0          - Wed Jun 03 15:50:15 CEST 2009
15:50:15,276  DEBUG [nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,277  DEBUG [nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,277  DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,277  DEBUG [nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,277  DEBUG [org.alfresco.fileserver] [NFS_AU_2] Write request from T192.168.0.49:665 , count=22220, offset=0
15:50:15,305  DEBUG [org.alfresco.fileserver] [NFS_AU_2] Write fid=80142995, name=\Provvigioni\alfresco.log, wrlen=22220
15:50:15,305  DEBUG [nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,306  DEBUG [nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,306  DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,306  DEBUG [nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,306  DEBUG [org.alfresco.fileserver] [NFS_AU_2] Commit request from T192.168.0.49:665
15:50:15,307  DEBUG [nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0
15:50:15,307  DEBUG [nfs.protocol.auth] RpcAuth: RPC from T192.168.0.49:665, authType=Unix, sessKey=-4564398011886600192
15:50:15,308  DEBUG [org.alfresco.fileserver] [NFS] Found session org.alfresco.jlan.oncrpc.nfs.NFSSrvSession@12761be
15:50:15,308  DEBUG [nfs.protocol.auth] Set user using auth token, token=net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@855d52: Username: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Password: [PROTECTED]; Authenticated: true; Details: net.sf.acegisecurity.providers.dao.User@1b1dfe5: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_AUTHENTICATED; Granted Authorities: ROLE_AUTHENTICATED
15:50:15,308  DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr request from T192.168.0.49:665, handle=[File:share=0x65d1d071,dir=0x5aa381f0,file=0x4c6e293]
15:50:15,315  DEBUG [org.alfresco.fileserver] [NFS_AU_2] GetAttr path=\Provvigioni\alfresco.log, info=alfresco.log   —- 0          - Wed Jun 03 15:50:15 CEST 2009
Exception in thread "NFSFileExpiry_-1062731727" net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy7.setProperty(Unknown Source)
   at org.alfresco.filesys.repo.ContentNetworkFile.closeFile(ContentNetworkFile.java:404)
   at org.alfresco.jlan.oncrpc.nfs.NetworkFileCache$FileEntry.closeFile(NetworkFileCache.java:181)
   at org.alfresco.jlan.oncrpc.nfs.NetworkFileCache$FileExpiry.run(NetworkFileCache.java:300)
   at java.lang.Thread.run(Thread.java:619)

I have the same exception but it seems generated after the write operations.
Anyway thanks for your supporto.
Flavio

elmahfeo
Champ in-the-making
Champ in-the-making
Any update on this problem?

Has anybody the Alfresco NFS Server running correctly?

bmarbury
Champ in-the-making
Champ in-the-making
Nope, no replies yet.

Didn't have time to dive into the code so ended up using a CIFS mount (on RHEL5).

Example:
 
mount -t cifs //myserver/Alfresco /mnt/alfresco -o username=admin

burdat
Champ in-the-making
Champ in-the-making
Hi,

I have this zero byte file problem after enable and configure Alfresco NFS server.
I am using Alfresco Community 3.3 version running on ubuntu 8.10 and mounting
nfs share with this command as root:
mount -t nfs 127.0.0.1:/alfresco /mnt/alfresco/

Often the first few copied file is ok. But after a file's size is become 0
all others copied after that will have zero size.

Does anyone had similar problem with nfs server and managed to solve it?

This is my NFS config section on file-servers.properties:
### NFS Server Configuration ###
nfs.enabled=true
# Mount/NFS server ports, 0 will allocate next available port
nfs.mountServerPort=2999
nfs.nfsServerPort=2998

# RPC registration port, 0 will allocate next available port
#  Some portmapper/rpcbind services require a privileged port to be used
nfs.rpcRegisterPort=0

# To disable NFS and mount server registering with a portmapper set nfs.portMapperPort to -1
nfs.portMapperPort=111
# Enable the builtin portmapper service
nfs.portMapperEnabled=true

# NFS session debug flags (also enable org.alfresco.fileserver=debug logging level)
# Comma delimeted list of levels :-
#    RXDATA, TXDATA, DUMPDATA, SEARCH, INFO, FILE, FILEIO, ERROR, TIMING, DIRECTORY, SESSION
nfs.sessionDebug=FILEIO, ERROR, SESSION

nfs.mountServerDebug=true

Thanks