shiny server stops immediately on starting and no shiny-server log file generated

My shiny server app launches and stops. I can see the first screen in the background that is greyed out. This is a normal situation when the app aborts and we usually examine the run time error in the log file. But not here. There is no log file getting generated for this specific app.
To find the log file the usual way is, on the terminal of the ubuntu machine we type:

ls -lt /var/log/shiny-server/ |head

The last changed files comes at the top,

rstudio@ip-172-31-30-19:~/nlp$ ls -lt /var/log/shiny-server/ |head - 3

outputs the following

-rw-r----- 1 shiny   shiny     1385 Jun 29 21:51 cdu-shiny-20200629-215133-46368.log
-rw-r----- 1 shiny   shiny     1385 Jun 29 21:26 cdu-shiny-20200629-212604-42032.log
-rw-r----- 1 shiny   shiny      546 Jun 29 21:24 cdu-shiny-20200629-212448-40111.log

The app that I am firing is sym linked by the name annotate as can be seen as a sym link in the server directory.

Let's have a look at the server directory.

rstudio@ip-172-31-30-19:/srv/shiny-server$ ls -l

> lrwxrwxrwx 1 rstudio shiny-apps 34 Feb  3  2019 admin -> /home/rstudio/ShinyApps/poll/admin
> lrwxrwxrwx 1 rstudio shiny-apps 26 Dec 10  2018 annotate -> /home/rstudio/nlp/annotate
> lrwxrwxrwx 1 rstudio shiny-apps 31 Jan 28  2019 casper -> /home/rstudio/ShinyApps/casper/
> lrwxrwxrwx 1 root    shiny-apps 17 Jan 28 19:16 cdu -> /home/rstudio/cdu
> lrwxrwxrwx 1 shiny   rstudio    29 Jan 28 18:28 embassy -> /home/rstudio/embassy/reports
> lrwxrwxrwx 1 rstudio shiny-apps 38 Oct 16  2017 index.html -> /opt/shiny-server/samples/welcome.html
> lrwxrwxrwx 1 rstudio shiny-apps 17 Dec 10  2018 nlp2 -> /home/rstudio/nlp
> lrwxrwxrwx 1 rstudio shiny-apps 33 Feb  3  2019 poll -> /home/rstudio/ShinyApps/poll/user
> lrwxrwxrwx 1 rstudio shiny-apps 37 Dec 10  2018 sample-apps -> /opt/shiny-server/samples/sample-apps
> lrwxrwxrwx 1 rstudio shiny-apps 28 Feb 15  2019 test -> /home/rstudio/ShinyApps/test

All the apps in the server directory are running except the "annotate" app. And all apps are generating log files except the annotate app.

Is there some config that is getting missed somewhere that is needed to generate and preserve the log file.

Here is the shiny server config file for reference.

rstudio@ip-172-31-30-19:/srv/shiny-server$ cat /etc/shiny-server/shiny-server.conf 
# Define the user we should use when spawning R Shiny processes
preserve_logs true; 
run_as :HOME_USER: shiny;

# Define a top-level server which will listen on a port
server {
  # Instruct this server to listen on port 3838
  listen 3838;

  # Define the location available at the base URL
  location / {
    #### PRO ONLY ####
    # Only up tp 20 connections per Shiny process and at most 3 Shiny processes
    # per application. Proactively spawn a new process when our processes reach 
    # 90% capacity.
#    utilization_scheduler 20 .9 3;
    #### END PRO ONLY ####

    # Run this location in 'site_dir' mode, which hosts the entire directory
    # tree at '/srv/shiny-server'
    site_dir /srv/shiny-server;
    
    # Define where we should put the log files for this location
    log_dir /var/log/shiny-server;
    
    # Should we list the contents of a (non-Shiny-App) directory when the user 
    # visits the corresponding URL?
    directory_index on;
  }
}

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