Cannot reach cyrest port 1234 in Cytoscape 3.9.1 installation

409 views
Skip to first unread message

mbro...@gmail.com

unread,
Feb 6, 2022, 5:04:06 PM2/6/22
to cytoscape-helpdesk
My goal is to run cyrest programmatically.  I have been doing the following for versions <= 3.8.2 and had not experience the issue I describe below.  Could you please help provide some hints on what needs to be changed for v3.9.1.  Thanks in advance!

Installation

I installed the latest Linux version via:

CYTOSCAPE_VERSION=3.9.1
wget --progress=dot:gi2a --local-encoding=UTF-8 -v https://github.com/cytoscape/cytoscape/releases/download/$CYTOSCAPE_VERSION/cytoscape-unix-$CYTOSCAPE_VERSION.tar.gz -O cytoscape-$CYTOSCAPE_VERSION.tar.gz
tar -zxvf cytoscape-$CYTOSCAPE_VERSION.tar.gz

Before I launch, I have done the follow, so that I start a clean instance
rm -rf ~/CytoscapeConfiguration/

Launch Cytoscape

I launch Cytoscape in server mode (so that I can cyrest to it programmatically)
cd cytoscape-unix-3.9.1
./cytoscape server &

After waiting for plenty of time, it seems cyrest is not listening on port 1234
$ curl  http://localhost:1234/v1
curl: (7) Failed to connect to ::1: Network is unreachable

I check, cytoscape is running correctly (so presumably cyrest app is not running)
$ ps -ef |grep java
cytosca+   821   776 13 13:49 ?        00:00:51 /etc/alternatives/jre_11/bin/java -Xms2048M -Xmx30936M -Xss5M --add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-module
 java.base=lib/endorsed/org.apache.karaf.specs.locator-4.2.8.jar --patch-module java.xml=/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/endorsed/org.apache.karaf.specs.java.xml-4.2.8.jar -p /home/cytoscape/cytoscape-unix-3.9.1/fra
mework/lib/openjfx/linux --add-modules javafx.base,javafx.swing,javafx.media,javafx.web --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens
 java.base/java.util=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net
.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED -Dkaraf.instances=/home/
cytoscape/cytoscape-unix-3.9.1/framework/instances -Dkaraf.home=/home/cytoscape/cytoscape-unix-3.9.1/framework -Dkaraf.base=/home/cytoscape/cytoscape-unix-3.9.1/framework -Dkaraf.data=/home/cytoscape/CytoscapeConfiguration/3/karaf_dat
a -Dkaraf.etc=/home/cytoscape/cytoscape-unix-3.9.1/framework/etc -Dkaraf.log=/home/cytoscape/CytoscapeConfiguration/3/karaf_data/log -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/home/cytoscape/CytoscapeConfiguration/3/karaf_da
ta/tmp -Djava.util.logging.config.file=/home/cytoscape/cytoscape-unix-3.9.1/framework/etc/java.util.logging.properties -Dcytoscape.home=/home/cytoscape/cytoscape-unix-3.9.1 -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=fals
e -classpath /home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/branding-3.9.1.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/karaf-launcher-3.9.1.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/opendmk_j
mxremote_optional_jar-1.0-b01-ea.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/org.apache.karaf.diagnostic.boot-4.2.8.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/org.apache.karaf.jaas.boot-4.2.8.jar:/home
/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/org.apache.karaf.main-4.2.8.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/boot/org.apache.karaf.specs.activator-4.2.8.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/b
oot/osgi.core-6.0.0.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/jdk9plus/jakarta.xml.bind-api-2.3.2.jar:/home/cytoscape/cytoscape
-unix-3.9.1/framework/lib/jdk9plus/javax.activation-1.2.0.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/jdk9plus/javax.annotation-api-1.3.1.jar:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/jdk9plus/jaxb-runtime-2.3.2.ja
r:/home/cytoscape/cytoscape-unix-3.9.1/framework/lib/jdk9plus/txw2-2.3.2.jar org.cytoscape.launcher.internal.Launcher

Log File

The following is what I see in the ~/CytoscapeConfigure/3/framework-cytoscape.log

