Shiny Server Error: spawn R EACCES (version v1.5.14.948)

Hello,

Has anyone encountered this error within /var/log/shiny-server.log before?

[2020-08-24T13:35:26.344] [INFO] shiny-server - Shutting down worker processes (with notification)
/opt/shiny-server/lib/main.js:387
throw err;
^

Error: spawn R EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'EACCES',
code: 'EACCES',
syscall: 'spawn R',
path: 'R',
spawnargs: [
'--no-save',
'--slave',
'-f',
'/opt/shiny-server/R/SockJSAdapter.R'
]
}

We have followed this:

and
https://docs.rstudio.com/shiny-server/

Thanks
Stuart

Once trace logging was turned on, we could see this error was proceeded by messages such as:

[2020-08-25T13:20:26.436] [TRACE] shiny-server - Attempting to connect to port 42685
[2020-08-25T13:20:26.437] [TRACE] shiny-server - Failed to connect to port 42685
[2020-08-25T13:20:26.442] [WARN] shiny-server - Unable to write to Shiny process. Attempting to kill it.
[2020-08-25T13:20:26.442] [TRACE] shiny-server - Sending SIGINT to null
[2020-08-25T13:20:26.443] [TRACE] shiny-server - Failure sending SIGINT: TypeError [ERR_INVALID_ARG_TYPE]: The "pid" argument must be of type number. Received null
[2020-08-25T13:20:26.444] [ERROR] shiny-server - Uncaught exception: Error: spawn R EACCES
[2020-08-25T13:20:26.444] [ERROR] shiny-server - Error: spawn R EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

So the problem related to a specific shiny app, rather than a system issue.

The fix was to add the following two lines to the /etc/shiny-server/shiny-server.conf file within the server { parameters:

app_init_timeout 500;
app_idle_timeout 500;

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.