sequenceserver and shiny-server

Hi there!

I have a server set up with shiny-server (not relevant, but running at giorgilab.unibo.it). I wanted to run sequenceserver alongside the same address, so I installed it and successfully executed it

sequenceserver -d /home/PERSONALE/federico.giorgi4/projects/hygromycin/blast
–port 8080 --num_threads 8

However, when I run giorgilab.unibo.it:8080 I don’t get any page (it times out).

I am using sequenceserver 2.0+ (installed via sudo gem install --pre sequenceserver)

My question is: how can I run sequenceserver on my server, without removing the shiny-server installation? I thought that in theory we could have two servers running at the same time, just on different ports, without conflicting. As a side note: port 8080 is open firewall-wise.

Even better would be to have sequenceserver available, instead of on a different port, on a sub-address e.g. giorgilab.unibo.it/sequenceserver, not sure if it’s possible and forgive me for the lack of proper terminology :slight_smile:

Any suggestion is welcome. Thanks!

Federico

Hi Federico,

Do you see any error messages in the logs? You might try turning on development mode to see more verbose output. The issue you describe is usually caused by either the program (SequenceServer) failing to bind the port or a firewall and/or SELinux blocking incoming connections. The logs should help with the first issue and you can use the following command to verify if SequenceServer has bound port 8080.

sudo netstat -ltnp | less

You should see a local IP followed by :8080 in the Local Address column and the sequence server binary should be in the last column. If you don’t see both of these things then you have a problem with SequenceServer itself or something else binding port 8080 preventing SequenceServer from using it.

For the second issue you should log in to the server where you installed SequenceServer and run

curl http://localhost:8080
and

curl http://giorgilab.unibo.it:8080/

If the localhost runs and returns data but the second one does not then you likely have a firewall issue. If both hang try disabling your firewall briefly and re-running the curl commands. If it still doesn’t work you should have some error message in the SequenceServer log output that will help debug further. SELinux issues are generally logged in /var/log, I don’t have enough information to guide you more on that.

Regarding your question about running both shiny-server and SequenceServer on the same port. In order to do this you will need to set up what is called a reverse proxy. This is a third server that does nothing but accept incoming connections from clients and sends them on to another server, returning the response to the client when it receives one. For this you need to install and configure a third server to act as the reverse proxy that will bind port 80. You would then run SequenceServer on port 8080 and shiny-server on some other port (e.g. 8081). Then you configure the reverse proxy to pull from these other local servers. SequenceServer does have some documentation on this type of setup using nginx. Another easy to use option for a reverse proxy is Caddy.

Regards,

Josh

Dear Josh,

your reply is kind, precise, complete and life-saving at the same time. Big kudos!

I managed to fix, thanks to your tip on -D debug mode, the issue with the port :slight_smile:
Now SequenceServer is splendidly running at http://giorgilab.unibo.it:8080/

I will bind a reverse proxy on port 80 as you suggested!

Super super thanks!!

Federico