cryptomator / webdav-nio-adapter

Jackrabbit-based servlets running on embedded Jetty to serve a directory specified by a java.nio.file.Path
GNU Affero General Public License v3.0
12 stars 8 forks source link

Error mounting with WindowsMounter: System error 67 has occurred. #46

Closed infeo closed 1 year ago

infeo commented 1 year ago

Running the mirror test on a fresh, rebooted Windows system, the following error is thrown:

[main] INFO org.cryptomator.frontend.webdav.WebDavServer - Binding server socket to localhost:8080
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@4cc0edeb{HTTP/1.1, (http/1.1)}{localhost:8080}
[main] INFO org.eclipse.jetty.server.Server - jetty-10.0.12; built: 2022-09-14T01:54:40.076Z; git: 408d0139887e27a57b54ed52e2d92a36731a7e88; jvm 19.0.1+10
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@380fb434{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.Server - Started Server@13eb8acf{STARTING}[10.0.12,sto=0] @3781ms
[main] INFO org.cryptomator.frontend.webdav.WebDavServer - WebDavServer started.
[main] INFO org.eclipse.jetty.server.session.DefaultSessionIdManager - Session workerName=node0
[main] INFO org.apache.jackrabbit.webdav.server.AbstractWebdavServlet - authenticate-header = Basic realm="Jackrabbit Webdav Server"
[main] INFO org.apache.jackrabbit.webdav.server.AbstractWebdavServlet - csrf-protection = null
[main] INFO org.apache.jackrabbit.webdav.server.AbstractWebdavServlet - createAbsoluteURI = true
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@501edcf1{/test,null,AVAILABLE}
[main] INFO org.cryptomator.frontend.webdav.servlet.WebDavServletController - WebDavServlet started: /test
[main] INFO org.cryptomator.frontend.webdav.servlet.WebDavServletController - Mounting http://localhost:8080/test using org.cryptomator.frontend.webdav.mount.WindowsMounter
Exception in thread "main" org.cryptomator.frontend.webdav.mount.Mounter$CommandFailedException: Command failed with exit code 2. Expected 0. Stderr: System error 67 has occurred.

The network name cannot be found.

    at org.cryptomator.frontend.webdav.mount.ProcessUtil.assertExitValue(ProcessUtil.java:28)
    at org.cryptomator.frontend.webdav.mount.WindowsMounter.mount(WindowsMounter.java:43)
    at org.cryptomator.frontend.webdav.servlet.WebDavServletController.mount(WebDavServletController.java:96)
    at org.cryptomator.frontend.webdav.MirroringTest.main(MirroringTest.java:40)

Process finished with exit code 130
infeo commented 1 year ago

It seems that https://github.com/cryptomator/webdav-nio-adapter/pull/43 causes this issue. Before, mounting works, afterwards, it fails.

infeo commented 1 year ago

Found the cause: Before the dagger removal a collection of all registered contextPath was shared between the DefaulServlet and the WebDavServletFactory, such that when a new servlet was added, the DefaultServelt did not responeded with an error.