2022-02-06 13:49:44,273 [features-3-thread-1] INFO  org.apache.karaf.features.internal.service.FeaturesServiceImpl -   org.cytoscape.equations-functions-impl/3.9.1
2022-02-06 13:49:44,364 [features-3-thread-1] INFO  org.apache.karaf.deployer.features.osgi.Activator - Deployment finished. Registering FeatureDeploymentListener
2022-02-06 13:49:44,592 [pool-8-thread-1] INFO  org.cytoscape.io.webservice.biomart.rest.BiomartRestClient - Biomart Service URL is: http://www.ensembl.org/biomart/martservice
2022-02-06 13:49:44,761 [pool-8-thread-1] INFO  org.cytoscape.application.userlog - New network import client registered: BioMart Client
2022-02-06 13:49:45,787 [pool-8-thread-1] INFO  org.cytoscape.application.userlog - New network import client registered: Universal Interaction Database Client
2022-02-06 13:49:46,278 [pool-8-thread-1] INFO  org.cytoscape.rest.internal.CyActivator - CyREST [3.12.3] discovered previous CyREST Version: 3.12.0.SNAPSHOT
2022-02-06 13:49:46,364 [pool-8-thread-1] WARN  org.cytoscape.rest.internal.CyActivator - Detected new installation. Restarting Cytoscape is recommended.
2022-02-06 13:49:46,373 [Thread-16] ERROR org.cytoscape.opencl.layout.CyActivator - No OpenCL compatible device found. Cannot register 'Prefuse Force Directed OpenCL Layout'.
2022-02-06 13:49:46,476 [features-3-thread-1] INFO  org.apache.karaf.features.internal.service.FeaturesServiceImpl - Done.
2022-02-06 13:49:47,198 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)
2022-02-06 13:49:47,257 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)
2022-02-06 13:49:47,260 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)

2022-02-06 13:49:49,057 [Task-Thread-1-Factory-0x70442bbc] INFO  org.cytoscape.io.internal.read.GenericReaderManager - Filter returns Accepted.  Need to check priority: org.cytoscape.io.internal.read.vizmap.VizmapXMLReaderFactory@6e2e
efde
2022-02-06 13:49:49,059 [Task-Thread-1-Factory-0x70442bbc] INFO  org.cytoscape.io.internal.read.GenericReaderManager - Successfully found compatible ReaderFactory org.cytoscape.io.internal.read.vizmap.VizmapXMLReaderFactory@6e2eefde
2022-02-06 13:49:49,069 [Task-Thread-3-Factory-0x70442bbc] INFO  org.cytoscape.application.userlog - Custom Graphics Metadata was not found. (This is normal for the first time.)
2022-02-06 13:49:50,662 [Task-Thread-3-Factory-0x70442bbc] INFO  org.cytoscape.application.userlog - Image saving process finished in 1.592 sec.

Alex Pico

unread,
Feb 7, 2022, 12:30:14 PM2/7/22
to Cytoscape Helpdesk
Thanks for reporting this!  3.9.1 was not intended to require a change to this use case, so something appears to have gone wrong.  Do you know if 3.9.0 works or not? That might help us isolate the code change underlying this bug.

I’ll also copy this error line from your full log below in case that helps others suggest workarounds or proper fixes. I think we’ve seen this before...

ERROR org.cytoscape.opencl.layout.CyActivator - No OpenCL compatible device found. Cannot register 'Prefuse Force Directed OpenCL Layout’.

 - Alex






--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/74bc48ba-96aa-4538-a601-5d0cfa6f8efan%40googlegroups.com.

Mark Brown

unread,
Feb 7, 2022, 1:27:19 PM2/7/22
to cytoscape...@googlegroups.com
Hi, Alex

Thank you for the prompt reply.
I just repeated the process for 3.9.0, the same symptom.
I only see cy-rest-3.12.2.jar under apps subfolder, but it apparently memorizes 3.12.0.SNAPSHOT and then recommend a restart.  Is there some inconsistency between different versions of cy-rest shipped with 3.9.x?

Thanks!

2022-02-07 10:22:20,299 [pool-8-thread-1] INFO  org.cytoscape.rest.internal.CyActivator - CyREST [3.12.2] discovered previous CyREST Version: 3.12.0.SNAPSHOT
2022-02-07 10:22:20,381 [pool-8-thread-1] WARN  org.cytoscape.rest.internal.CyActivator - Detected new installation. Restarting Cytoscape is recommended.
2022-02-07 10:22:20,786 [pool-8-thread-1] INFO  org.cytoscape.io.webservice.biomart.rest.BiomartRestClient - Biomart Service URL is: http://www.ensembl.org/biomart/martservice
2022-02-07 10:22:20,966 [pool-8-thread-1] INFO  org.cytoscape.application.userlog - New network import client registered: BioMart Client
2022-02-07 10:22:22,094 [pool-8-thread-1] INFO  org.cytoscape.application.userlog - New network import client registered: Universal Interaction Database Client
2022-02-07 10:22:22,770 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)
2022-02-07 10:22:22,772 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)
2022-02-07 10:22:22,774 [pool-8-thread-1] WARN  org.cytoscape.application.userlog - Specified factory is null or has wrong DataCategory (SESSION)
2


