JrCs / docker-crashplan

CrashPlan docker container
88 stars 24 forks source link

Authorisation manifest creation error #30

Open Codecross opened 7 years ago

Codecross commented 7 years ago

When 'authorizing' the Crashplan client, Crashplan creates an 'adb' folder in the conf directory. When this is a shared volume on Windows, an IO error occurs trying to write the Manifest file.

A similar issue can be found here: https://github.com/Level/levelup/issues/222

A possible way around this is for the adb directory to be kept in the container volume (e.g. via a symbolic link in the conf directory).

JrCs commented 7 years ago

The conf directory is in the host and it is mount bind into the container. If you declare the volume RW, crashplan can write into the conf directory. Check the latest version.

Codecross commented 7 years ago

Thanks. The conf directory is on the host and declared as RW, so no troubles there.

The problem is that the authorisation service cannot write to the manifest file somehow (IOException) in the conf/adb directory if it is on a Windows host.

A workaround is to create a symbolic link back to the container for the conf/adb directory. Thus, the conf directory contents are on the host, but the adb directory is stored in the container. When done this way, the authorisation exception does not occur. I have included the section from the engine_error.log below:

Nov 28, 2016 9:44:22 AM com.google.common.util.concurrent.ServiceManager$ServiceListener failed SEVERE: Service AuthorizedStorageService [FAILED] has failed in the STARTING state. java.io.IOException: IO error: /var/crashplan/app/conf/adb: Invalid argument at com.code42.jna.leveldb.api.Util.checkError(Util.java:22) at com.code42.jna.leveldb.api.DBFactory.open(DBFactory.java:29) at com.code42.archive.AbstractLevelDBFile.open(AbstractLevelDBFile.java:72) at com.code42.service.storage.AuthorizedStorageService.open(AuthorizedStorageService.java:126) at com.code42.service.storage.AuthorizedStorageService.startUp(AuthorizedStorageService.java:82) at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54) at com.google.common.util.concurrent.Callables$3.run(Callables.java:95) at java.lang.Thread.run(Thread.java:745)

Exception in thread "AuthorizedStorageService STARTING" java.lang.RuntimeException: java.io.IOException: IO error: /var/crashplan/app/conf/adb: Invalid argument at com.google.common.base.Throwables.propagate(Throwables.java:160) at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:58) at com.google.common.util.concurrent.Callables$3.run(Callables.java:95) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: IO error: /var/crashplan/app/conf/adb: Invalid argument at com.code42.jna.leveldb.api.Util.checkError(Util.java:22) at com.code42.jna.leveldb.api.DBFactory.open(DBFactory.java:29) at com.code42.archive.AbstractLevelDBFile.open(AbstractLevelDBFile.java:72) at com.code42.service.storage.AuthorizedStorageService.open(AuthorizedStorageService.java:126) at com.code42.service.storage.AuthorizedStorageService.startUp(AuthorizedStorageService.java:82) at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54) ... 2 more