I having a sticky old question , I just took a project from someone left , there was an app running with shiny server , but now from days I see disconnected from server , I browsed the network trying to find a solution but was not able to find out, even by topics from here
I dont have updates on logs
the only thing I see , that rmarkdown package is installed but the default page [local-ip]:3838 is showing that box in the right still missing rmarkdown poackage , loading the app is giving disconnected from server ..
I dont know if something can help me find ouyt what ?
You are not providing enough information for us to be able to help you. We need to see the app's logs to have an idea of what might be going on.
About shiny-server not being able to load rmarkdown files. This might be happening because rmarkdown is not installed system wide and the shiny user does not have access to it. You need to install R packages system wide in order for shiny apps to be able to use them.
Have you modified the run_as option in your shiny-server config file? Can you show the complete output of running sudo su - -c "R -e "install.packages('rmarkdown', repos='http://cran.rstudio.com/')"" in a system terminal?
BTW, please do not post screenshots of your terminal, they are considered a bad practice here, post the output as formatted code instead. Here is how to do it
It might be a permissions issue with the site-library folder, just to test my theory can you set the folder permissions to 777 just for a quick test?
sudo chmod 777 -r /usr/lib/R/site-library
Another possibility is that for some reason the .libPaths() of the shiny user are pointing to a different location but I can't think of an easy way to test that other than printing the .libPaths() in your app itself.
That is a generic message you get on the app client when the app crashes on the server, we would need to see the logs to have a clue of what is going on. Each app generates a log file in the /var/log/shiny-server/ folder when the app is running, if the app crashes, the file is kept.
Those logs are not very informative, I don't see an evident reason. I would explore the possibility that your RDBMS or some network security feature in your server might be closing the connection on its side.
I don't have experience debugging shiny apps on the client side but if you know your way around HTML and Javascript you could inspect the console on the client's browser to get more information.
If you can run the app interactively from RStudio you could also try to debug following this guideline
I have some few updates if you can assume something
I had upgraded R to latest 4.2 and shiny server too
I have them working with no issues and also on the sample default page everything is working even that part which require markdown package installed
but the app still not loading
trying to excute server.R giving shiny@bims:/srv/shiny-server/APP$ ./server.R ./server.R: ligne 4: erreur de syntaxe prÚs du symbole inattendu « XML » ./server.R: ligne 4: `require(XML)'
running R and checking XML and other required packages shiwing that they exist ... can you wonder if there is a mistake here ? do I change packages path to another shared location ? knowing that I tryed with chmod 777 at /usr/lib/R...
This is not meant to be executed from the terminal but the syntax warning makes me think on a possible encoding issue, are you able to share a link to your app files so I can take a look?
Encoding seems to be OK but the library calls are a mess, there are a bunch of duplicated and commented library calls in both app files, and maybe that is causing the problem. I would start by tidying up the library calls and avoid using require(), use library() instead.