One of my Shiny applications is not running on my server

Asked

Viewed 287 times

3

I recently installed Shiny on a server I have. This can be checked by clicking at this link. I would like to put on this server several applications that I have done and still intend to do, as if it were the Shiny gallery on the Rstudio website.

However, I can’t get my first application to work. It runs locally on my PC and on shinyapps.io, but it does not run on my own server. I am not sysadmin, so my knowledge in server management is quite limited.

Something I noticed was that the Shiny applications that appear in the server test link are located inside the folder /srv/shiny-server/sample-apps. So I can access them with the links http://177.20.146.204/sample-apps/hello and http://177.20.146.204/sample-apps/rmd.

Come to think of it, I copied the files global.R, imdb.R, LICENSE, list.R, README.md, server.R and ui.R, all necessary for my application, for the folder /srv/shiny-server/sample-apps/IMDb2. But when I access the link http://177.20.146.204/sample-apps/IMDb2/, I receive the following message:

An error has occurred

The application failed to start.

The application exited during initialization.

Apparently, all file and folder permissions are correct:

$ ls
total 4.0K
drwxr-xr-x. 2 root root   32 Oct  6 13:40 hello
drwxr-xr-x. 3 root root 4.0K Nov  7 09:56 IMDb2
drwxr-xr-x. 2 root root   22 Oct  6 13:40 rmd

That said, my questions are

  1. How to make this specific application of mine run?

  2. How can I put my apps on a more user friendly link, such as http://177.20.146.204/hello, without the sample-apps snippet that is required with the current configuration?

  • 1

    Remove the directory sample-apps, that is, upload your apps to shiny-server, thus solves the problem of friendly.

  • 1

    As for permissions, I don’t think you have problems, but compare with other directories (apps).

  • 1

    I didn’t have all the necessary packages installed on the server. This was the problem.

  • 1

    @What about posting your solution as an answer to users facing similar problems in the future? There is not much documentation on shiny server in Portuguese

  • The problem was not related to any permission in the files or in the location of my folder. I had not installed some of the packages needed for my application. Therefore, Shiny reported The application failed to start., but did not indicate that the problem was the lack of packages. I installed them and everything went as it should.

  • @Tomásbarcellos good idea. I just did this.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.