cancel
Showing results for 
Search instead for 
Did you mean: 

NFS not working

gojko
Champ in-the-making
Champ in-the-making
I have tried setting up NFS server on Alfresco but I have seemingly hit the wall. I always get Input/Output error.

This is my file-servers.properties


### NFS Server Configuration ###
nfs.enabled=true
# NodeMonitor to update cache of NFS server on nodes renaming and deleting not through NFS protocol
nfs.nodeMonitor.enabled=${nfs.enabled}
# Mount/NFS server ports, 0 will allocate next available port
nfs.mountServerPort=2250
nfs.nfsServerPort=2249
nfs.user.mappings=admin,nfs
nfs.user.mappings.value.admin.uid=0
nfs.user.mappings.value.admin.gid=0
nfs.user.mappings.value.nfs.uid=502
nfs.user.mappings.value.nfs.gid=502

# 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=1111
# 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=RXDATA, TXDATA, DUMPDATA, SEARCH, INFO, FILE, FILEIO, ERROR, TIMING, DIRECTORY, SESSION

nfs.mountServerDebug=true


Calling like this I get the output:

[root@dms ~]# mount -t nfs -vvv -o port=2249,mountport=2250,proto=tcp 192.168.27.58:/alfresco /mnt/temp
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "192.168.27.58:/alfresco"
mount: node:  "/mnt/temp"
mount: types: "nfs"
mount: opts:  "port=2249,mountport=2250,proto=tcp"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "192.168.27.58:/alfresco"
mount: external mount: argv[2] = "/mnt/temp"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,port=2249,mountport=2250,proto=tcp"
mount.nfs: timeout set for Fri Nov 14 16:03:15 2014
mount.nfs: trying text-based options 'port=2249,mountport=2250,proto=tcp,vers=4,addr=192.168.27.58,clientaddr=192.168.27.58'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'port=2249,mountport=2250,proto=tcp,addr=192.168.27.58'
mount.nfs: mount(2): Input/output error
mount.nfs: mount system call failed


With the logs enabled, I get this in alfresco.log:

15:55:02,888 DEBUG [org.alfresco.fileserver] NFS Req=[T192.168.27.58:813-Call,XID=0xf7fb3b03,RpcVer=2,ProgId=100003,ProgVer=4,Proc=0,CredType=0,CredLen=0,VerfType0,VerfLen=0,ParamLen=4,Pool]
15:55:02,894 DEBUG [org.alfresco.nfs.protocol.auth] RpcAuth: Type=Unix uid=0, gid=0


cat /etc/passwd

I really have these users supplied above:
root:x:0:0:root:/root:/bin/bash
.
.
.
logXXX:x:502:502::/home/log8:/bin/bash

Seems like it stopped on authentication on RPC. Any ideas?

2 REPLIES 2

lukaszr
Champ in-the-making
Champ in-the-making
Try changing address from 192.168.27.58:/alfresco to 192.168.27.58:/Alfresco
"Alfresco" is a default name (filesystem.name=Alfresco)

On a side note I would put these configuration properties in alfresco-global.properties not in file-servers.properties. Also NFS is being deprecated and will be removed in future version - see 5.0 release notes.

If above doesn't work here is a config that works for us (verified with Alfresco 4.0.x and 5.0.x):
### File server related properties ###
#must match /etc/auto.alfresco //localhost/alfresco-<filesystem.name>
filesystem.name=Demo
filesystem.avm.enabled=true
filesystem.avm.name=AVM
filesystem.avm.stores=

### CIFS Windows Shares ###
cifs.enabled=false

### NFS Server Configuration ###
nfs.enabled=true
nfs.nodeMonitor.enabled=${nfs.enabled}
nfs.mountServerPort=2250
nfs.nfsServerPort=2249

# map root(uid:0,gid:0)->admin, alfresco(uid:904,gid:300)->service_user
nfs.user.mappings=admin,service_user
nfs.user.mappings.value.admin.uid=0
nfs.user.mappings.value.admin.gid=0
nfs.user.mappings.value.service_user.uid=704
nfs.user.mappings.value.service_user.gid=200
nfs.rpcRegisterPort=0
nfs.portMapperPort=111
nfs.portMapperEnabled=false
nfs.sessionDebug=INFO
nfs.mountServerDebug=true

/etc/auto.master
/mnt/alfresco /etc/auto.alfresco –timeout=300

/etc/auto.alfresco
demo /Company\ Home     -rw,intr,nolock,timeo=20,retry=3,tcp,vers=3,rsize=32768,wsize=32768,port=2249,mountport=2250  localhost:/Demo

jtsmith
Champ on-the-rise
Champ on-the-rise
An issue with the NFS server (JLAN-11) transposes the GID and UID of the NFS client user, meaning that Unix accounts that have a user-id that differs from the group-id will not gain authentication. The Alfresco-NFS server will deny them access. The user will only see ls: /mnt/alfresco: Input/output error. This issue lasted this long presumably because so many Linux distributions create a new group for each new user, unless told otherwise. Though the bug is declared closed, it has yet to filter down to SVN, and org.alfresco.filesys.server.auth.AlfrescoRpcAuthenticator.authenticateRpcClient(int, RpcPacket) still reads the GID before the UID.