Dependency Help

I am not familiar with R or Shiny, but I am helping to get ShinyProxy working. We are successful with very basic apps but when I try to incorporate data from our Postgres database, I am getting the famous 500 error. The server.R file contains:
…which leads me to believe I have a dependency problem in my DockerFile. Can anybody help me understand what is missing? My image is getting huge with my shotgun approach trial and error.

1 Like

Dependencies do often cause problems with the Docker container. The best way to troubleshoot is to first run the docker container outside of Shiny proxy.

docker run -p 3939:3838 -it hitfuture/ocio

This will show you errors associated with the R/shiny environment. Often I see that I didn’t install an R package which may have failed because it didn’t have a .deb package installed as a dependency.

If you see no errors in this context, the next level of debugging may be to trace any errors in the logs you can see in the shinyproxy environment. I run my local version of ShinyProxy on docker-compose which means there are over 6 containers running for the backend including ShinyProxy. To troubleshoot I run it from the command line to ensure that it is not an issue in Docker compose.

java -jar shinyproxy.1.1.0.jar

Often I have issues with networking within the containers since I have databases like Postrgresql and Neo4j running in containers. Troubleshooting this means that I’m tracing docker logs which is valuable.

Troubleshooting is important in this area and of course, and test driven development helps a lot. At my last company, we ran all of this against Travis CI which would handle dev and production deployments when tags were in place. I do recommend this is adopted in organizations as they go forward.


Warning: Error in : nanodbc/nanodbc.cpp:950: 01000: [unixODBC][Driver Manager]Can’t open lib ‘PostgreSQL ANSI(x64)’ : file not found

I’m assuming I am missing a package. I’m just trying to figure out which one.

We ended up replacing ODBC with a different connection method and that worked. Now onto troubleshooting the next one!