...
I'm trying to run a shiny dashboard on an Ubuntu 16 aws ec2 and the sample is partially working: it shows the dashboard controls but and error message instead of the graphs.
Error log out put at /var/log/shinyserver:
Listening on http://127.0.0.1:35434
Warning in pngfun(filename = filename, width = width, height = height, res = res, :
unable to open connection to X11 display ''
Warning: Error in .External2: unable to start device PNG
123: pngfun
122: startPNG
121: drawPlot
107: <reactive:plotObj>
91: drawReactive
78: origRenderFunc
77: output$distPlot
1: runApp
From shiny-server.conf at /etc/shiny-server:
# Instruct Shiny Server to run applications as the user "shiny"
run_as ubuntu;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
I tried a few packages prior to R installation: xorg-dev and libx11-dev But they didn't help.
I also tried editing Rprofile.site with options(bitmapType='cairo') but that was also ineffective.