# linux-crashplan: can't start (Caused by: java.io.IOException: No such device or address)



## tarp (Mar 2, 2015)

I have installed java/linux-sun-jre17 and other deps fine. sysutils/linux-crashplan also installs fine, and everything looks OK to my untrained eye (I'm new to FreeBSD).

I can start the service OK, but it dies straight a few seconds after with the following error:


```
[root@misspiggy /usr/ports/sysutils/linux-crashplan]# /usr/local/etc/rc.d/crashplan start && tail -F /var/log/crashplan/engine_error.log
Starting CrashPlan Engine ... Using standard startup
OK
java.security.ProviderException: init failed
  at sun.security.provider.NativePRNG$RandomIO.getMixRandom(Unknown Source)
  at sun.security.provider.NativePRNG$RandomIO.implNextBytes(Unknown Source)
  at sun.security.provider.NativePRNG$RandomIO.access$200(Unknown Source)
  at sun.security.provider.NativePRNG.engineNextBytes(Unknown Source)
  at java.security.SecureRandom.nextBytes(Unknown Source)
  at java.math.BigInteger.randomBits(Unknown Source)
  at java.math.BigInteger.<init>(Unknown Source)
  at java.math.BigInteger.largePrime(Unknown Source)
  at java.math.BigInteger.probablePrime(Unknown Source)
  at sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(Unknown Source)
  at java.security.KeyPairGenerator$Delegate.generateKeyPair(Unknown Source)
  at com.code42.crypto.RSAKeyUtility.generateKeyPair(RSAKeyUtility.java:50)
  at com.backup42.service.CPService.initPeerControllers(CPService.java:649)
  at com.backup42.service.CPService.start(CPService.java:451)
  at com.backup42.service.CPService.main(CPService.java:1865)
Caused by: java.io.IOException: No such device or address
  at java.io.FileInputStream.readBytes(Native Method)
  at java.io.FileInputStream.read(Unknown Source)
  at sun.security.provider.NativePRNG$RandomIO.readFully(Unknown Source)
  ... 15 more
```

There's another thread on this subject which points to an edit which needs to be made to run.conf, but it's not relevant to me as the line to add is already present. 

I'm out of ideas so any new ones considered!

Thanks in advance


----------



## junovitch@ (Mar 2, 2015)

Is the linprocfs(5) filesystem available as requested in the post install message?  See `pkg info -D linux-sun-jre17` or on SVN https://svnweb.freebsd.org/ports/head/java/linux-sun-jre17/pkg-message?view=markup.


----------



## tarp (Mar 3, 2015)

yup:


```
[wonton@misspiggy ~]$ mount
dozer/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
fdescfs on /dev/fd (fdescfs)
linprocfs on /compat/linux/proc (linprocfs, local)
```


----------



## tarp (Mar 6, 2015)

Should I maybe report this to the port maintainer?  Crashplan is crucial to my plans so a real pain if I can't get it to run.


----------



## junovitch@ (Mar 7, 2015)

I don't see any bugs for it at https://bugs.freebsd.org/bugzilla/.  Once you do please post the PR number, you can tag it like this [PR]123456[/PR] and it will link to Bugzilla.  I'm not a Crashplan user myself so the other other thing I can think of is to try to start it with truss(1) and see if any insight can be gained from what gets access as it dies.  You can see it with something simple like `truss ls`.  The only thing is the using it with the service(8) hides the output from what gets executed.  You'll have to call the Crashplan binary directly.   If you post the last few lines of output maybe we'll see something interesting there.


----------



## tarp (Mar 7, 2015)

I think I've got it working by linking the crashplan binaries to the java executable installed by the java/openjdk7 port rather than the java/linux-sun-jre17 one, which is a dependancy of sysutils/linux-crashplan.  I'll test it properly and report if it works fully.


----------



## tarp (Mar 8, 2015)

It didn't work .  The crashplan engine will run using java/openjdk7 but it's unusable, as it doesn't seem to be able to interact with the file system at all -- it's not possible to set backup directories using the GUI.  This is presumably why the linux version of the jre is required, though I won't pretend to understand the compatibility layer at all.

I've used truss as suggested, though I'm not sure it provides anything new:


```
read(3,"\^?ELF\^A\^A\^A\^C\0\0\0\0\0\0\0"...,512) = 512 (0x200)
linux_fstat64(0x3,0xffff8048,0x28067fc4,0x804a160,0x28242cf6,0x6) = 0 (0x0)
linux_mmap2(0x0,0x29080,0x5,0x802,0x3,0x6)       = 687116288 (0x28f49000)
linux_mmap2(0x28f71000,0x2000,0x3,0x812,0x3,0x6) = 687280128 (0x28f71000)
close(3)                                         = 0 (0x0)
linux_mprotect(0x28f71000,0x1000,0x1,0x804a5b8,0x5,0x6) = 0 (0x0)
linux_mprotect(0x2823d000,0x885000,0x3,0x2823d034,0xffff8440,0x6) = 0 (0x0)
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_mprotect(0x2823d000,0x885000,0x5,0xffff8440,0x5,0x6) = 0 (0x0)
munmap(0x2806a000,24329)                         = 0 (0x0)
linux_access("/etc/sysconfig/32bit_ssse3_memcpy_via_32bit_ssse3_memmove",0) ERR#2 'No such file or directory'
linux_mmap2(0x0,0x51000,0x3,0x20022,0xffffffff,0x6) = 687288320 (0x28f73000)
linux_mprotect(0x28f73000,0x1000,0x0,0x28fc3b70,0x28fc3bd0,0x6) = 0 (0x0)
linux_clone(0x3d0f00,0x28fc3494,0x28fc3bd8,0xffff8720,0x28fc3bd8,0x6) = 28146 (0x6df2)
[03.08.15 17:58:32.536 INFO    main                 root                                    ] Locale changed to English
[03.08.15 17:58:32.543 INFO    main                 root                                    ] *************************************************************
[03.08.15 17:58:32.544 INFO    main                 root                                    ] *************************************************************
[03.08.15 17:58:32.545 INFO    main                 root                                    ] STARTED CrashPlanService
[03.08.15 17:58:32.553 INFO    main                 root                                    ] CPVERSION = 3.7.0 - 1388728800370 (2014-01-03T06:00:00:370+0000)
[03.08.15 17:58:32.555 INFO    main                 root                                    ] LOCALE = English
[03.08.15 17:58:32.560 INFO    main                 root                                    ] ARGS = [  ]
[03.08.15 17:58:32.560 INFO    main                 root                                    ] *************************************************************
[03.08.15 17:58:33.203 INFO    main                 root                                    ] Adding shutdown hook.
[03.08.15 17:58:33.246 INFO    main                 root                                    ] BEGIN Loading Configuration
[03.08.15 17:58:33.506 INFO    main                 root                                    ] BEGIN Copy Custom
[03.08.15 17:58:33.507 INFO    main                 root                                    ]   Directories: [.Custom, custom, /usr/local/share/crashplan/conf/.Custom, /usr/local/share/crashplan/conf/custom]
[03.08.15 17:58:33.507 INFO    main                 root                                    ]   NOT waiting for custom skin to appear
[03.08.15 17:58:33.508 INFO    main                 root                                    ]   NO customizations found.
[03.08.15 17:58:33.509 INFO    main                 root                                    ] END Copy Custom
[03.08.15 17:58:33.529 INFO    main                 root                                    ]   Loading from default: /usr/local/share/crashplan/conf/default.service.xml
[03.08.15 17:58:34.058 INFO    main                 root                                    ]   Loading from my xml file=conf/my.service.xml
[03.08.15 17:58:34.414 INFO    main                 root                                    ]   Loading ServiceConfig, newInstall=true, version=6, configDateMs=null, installVersion=1388728800370
[03.08.15 17:58:34.416 INFO    main                 root                                    ]   OS = Linux
[03.08.15 17:58:34.959 INFO    main                 root                                    ]   AuthorityLocation@15183044[ location=central.crashplan.com:443, hideAddress=false ]
[03.08.15 17:58:34.965 INFO    main                 root                                    ]   Checking Java memory heap max.
[03.08.15 17:58:34.975 INFO    main                 root                                    ]     Previous Java memory max heap size was 1024
[03.08.15 17:58:34.989 INFO    main                 root                                    ] END Loading Configuration
jtux Loaded.
Exiting!!! java.security.ProviderException: init failed
java.security.ProviderException: init failed
        at sun.security.provider.NativePRNG$RandomIO.getMixRandom(Unknown Source)
        at sun.security.provider.NativePRNG$RandomIO.implNextBytes(Unknown Source)
        at sun.security.provider.NativePRNG$RandomIO.access$200(Unknown Source)
        at sun.security.provider.NativePRNG.engineNextBytes(Unknown Source)
        at java.security.SecureRandom.nextBytes(Unknown Source)
        at java.math.BigInteger.randomBits(Unknown Source)
        at java.math.BigInteger.<init>(Unknown Source)
        at java.math.BigInteger.largePrime(Unknown Source)
        at java.math.BigInteger.probablePrime(Unknown Source)
        at sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(Unknown Source)
        at java.security.KeyPairGenerator$Delegate.generateKeyPair(Unknown Source)
        at com.code42.crypto.RSAKeyUtility.generateKeyPair(RSAKeyUtility.java:50)
        at com.backup42.service.CPService.initPeerControllers(CPService.java:649)
        at com.backup42.service.CPService.start(CPService.java:451)
        at com.backup42.service.CPService.main(CPService.java:1865)
Caused by: java.io.IOException: No such device or address
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(Unknown Source)
        at sun.security.provider.NativePRNG$RandomIO.readFully(Unknown Source)
        ... 15 more
[03.08.15 17:58:38.835 INFO    main                 root                                    ] *****  STOPPING  *****
[03.08.15 17:58:38.838 INFO    Thread-0             root                                    ] Stopping service...
[03.08.15 17:58:38.891 INFO    Thread-0             root                                    ] DownloadManager stopped.
[03.08.15 17:58:38.913 INFO    Thread-0             root                                    ] SystemWatcher stopped.
[03.08.15 17:58:38.919 INFO    Thread-0             root                                    ] Service stopped
SIGNAL 9 (SIGKILL)
process exit, rval = 0
```


----------



## tarp (Mar 16, 2015)

PR 198624


----------

