I have some trouble with the DaemonService using the new ursim (either 5.0.3.30563 or 3.6.0.30512) in Ubuntu 16.04.
I have installed both the simulators as I have always done: same base path, same user permissions, same runit services, same… everything I believe.
Anyway, my URCaps and also the mydaemonswing example do not work: the daemon initialization always fails with ERROR.
And if I test the runit service through sudo sv check runsvdir-ursim-5.0.3.30563 it returns as expected: ok: run: runsvdir-ursim-5.0.3.30563: (pid 15896) 6364s.
I’ve also tried to change the user or group in the run file of the service, but with no luck.
The only way to enable the daemon service is to start ursim through sudo ./start-ursim.sh, but it then complains with other missing folders or settings which it is probably been searching in the root directory instead of the user home.
All these problems won’t happen with previous releases of the simulators.
I am not sure how your setup works, but you will not see the daemon process, if you grep runsv. Try to search for it without grep or look for the name of your daemon executable specifically.
This is the line with the process in the output of ps aux:
How about you modify start-ursim.sh and put echo $URSIM_ROOT to see the paths. I can only get my daemon running when I start Polyscope with sudo, but paths are identical.
The path is right, but you got the point: there is an error at the very beginning of the initialization of the simulator.
/opt/universal-robots/ursim-5.0.3.30563/GUI /opt/universal-robots/ursim-5.0.3.30563 /opt/universal-robots/ursim-5.0.3.30563
ERROR: Error reloading cached bundle, removing it: ./felix-cache/bundle112 (java.io.FileNotFoundException: ./felix-cache/bundle112/bundle.location (No such file or directory))
java.io.FileNotFoundException: ./felix-cache/bundle112/bundle.location (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.apache.felix.framework.util.SecureAction.getFileInputStream(SecureAction.java:453)
at org.apache.felix.framework.cache.BundleArchive.readLocation(BundleArchive.java:1107)
at org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:973)
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
at org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
at org.apache.felix.framework.Felix.init(Felix.java:754)
at org.apache.felix.framework.Felix.init(Felix.java:624)
at org.apache.felix.main.Main.main(Main.java:289)
Installing bundle: bundle/jsoup-1.7.3.jar
...
From release ursim-3.6.0.30512 there is a mistake in the creation of the service bundle links when starting the simulator.
In previous versions, it creates in its service subdirectory the link to the loaded bundles. However I have found this service directory in my home, and maybe it is not the right place where it searches for them.
I also seem to be experiencing this same issue. I just created a fork of my source code from <= PolyScope 3.5.x to > 3.6.x and the first issue that I’m hitting is that my daemon is in a FAILED state. It seems like a similar issue to what is being seen here. It is a simple xmlrpc server (taken from the UR sample code and modified to it my needs).
When I start the daemon up via terminal it runs just fine and I can use it with the simulator but that is not going to work as a long-term solution. Just a workaround until I can figure it out.
The new URCaps Starter Package for SDK 1.4.4 resolved this issue.
You can find the latest starter package here: Download Center
If running in your own Linux OS, this issue may be caused by runit.
Consider following these steps to resolve the issue.
The issue is not directly related to PolyScope, but rather the configuration of the Linux machine.
When looking at the above linked steps, particularly the hostname and installation of runit will have an impact.
Furthermore, it is not recommended, to start URSim as root, as this will cause PolyScope to have other issues.
As an alternative, you are also able to use a “non-linux” URSim in a virtual machine.
Then you are able to deploy directly to this, using the URSim VM option to deploy the URCap.
The URSim VM is directly able to run daemons, and you will not have to change your host computers hostname.