0

Same question as here: https://support.openanalytics.eu/t/retrieve-log-files-of-shiny-session-when-launched-on-shinyproxy/494?u=mimaque

I launch the .jar executable, everything works but some errors happen when doing some actions inside the shiny app. I want to see those logs, because I cannot figure out why it's not working. Normal debugging methods are not throwing the error, hence, I'd like to see the logs...

Miguel M.
  • 251
  • 1
  • 3
  • 15
  • try `docker log container_name` – trigun117 Mar 08 '18 at 10:49
  • the command is `docker logs container_name`, but I cannot retrieve the container name because it dissapears after I close the Spring boot app from the `.jar` file – Miguel M. Mar 08 '18 at 11:06
  • try to run container with this flags `-itd` and then try again – trigun117 Mar 08 '18 at 11:11
  • @trigun117 you mean run `java -jar shinyproxy-1.0.2.jar -itd` ? I see no differences on the console logs... If you mean `run docker -itd imagename .` that doesn't work because i cannot access the port on my local ip address. I think that has to do with the Docker file line `CMD ["/usr/bin/shiny-server.sh"]` – Miguel M. Mar 08 '18 at 11:26
  • you can attach container port to host port using `-p 8080:8080` – trigun117 Mar 08 '18 at 11:35
  • i ran it with that and it worked perfectly... so something is happening when i execute it inside the jarfile... i deleted a line (write.csv) and some prints inside `server.R`... and it worked! So apparently something was causing a conflict there... the only caveat here is that I still cannot access the logs, even after attaching to 8080 – Miguel M. Mar 08 '18 at 12:41
  • Maybe because application is not configure to send logs – trigun117 Mar 08 '18 at 12:43

1 Answers1

0

Use docker run -itd -p 8080:8080 image_name

Also yo can use -v to share direcory with logs to local machine like this:

docker run -itd -p 8080:8080 -v host/folder/for/logs:/container/folder/with/logs image_name
trigun117
  • 639
  • 7
  • 21