Cryptomator fails to start on Ubuntu 18.04 LTS

I have been using Cryptomator successfully for some time. Then I upgraded my Ubuntu to 18.04 LTS (what may or may not be an important factor here). Then I discovered Cryptomator is not able to launch.

I am getting an interesting stacktrace on the console. Any hint what goes wrong would be welcome.

The console output looks like this:

/usr/bin> ./cryptomator.sh
00:23:18.703 [main] INFO org.cryptomator.launcher.Cryptomator - Starting Cryptomator 1.3.2 on Linux 4.15.0-30-generic (amd64)
00:23:18.758 [main] WARN org.cryptomator.launcher.InterProcessCommunicator - System property cryptomator.ipcPortPath not set.
00:23:18.763 [main] DEBUG org.cryptomator.launcher.InterProcessCommunicator - Could not connect to running process.
00:23:18.808 [main] ERROR org.cryptomator.launcher.Cryptomator - Failed to initiate inter-process communication.
java.nio.file.AccessDeniedException: .ipcPort.tmp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at org.cryptomator.launcher.InterProcessCommunicator$ServerCommunicator.writePort(InterProcessCommunicator.java:172)
at org.cryptomator.launcher.InterProcessCommunicator$ServerCommunicator.(InterProcessCommunicator.java:164)
at org.cryptomator.launcher.InterProcessCommunicator$ServerCommunicator.(InterProcessCommunicator.java:148)
at org.cryptomator.launcher.InterProcessCommunicator.start(InterProcessCommunicator.java:74)
at org.cryptomator.launcher.InterProcessCommunicator.start(InterProcessCommunicator.java:56)
at org.cryptomator.launcher.Cryptomator.main(Cryptomator.java:29)

I found the workaround ! Describing it here so anyone having the same issue can save time for investigation.

You have to edit the file: /usr/bin/cryptomator.sh. This file contains java command line to launch Cryptomator. I added the following command-line option:

-Dcryptomator.ipcPortPath=~/.cryptomator/ipcport.tmp

During my investigation I also tried to use several java environments - and I also found troubles in this area. I could successfully launch Cryptomator with:

  • JRE bundled with OpenJDK 8 (ver 1.8.0_171)
  • Oracle JDK ver 9.0.1 (build 9.0.1+11)

Interestingly I failed with two other environments:

  • Oracle JDK ver 1.8.0_144 (got: java.lang.IllegalStateException: Required key length not supported)
  • OpenJDK 11 (missing JavaFX)

Finally I decided to keep Cryptomator running on OpenJDK 8 and my cryptomator.sh looks now like this:

#!/bin/sh
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
-Xmx512m \
-Dcryptomator.logPath=~/.Cryptomator/cryptomator.log \
-Dcryptomator.ipcPortPath=~/.cryptomator/ipcport.tmp \
-Dcryptomator.upgradeLogPath=~/.Cryptomator/upgrade.log \
-Dcryptomator.settingsPath=~/.Cryptomator/settings.json \
-jar /usr/share/java/cryptomator/Cryptomator-1.3.2.jar

On a clean system I installed Cryptomator using the PPA:

apt -y update && apt -y upgrade -V && apt -y dist-upgrade && apt -y autoremove
add-apt-repository ppa:sebastian-stenzel/cryptomator
apt-get update
apt-get -y install cryptomator
cryptomator

You wrote you found a workarond. I would try to use that also, but there is no file
/usr/bin/cryptomator.sh

Can you help me to find the file? I am using Ubuntu Server 18.04 LTS.