Alex Pico

unread,
Feb 7, 2022, 1:32:01 PM2/7/22
to Cytoscape Helpdesk
Hmm. That is curious. Under the installation directory, I have CyREST 3.12.3 under apps. Maybe try that:

If you find  a “snapshot” version in this apps dir or in the user app dir under CytoscapeConfiguration/3/apps/installed, try deleting that.

 - Alex






--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

Mark Brown

unread,
Feb 7, 2022, 1:46:12 PM2/7/22
to cytoscape...@googlegroups.com
To simplify the log file, I remove all apps except the minimum required by cyREST, (cy-rest and json) 
[cytoscape@b016b23f9a67 cytoscape-unix-3.9.0]$ ls -lt apps
total 12064
-rw-rw-r-- 1 cytoscape cytoscape 9113034 Aug 24 14:59 cy-rest-3.12.2.jar
-rw-r--r-- 1 cytoscape cytoscape 3237802 Jan 31  2020 json-3.7.0.jar
[cytoscape@b016b23f9a67 cytoscape-unix-3.9.0]$

 The log file hangs here.  I think there is some versioning conflict in v3.9.x.
Thanks

2022-02-07 10:42:55,673 [pool-8-thread-1] INFO  org.cytoscape.rest.internal.CyActivator - CyREST [3.12.2] discovered previous CyREST Version: 3.12.0.SNAPSHOT
2022-02-07 10:42:55,771 [pool-8-thread-1] WARN  org.cytoscape.rest.internal.CyActivator - Detected new installation. Restarting Cytoscape is recommended.
2022-02-07 10:42:56,258 [features-3-thread-1] INFO  org.apache.karaf.features.internal.service.FeaturesServiceImpl - Done.

Mark Brown

unread,
Feb 7, 2022, 1:54:51 PM2/7/22
to cytoscape...@googlegroups.com
I do have the right .jar in the apps folder.

[cytoscape@b016b23f9a67 cytoscape-unix-3.9.0]$ ls -lt apps
total 12064
-rw-rw-r-- 1 cytoscape cytoscape 9113034 Aug 24 14:59 cy-rest-3.12.2.jar
-rw-r--r-- 1 cytoscape cytoscape 3237802 Jan 31  2020 json-3.7.0.jar

I always rm -rf ~/CytoscapeConfigure before I launch cytoscape.sh server, so I don't have any cache.

I suspect  CyREST Version: 3.12.0.SNAPSHOT comes with v3.9.x?



You received this message because you are subscribed to a topic in the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-helpdesk/xd1bH4DVsh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-helpd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/12EF9A3C-5F5C-4FF4-8AA3-E927380F75AF%40gladstone.ucsf.edu.

Alex Pico

unread,
Feb 7, 2022, 2:27:36 PM2/7/22
to Cytoscape Helpdesk
The apps the come with Cytoscape are placed in Cytoscape_v3.9.1/apps/ (where Cytoscape is installed).  Not sure where this snapshot version is if it’s not in your installation dir.

 - Alex






Mark Brown

unread,
Feb 7, 2022, 2:55:26 PM2/7/22
to cytoscape...@googlegroups.com
I have a clean environment, no CytoscapeConfigure folder, no SNAPSHOT in apps subfolder (as shown below).  So this somehow has to come with the build.

Is it possible to put me in touch with a developer, so that I can get a development version that at least print out more debugging information regarding where it discovers "org.cytoscape.rest.internal.CyActivator - CyREST [3.12.3] discovered previous CyREST Version: 3.12.0.SNAPSHOT". Otherwise, I don't know how to fix the issue and will be stuck with 3.8.2. Thank you so much.

Mark

