Bioconductor/BiocWorkshops

RCy3 connection issues from amazon instance

risserlin opened this issue · 12 comments

Rcy3 communicates with cytoscape using the localhost on the machine that is running Rstudio but the amazon instance is not able to access localhost calls.

I think that what is suggested in this post (https://stackoverflow.com/questions/43488046/cant-connect-to-localhost-apache-ubuntu) might work but I got permission denied error when I tried.

Can we enable ssh connection to the amazon instances so people can try the Rcy3 calls from amazon instance.

@risserlin , the AMIs don't have Cytoscape installed. I should've said to use the DESCRIPTION SystemRequirements field to list system requirements, because it was too much to remember to install this in addition to the R packages. What I would suggest is 1) plan on demonstrating using your own laptop, and 2) we could make an announcement to people planning to attend your workshop and provide some instructions for preparing for your workshop, including installing Cytoscape and R requirements on their own laptops.

@lwaldron the AMIs don't need to have Cytoscape installed. RStudio needs to communicate with the instance of cytoscape on the system of the person using it. Even when we use docker instances with RCy3 when launching the docker we map the localhost on the docker to the host computer in the start up. Just thought we could do the same using the AMI
I have posted my workshop as a zip file on our ftp site so people can easily download it to their systems and run the workshop directly from their own laptops as opposed to through the AMI. Can we add to the schedule a note next to the Rcy3 workshop to make sure to have cytoscape 3.6 installed prior to the workshop if they want to run through the code concurrently?

The AMIs require passwordless ssh as they are set up and the users do not have the keys. Sorry--hadn't planned on this contingency. I think the idea of having users do stuff locally makes sense as long as downloads are VERY small; sharing a wifi connection can be a bit challenging.

I can download and install Cytoscape from the shell in RStudio with

wget http://chianti.ucsd.edu/cytoscape-3.6.1/Cytoscape_3_6_1_unix.sh
sh Cytoscape_3_6_1_unix.sh -q

Does that get me far enough to start cytoscape on the AMI. The AMI has Java

> system("java -version")
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

Answering my own question I think Cytoscape_v3.6.1/Cytoscape actually starts cytoscape? So the only remaining challenge is to open a port?

So the next challenge is to get

RCy3::cytoscapePing()

to work.

Is it enough to connect to any cytoscape? so maybe start a public cytoscape somewhere and set RCy3's default to point there? the outbound ports are open, and that should be enough for RCy3 to communicate. So actually all that is needed is RCy3::cytoscapePing("http://some.where:1234/v1") ? I think if the end point were responsive this would work 'out of the box'

lshep commented

We just added open port 1234 to a security group on all instances and it should have propagated to all the running instances. Can someone test it out?

The port 1234 is open, but I don't know how to start cytoscape locally; it wants X11 for display. Any hints @risserlin ?

@mtmorgan by locally do you mean on the AMI or on your machine? I just tried the AMI and got the same error. Cytoscape can not run headless. Users need to run Cytoscape on their machines and the R instance sends commands to cytoscape (through localhost:1234) to create and manipulate networks.

lshep commented

@risserlin it looks like the best bet is probably as you suggested have them download cytoscape 3.6 and the provided zip. Since your workshop was scheduled for 4-5 would you be okay with announcing that participants can come early (maybe 3:15 so all workshops start at the same time) for instruction on downloading and installing? We want to give extra time since it may be a little slower over the wifi

@lshep sure. I can start at 3:15 and help people get set up.
Maybe we can post the download instructions somewhere so people can try download everything over lunch if they want as well.
For the workshop users need to download and install cytoscape 3.6.1 from http://cytoscape.org/download.php.
Workshop files can be downloaded from: http://download.baderlab.org/Bioc2018/

Thanks, @risserlin, for your flexibility, and @lshep for working on this. I'll try to get a few people to stop by to help with setup.