EMCECS / nfs-client-java

Native Java NFS client
Apache License 2.0
70 stars 33 forks source link

mount failure, server: 10.13.148.82, export: /var/nfs, nfs version: 3, returned state: 13 #31

Open javapenguin opened 4 years ago

javapenguin commented 4 years ago

When I try to connect using EMC NFS Java Client to the same server using the same export I mounted on my desktop with the following code

Nfs3 nfs3 = new Nfs3(hostname, export, new CredentialUnix(), 3);

I get the following error:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
mount failure, server: 10.13.148.82, export: /var/nfs, nfs version: 3, returned state: 13
com.emc.ecs.nfsclient.mount.MountException: mount failure, server: 10.13.148.82, export: /var/nfs, nfs version: 3, returned state: 13
    at com.emc.ecs.nfsclient.nfs.nfs3.Nfs3.lookupRootHandle(Nfs3.java:342)
    at com.emc.ecs.nfsclient.nfs.nfs3.Nfs3.prepareRootFhAndNfsPort(Nfs3.java:311)
    at com.emc.ecs.nfsclient.nfs.nfs3.Nfs3.<init>(Nfs3.java:258)
    at com.emc.ecs.nfsclient.nfs.nfs3.Nfs3.<init>(Nfs3.java:201)
    at com.emc.ecs.nfsclient.nfs.nfs3.Nfs3.<init>(Nfs3.java:228)
    at com.emc.ecs.nfsclient.nfs.io.FileReadingTest.testReading(FileReadingTest.java:104)
    at com.emc.ecs.nfsclient.nfs.io.FileReadingTest.main(FileReadingTest.java:53)

The error message is not very helpfull and I don't know where to even begin looking for the problem.

oskarTeodor commented 4 years ago

I think state 13 === permission denied.

wuxincn commented 3 years ago

I got the similar problem in Centos. It is fixed by add "insecure" to info of related exported directory in file /etc/exports. More details can be found in https://stackoverflow.com/questions/58186427/emc-nfs-java-client-mountexception.