[cytoscape@649e94328404 ~]$ ls -la
total 12
drwx------ 1 cytoscape cytoscape  34 Feb  7 11:49 .
drwxr-xr-x 1 root      root       23 May 21  2020 ..
-rw-r--r-- 1 cytoscape cytoscape  18 Oct 30  2018 .bash_logout
-rw-r--r-- 1 cytoscape cytoscape 193 Oct 30  2018 .bash_profile
-rw-r--r-- 1 cytoscape cytoscape 231 Oct 30  2018 .bashrc
drwxrwxr-x 5 cytoscape cytoscape  97 Feb  7 11:49 cytoscape-unix-3.9.1
[cytoscape@649e94328404 ~]$ cd cytoscape-unix-3.9.1/
[cytoscape@649e94328404 cytoscape-unix-3.9.1]$ ls -la apps
total 52960
drwxrwxr-x 2 cytoscape cytoscape    4096 Feb  7 11:49 .
drwxrwxr-x 5 cytoscape cytoscape      97 Feb  7 11:49 ..
-rw-r--r-- 1 cytoscape cytoscape  181657 May  8  2020 aMatReader-1.2.0.jar
-rw-r--r-- 1 cytoscape cytoscape  430861 Jul 27  2020 analyzer-4.4.6.jar
-rw-r--r-- 1 cytoscape cytoscape 4969164 Jan 31  2020 biopax-3.4.0.jar
-rw-r--r-- 1 cytoscape cytoscape 5819852 Jan 31  2020 copycatLayout-1.3.1.jar
-rw-r--r-- 1 cytoscape cytoscape    4164 May 14  2021 core-apps-meta-3.8.0.jar
-rw-r--r-- 1 cytoscape cytoscape 4586372 Aug 28 01:04 cx-support-2.7.0.jar
-rw-rw-r-- 1 cytoscape cytoscape 8237658 Aug 24 14:59 cy-ndex-2-3.6.1.jar
-rw-rw-r-- 1 cytoscape cytoscape 9113098 Jan  9 07:45 cy-rest-3.12.3.jar
-rw-rw-r-- 1 cytoscape cytoscape 1334448 Aug 24 14:59 cyBrowser-1.3.jar
-rw-r--r-- 1 cytoscape cytoscape 1372584 Jan 31  2020 cyChart-0.3.0.jar
-rw-r--r-- 1 cytoscape cytoscape 5737745 Aug  7  2020 diffusion-1.6.1.jar
-rw-r--r-- 1 cytoscape cytoscape  337950 Apr 25  2021 file-transfer-1.1.jar
-rw-r--r-- 1 cytoscape cytoscape 1552070 Jan 31  2020 idmapper-3.9.0.jar

-rw-r--r-- 1 cytoscape cytoscape 3237802 Jan 31  2020 json-3.7.0.jar
-rw-r--r-- 1 cytoscape cytoscape  148458 Jun  5  2021 network-merge-3.9.3.jar
-rw-rw-r-- 1 cytoscape cytoscape 2773129 Nov 17 07:08 opencl-cycl-3.6.1.jar
-rw-rw-r-- 1 cytoscape cytoscape   24465 Nov 17 07:08 opencl-layout-3.6.1.jar
-rw-r--r-- 1 cytoscape cytoscape  190611 Jan 31  2020 psi-mi-3.4.0.jar
-rw-rw-r-- 1 cytoscape cytoscape 3808673 Jan  7 10:21 sbml-3.4.1.jar
-rw-r--r-- 1 cytoscape cytoscape   75220 Jan 31  2020 webservice-biomart-client-3.4.0.jar
-rw-r--r-- 1 cytoscape cytoscape  247300 Jan 31  2020 webservice-psicquic-client-3.5.0.jar

Alex Pico

unread,
Feb 7, 2022, 5:03:45 PM2/7/22
to Cytoscape Helpdesk
Thanks for confirming what’s in your apps folder. The dev team is reading this helpdesk and I’ve already forwarded this to a couple devs in particular. Here is the right place to get their response and assistance.  

There isn’t a dev version with more logs. I don’t expect you to fix the issues; we’re on it.  You’ll get a response here if we need more info from you. Thanks!

 - Alex






--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

Alex Pico

unread,
Feb 8, 2022, 11:51:26 AM2/8/22
to Cytoscape Helpdesk
Here’s another guess…

Whenever the version of CyREST is bumped, Cytoscape will launch with a GUI error message and requires a soft quit and restart. If you do a force quit (or command line quit), then Cytoscape doesn’t go through the shut down process that updates the expected CyREST version and you will repeated hit this error. 

 - Alex

