Error getting worker: Error: The application exited during initialization.

1,723 views
Skip to first unread message

Stefan Petersson

unread,
Sep 9, 2017, 3:08:26 AM9/9/17
to Shiny - Web Framework for R
I used this doc to install the shiny-server from source. And everything seems to work. When I start the server (from the command line) I get:

[2017-09-09 08:53:08.958] [INFO] shiny-server - Shiny Server v1.5.4.0 (Node.js v6.10.3)
[2017-09-09 08:53:08.961] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2017-09-09 08:53:08.997] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2017-09-09 08:53:09.000] [INFO] shiny-server - Starting listener on 0.0.0.0:3838


which looks good. Besides the warning... 

But when I try to run one of the example apps I turn to one of the clients on the LAN and type http://192.168.1.254:3838/01_hello in the address field. I get no love:

An error has occurred
The application failed to start.
The application exited during initialization.

Turning to the server again, I see a repeated error message added to the console:

[2017-09-09 08:53:08.958] [INFO] shiny-server - Shiny Server v1.5.4.0 (Node.js v6.10.3)
[2017-09-09 08:53:08.961] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2017-09-09 08:53:08.997] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2017-09-09 08:53:09.000] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
[2017-09-09 08:57:21.984] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.
[2017-09-09 08:57:22.575] [INFO] shiny-server - Error getting worker: Error: The application exited during initialization.

However, directory listing works, so the server seems to be up an running? I've tried changing ownership and chmod 555 on the apps but no change. Also tried to with another user in the shiny-server log file.

Another strange behavior is that the app log files are created but empty. And the server log file /var/log/shiny-server.log don't even exist.

Dependencies while building:

Python 2.7.13
cmake version
3.7.2
gcc
(Debian 6.3.0-18) 6.3.0
g
++ (Debian 6.3.0-18) 6.3.0

My sessionInfo()

R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)


locale
:
 
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 
[5] LC_MONETARY=sv_SE.UTF-8    LC_MESSAGES=en_US.UTF-8  
 
[7] LC_PAPER=sv_SE.UTF-8       LC_NAME=C                
 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=sv_SE.UTF-8 LC_IDENTIFICATION=C      


attached
base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    


other attached packages
:
[1] shiny_1.0.5


loaded via a
namespace (and not attached):
[1] R6_2.2.2        htmltools_0.3.6 Rcpp_0.12.12    digest_0.6.12  
[5] xtable_1.8-2    httpuv_1.3.5    mime_0.5      

The standard shiny-server.conf:

run_as shiny;
server
{
  listen
3838;
  location
/ {
    site_dir
/srv/shiny-server;
    log_dir
/var/log/shiny-server;
    directory_index on
;
 
}
}


Misc info:

netstat --tcp -a -n -p | grep 3838
tcp        
0      0 0.0.0.0:3838            0.0.0.0:*               LISTEN      21380/shiny-server  


uname -a
Linux tatooine 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux


Message has been deleted

Stefan Petersson

unread,
Sep 9, 2017, 3:47:20 AM9/9/17
to Shiny - Web Framework for R
Starting shiny-server as shiny user solved it:

su shiny
shiny
-server

Reply all
Reply to author
Forward
0 new messages