inetum-orleans / nfs4j-daemon

Pure Java NFS v3/v4.1 server backed by dCache nfs4j
Apache License 2.0
35 stars 10 forks source link

[Crash/Exception] Failed to bind address already in use #11

Open Aareon opened 8 months ago

Aareon commented 8 months ago

Command used

> .\nfs4j-daemon.exe -c .\nfs4j.yml

Java Exception

2024-03-03 22:43:01.098 [] [main] INFO  w.g.n.Daemon - Share has been attached: ShareConfig{path=D:\Videos, alias='/', permissions=null, globPermissions=null}
2024-03-03 22:43:01.179 [] [main] INFO  o.d.o.p.OncRpcEmbeddedPortmap - Starting embedded portmap service
2024-03-03 22:43:01.182 [] [main] ERROR o.d.o.p.OncRpcEmbeddedPortmap - Failed to start embedded portmap service: Address already in use: bind
2024-03-03 22:43:01.183 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100005:3] : org.dcache.nfs.v3.MountServer@82de64a
2024-03-03 22:43:01.183 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100003:3] : org.dcache.nfs.v3.NfsServerV3@659499f1
2024-03-03 22:43:01.183 [] [main] INFO  o.d.o.r.OncRpcSvc - Registering new program [100003:4] : org.dcache.nfs.v4.NFSServerV41@51e69659
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (world.gfi.nfs4j.Main@428640fa): java.net.BindException: Cannot assign requested address: bind
        at picocli.CommandLine.execute(CommandLine.java:1068)
        at picocli.CommandLine.access$900(CommandLine.java:142)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:1255)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:1223)
        at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1131)
        at picocli.CommandLine.parseWithHandlers(CommandLine.java:1414)
        at picocli.CommandLine.call(CommandLine.java:1690)
        at picocli.CommandLine.call(CommandLine.java:1614)
        at world.gfi.nfs4j.Main.main(Main.java:78)
Caused by: java.net.BindException: Cannot assign requested address: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.DatagramChannelImpl.bind(Unknown Source)
        at sun.nio.ch.DatagramSocketAdaptor.bind(Unknown Source)
        at org.glassfish.grizzly.nio.transport.UDPNIOConnectorHandler.connectAsync(UDPNIOConnectorHandler.java:131)
        at org.glassfish.grizzly.AbstractSocketConnectorHandler.connect(AbstractSocketConnectorHandler.java:91)
        at org.glassfish.grizzly.AbstractSocketConnectorHandler.connect(AbstractSocketConnectorHandler.java:79)
        at org.glassfish.grizzly.nio.transport.UDPNIOTransport.connect(UDPNIOTransport.java:311)
        at org.glassfish.grizzly.nio.transport.UDPNIOTransport.connect(UDPNIOTransport.java:74)
        at org.dcache.oncrpc4j.rpc.OncRpcSvc.connect(OncRpcSvc.java:388)
        at org.dcache.oncrpc4j.rpc.OncRpcClient.connect(OncRpcClient.java:73)
        at org.dcache.oncrpc4j.rpc.OncRpcClient.connect(OncRpcClient.java:66)
        at org.dcache.oncrpc4j.rpc.OncRpcSvc.clearPortmap(OncRpcSvc.java:267)
        at org.dcache.oncrpc4j.rpc.OncRpcSvc.start(OncRpcSvc.java:292)
        at world.gfi.nfs4j.Daemon.start(Daemon.java:184)
        at world.gfi.nfs4j.Main.call(Main.java:184)
        at world.gfi.nfs4j.Main.call(Main.java:24)
        at picocli.CommandLine.execute(CommandLine.java:1061)
        ... 8 more

Config nfs4j.yml

port: 2048
udp: false
permissions:
  gid: 1000
  uid: 1000
  mask: 0644
shares:
  - 'D:\Videos'

netstat -aon | findstr 2048 Returns nothing