Mark Brown

unread,
Feb 8, 2022, 12:06:46 PM2/8/22
to cytoscape...@googlegroups.com
Hi, Alex

I am running cytoscape in the server mode, the display is sent to a buffer Xvfb.  So I don't really interact with GUI and I did not force quit it.  The program hangs as far as I can tell.  Plus, it is not clear why and where the program found another snapshot version of CyREST, so we might need an explanation on that error message first.  If there is any test I can do, please let me know.

Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-helpdesk/xd1bH4DVsh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-helpd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/E1C84C23-8CEB-46CB-A4CD-9B649814B699%40gladstone.ucsf.edu.

Alex Pico

unread,
Feb 8, 2022, 12:27:36 PM2/8/22
to Cytoscape Helpdesk
Understood, but I can reproduce these lines in my framework-cytoscape.log:

2022-02-08 09:14:15,936 [pool-9-thread-1] INFO  org.cytoscape.rest.internal.CyActivator - CyREST [3.12.2] discovered previous CyREST Version: 3.12.3
2022-02-08 09:14:15,973 [pool-9-thread-1] WARN  org.cytoscape.rest.internal.CyActivator - Detected new installation. Restarting Cytoscape is recommended.

In my test, I switched from a Cytoscape instance running 3.12.3 to 3.12.2 and the message indicates this switch even though 3.12.2 is no where to be found in this installation. So, I suspect that the last successful launch and close of Cytoscape on your system included cyrest 3.12.0-snapshot.

In this test, my Cytoscape session hangs (waiting for a GUI dialog response). If I quit Cytoscape by command line (specifically, OSGi’s ctrl-d), then I will continue to get this behavior every time.  I have to quit Cytoscape using the GUI close (or ctrl-q) to properly shutdown Cytoscape in a way that sets the new CyREST version.  Only then can I launch Cytoscape without a hang.

This is still my current theory for what you are seeing.
 - Alex






You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/CAK%3DLApeq2f4Ur6-y0%2B0%3DstEQU1oRqOJtqda-KBoPXe9sRcnHvQ%40mail.gmail.com.

Mark Brown

unread,
Feb 8, 2022, 2:07:08 PM2/8/22
to cytoscape...@googlegroups.com
Thanks. FYI, I further delete .cache, .java folders, in addition to CytoscapeConfiguration.  But cytoscape still finds the SNAPSHOT version.  So not sure where that comes from.

drwxr-xr-x 3 cytoscape cytoscape  24 Feb  8 11:04 .cache
drwxrwxr-x 3 cytoscape cytoscape  19 Feb  8 11:04 .java
drwxrwxr-x 7 cytoscape cytoscape 162 Feb  8 11:04 CytoscapeConfiguration

Alex Pico

unread,
Feb 8, 2022, 2:29:07 PM2/8/22
to Cytoscape Helpdesk
Right. This is something we all find annoying. However, 99.999% of Cytoscape users are GUI users, so it hasn’t been a high priority, nor was “headless” mode an original design goal. 

Nevertheless, we are looking into a future fix to skip this CyREST version check altogether as we are motivated to make Cytoscape work better in automation scenarios.  I’ve got the team brainstorming on a workaround in the meantime (e.g., where to delete/modify this CyREST version expectation). 

But the only workaround I know of is to close the Cytoscape GUI by ctrl-q or mouse click. You just have to do this once per upgrade. Then it will work “headless” for all future launches.

We’ll respond here with any other workaround ideas...

 - Alex



Mark Brown

unread,
Feb 8, 2022, 3:39:34 PM2/8/22
to cytoscape...@googlegroups.com
Hi, Alex

I actually don't have a visual on the GUI interface.  The cytoscape is run within a Docker container, where we use Xvfb to provide X display service.
I try to mimic your workaround.  I enter the container and run cytoscape.sh without "server" option, I got the message below.  Now if I simply type shutdown or ctrl-d to quit. Then restart "cytoscape.sh server &", I will get the same problem.  How do I mimic your workaround in the command line shell?

