[Bioc-devel] bioconductor AMI & shiny app
Robert Castelo
robert.castelo at upf.edu
Wed May 21 16:37:31 CEST 2014
hi,
i'm trying to use a shiny app through AWS and the bioconductor AMI, but
i cannot make it work.
i have created a security group in AWS that has open the 8787 and 6219
ports, the former for RStudio and the latter to access the shiny app.
this is the command-line output from my desktop interrogating how the
security group is configured:
$ aws ec2 describe-security-groups --group-names test | ./JSON.sh -b
["SecurityGroups",0,"Description"] "test"
["SecurityGroups",0,"IpPermissions",0,"ToPort"] 22
["SecurityGroups",0,"IpPermissions",0,"IpProtocol"] "tcp"
["SecurityGroups",0,"IpPermissions",0,"IpRanges",0,"CidrIp"] "0.0.0.0/0"
["SecurityGroups",0,"IpPermissions",0,"FromPort"] 22
["SecurityGroups",0,"IpPermissions",1,"ToPort"] 3838
["SecurityGroups",0,"IpPermissions",1,"IpProtocol"] "tcp"
["SecurityGroups",0,"IpPermissions",1,"IpRanges",0,"CidrIp"] "0.0.0.0/0"
["SecurityGroups",0,"IpPermissions",1,"FromPort"] 3838
["SecurityGroups",0,"IpPermissions",2,"ToPort"] 6219
["SecurityGroups",0,"IpPermissions",2,"IpProtocol"] "tcp"
["SecurityGroups",0,"IpPermissions",2,"IpRanges",0,"CidrIp"] "0.0.0.0/0"
["SecurityGroups",0,"IpPermissions",2,"FromPort"] 6219
["SecurityGroups",0,"IpPermissions",3,"ToPort"] 8787
["SecurityGroups",0,"IpPermissions",3,"IpProtocol"] "tcp"
["SecurityGroups",0,"IpPermissions",3,"IpRanges",0,"CidrIp"] "0.0.0.0/0"
["SecurityGroups",0,"IpPermissions",3,"FromPort"] 8787
i have updated the shiny-server in the bioc AMI to the lastest version.
this is the command-line output from the AWS instance running the bioc AMI:
$ tail -n 5 /var/log/shiny-server.log
0[2014-05-21 13:37:59.867] [INFO] shiny-server - Shiny Server
v1.1.0.10000 (Node.js v0.10.21)
[2014-05-21 13:37:59.888] [INFO] shiny-server - Using pidfile
/var/run/shiny-server.pid
[2014-05-21 13:37:59.891] [INFO] shiny-server - Using config file
"/etc/shiny-server/shiny-server.conf"
[2014-05-21 13:37:59.950] [WARN] shiny-server - Running as root
unnecessarily is a security risk! You could be running more securely as
non-root.
[2014-05-21 13:37:59.954] [INFO] shiny-server - Starting listener on
0.0.0.0:3838
i connect to R studio through the 8787 port and then i do the following
using the code from the example of the 'runApp()' man page:
library(shiny)
runApp(list(
ui = bootstrapPage(
numericInput('n', 'Number of obs', 100),
plotOutput('plot')
),
server = function(input, output) {
output$plot <- renderPlot({ hist(runif(input$n)) })
}
), host="ec2-xx-xx-xx-xx.compute-1.amazonaws.com", port=6219)
where "ec2-xx-xx-xx-xx.compute-1.amazonaws.com is the public DNS of my
instance.
the server starts fine with the message "Listening on http://ec2-xx
..etc", however, the window opens directly with the error message "The
system returned: (111) Connection refused"
if instead of using the public DNS as host i use the IP address in the
"inet addr" field from the eht0 entry of the 'ifconfig' unix command it
gives a "timeout" after a few minutes and if i use the IP address
resulting from concatenating xx.xx.xx.xx in the public DNS name then it
says "Failed to create server".
to make it more puzzling if i connect with the browser to the port 3838
of the public DNS server, i.e.,
ec2-xx-xx-xx-xx.compute-1.amazonaws.com:3838 then it says "Welcome to
Shiny Server!" and the example app works perfectly.
so it seems that i'm doing something wrong when starting the server from
RStudio via runApp().
i've been googling a lot and i think i have everything in place so i
wonder whether something might be wrong in how the bioc AMI is
configured. before i updated the shiny-server even the last option
wasn't working, but i don't know what else could i do system-wide to try
to fix this problem.
any hint will be very much appreciated,
thanks!!
robert.
More information about the Bioc-devel
mailing list