[cytoscape@649e94328404 cytoscape-unix-3.9.1]$ ./cytoscape.sh
karaf.base: /home/cytoscape/cytoscape-unix-3.9.1/framework
JAVA_HOME: /etc/alternatives/jre_11
             _
   ___ _   _| |_  ___  ___  ___  __ _ _ __   ___
  / __| | | | __|/ _ \/ __|/ __|/ _` | '_ \ / _ \
 | (__| |_| | |_| (_) \__ \ (__| (_| | |_) |  __/
  \___|\__, |\__|\___/|___/\___|\__,_| .__/ \___|
       |___/                         |_|

Cytoscape 3.9.1

Hit '<tab>' for a list of available commands
   and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Cytoscape.

karaf@Cytoscape 3.9.1()> java.lang.UnsatisfiedLinkError: /home/cytoscape/CytoscapeConfiguration/3/karaf_data/cache/bundle108/version0.0/bundle.jar-lib/0/native/linux/liblwjgl64.so
: libXcursor.so.1: cannot open shared object file: No such file or directory
        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2640)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
        at java.base/java.lang.System.loadLibrary(System.java:1870)
        at org.lwjgl.Sys$1.run(Sys.java:72)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:87)
        at org.lwjgl.Sys.<clinit>(Sys.java:117)
        at org.lwjgl.opencl.CL.<clinit>(CL.java:52)
        at org.cytoscape.opencl.cycl.CyCL.initialize(CyCL.java:69)
        at org.cytoscape.opencl.cycl.CyActivator.lambda$start$0(CyActivator.java:31)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

karaf@Cytoscape 3.9.1()>


Scooter Morris

unread,
Feb 10, 2022, 1:00:45 PM2/10/22
to cytoscape-helpdesk
OK, here is what's going on.  There seem to be a couple of things happening:
1) I think you have an older installer.  The current version of cyrest that comes from the installer is 3.12.3, so your /opt/Cytoscape_ v3.9.1/apps directory should look like this:

aMatReader-1.2.0.jar     core-apps-meta-3.8.0.jar  cy-ndex-2-3.6.1.jar    idmapper-3.9.0.jar       opencl-layout-3.6.1.jar              webservice-psicquic-client-3.5.0.jar
analyzer-4.4.6.jar       cx-support-2.7.0.jar      cy-rest-3.12.3.jar     json-3.7.0.jar           psi-mi-3.4.0.jar
biopax-3.4.0.jar         cyBrowser-1.3.jar         diffusion-1.6.1.jar    network-merge-3.9.3.jar  sbml-3.4.1.jar
copycatLayout-1.3.1.jar  cyChart-0.3.0.jar         file-transfer-1.1.jar  opencl-cycl-3.6.1.jar    webservice-biomart-client-3.4.0.jar

2) The place where the previous CyREST version is stored is ~/CytoscapeConfiguration/cytoscape3.props.  If you look at the line: cyrest.version=3.12.3, you will probably see 3.12.0-SNAPSHOT.  This file gets created automatically from the installer, which is why I think you have the wrong installer.

Hope this helps.

-- scooter

Mark Brown

unread,
Feb 11, 2022, 1:31:00 AM2/11/22
to cytoscape...@googlegroups.com
Hi, Scooter

The information you provided is very helpful.  However, it seems the issue is related but different from your theory.

What I have is a clean VM, it has no prior Cytoscape installation, i.e., I don't have an existing CytoscapeConfigure folder.
I download the unix .tar.gz and untar it, that's it for my installation. 

CYTOSCAPE_VERSION=3.9.1
wget --progress=dot:gi2a --local-encoding=UTF-8 -v https://github.com/cytoscape/cytoscape/releases/download/$CYTOSCAPE_VERSION/cytoscape-unix-$CYTOSCAPE_VERSION.tar.gz -O cytosca
pe-$CYTOSCAPE_VERSION.tar.gz

Then I launch "cytoscape.sh server &".

BTW, I just tried and I am unable to launch Cytoscape:
[cytoscape@649e94328404 cytoscape-unix-3.9.1]$ jobjava.lang.UnsatisfiedLinkError: /home/cytoscape/CytoscapeConfiguration/3/karaf_data/cache/bundle114/version0.0/bundle.jar-lib/0/n
ative/linux/liblwjgl64.so: libXcursor.so.1: cannot open shared object file: No such file or directory

        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2640)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
        at java.base/java.lang.System.loadLibrary(System.java:1870)
        at org.lwjgl.Sys$1.run(Sys.java:72)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:87)
        at org.lwjgl.Sys.<clinit>(Sys.java:117)
        at org.lwjgl.opencl.CL.<clinit>(CL.java:52)
        at org.cytoscape.opencl.cycl.CyCL.initialize(CyCL.java:69)
        at org.cytoscape.opencl.cycl.CyActivator.lambda$start$0(CyActivator.java:31)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Anyway, this error probably is caused by some apps. I normally don't need any apps except CyREST.
So after deleting all not-needed apps, I am able to launch Cytoscape without the above error (so if I spend time, I could find out which apps is causing the error)
[cytoscape@649e94328404 cytoscape-unix-3.9.1]$ find apps/ -type f -not -name 'cy-rest*' -not -name 'json*' -delete
[cytoscape@649e94328404 cytoscape-unix-3.9.1]$ ls -lt apps
total 12064

-rw-rw-r-- 1 cytoscape cytoscape 9113098 Jan  9 07:45 cy-rest-3.12.3.jar
-rw-r--r-- 1 cytoscape cytoscape 3237802 Jan 31  2020 json-3.7.0.jar

Now I reproduce the issue that cyREST cannot be launched.

There is no "cytoscape3.prop" file in the auto created CytoscapeConfigure folder. If I copy a cytoscape3.prop file from another computer, the problem is fixed, cyREST can be launched.
If I repeat the process for Cytoscape 3.8.2, cyREST can be launched without cytoscape3.prop file.

So my guess is cy-rest-3.11.1.jar does not care about cytoscape3.prop, but cy-rest-3.12.3.jar requires cytoscape3.prop.

If that's the case, cytoscape3.prop is missing in CytoscapeConfigure folder, if I simply untar the installation file and launch with "cytoscape.sh server&".

I have a workaround now, but cyREST does not work with my way of installation, maybe cyREST needs to be patched to not require the presence of cytoscape3.prop?

Thank you!


Christopher Churas

unread,
Feb 11, 2022, 1:46:36 PM2/11/22
to cytoscape...@googlegroups.com
Hi,

I did some digging and found the cytoscape3.props file. If you untar & gunzip the installation package cytoscape3.props is
located within the property-impl-3.9.1.jar file located here:

cytoscape-unix-3.9.1/framework/system/org/cytoscape/property-impl/3.9.1

In that properties file is the incorrectly listed version of cyrest which is causing the cyrest to show a "you should restart" dialog, but that dialog fails to load for me in xvfb and that seems to cause cyrest to fail to load. 

A hack fix is to correct the cyrest version in the properties after untarring cytoscape and before launch and subsequent calls should work. 

I haven't tested the steps below my dockerfile yet, but I'm going to try right now

What I'm going to try (if your sed supports in place editing you could get rid of that .tmp step):

pushd cytoscape-unix-3.9.1/framework/system/org/cytoscape/property-impl/3.9.1
jar -xf property-impl-3.9.1.jar cytoscape3.props
cat cytoscape3.props | sed "s/^cyrest.version.*/cyrest.version=3.12.3/g" > cytoscape3.props.tmp
mv cytoscape3.props.tmp cytoscape3.props
jar -uf property-impl-3.9.1.jar cytoscape3.props
rm cytoscape3.props
popd

hope this helps,

chris

Christopher Churas

unread,
Feb 11, 2022, 2:12:21 PM2/11/22
to cytoscape...@googlegroups.com
Hi,

It worked :) I updated the 3.9.1dev branch on the docker-cytoscape-desktop repo to pull cytoscape 3.9.1 and to 
update cytoscape3.props in the jar file and cyrest worked for me.

Link to branch on repo:


chris

Mark Brown

unread,
Feb 11, 2022, 11:53:10 PM2/11/22
to cytoscape...@googlegroups.com
Hi, Chris

Thank you so much for finding the ultimate explanation of where the SNAPSHOT version came from.  Really appreciate all the helps from you and Alex!!!

Monica Colitti

unread,
Apr 26, 2022, 5:45:17 AM4/26/22
to cytoscape-helpdesk
Please I cannot open a string network from string for a problem in Cytorest. What can i do? I had never this problem before....Thank you

Scooter Morris

unread,
Apr 28, 2022, 10:30:49 AM4/28/22
to cytoscape-helpdesk
Hi Monica,

Can you describe a bit more about what the problem is?  Are you using the stringApp?  In that case, it doesn't use CyREST.  If you are using the "Send network to cytoscape" feature on the STRING web site, you need to make sure Cytoscape is running and nothing is blocking port 1234 locally.

-- scooter
Reply all
Reply to author
Forward
0 new messages