Open PilotGtec opened 9 years ago
The addition of +marked lines in /etc/nginx/conf.d/your.conf
location /rshiny/ {
rewrite ^/rshiny/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:3838;
proxy_redirect http://127.0.0.1:3838/ $scheme://$host/rshiny/;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
}
and in /etc/nginx/nginx.conf
http {
+ proxy_read_timeout 950s;
+ map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+ }
}
and the latest nginx solved the problem for me.
Thank you, @Vladicon. I just implemented and added those three lines in the conf file, but still no dice.
Did you update nginx? Try to use version 1.9.1 from http://nginx.org/en/linux_packages.html#stable
WebSockets are well supported in the latest nginx versions.
Personally I don't use https, but if you do, then WebSockets address should start with wss://
@Vladicon I tried the exact steps you suggested again and it's working now. Thanks!
Was this causing connection problems for your application? Or just the spurious log message in the console?
The connection library we use (SockJS) prefers WebSockets but if you're unable to make a connection (as in your case), it has a variety of other protocols to which it can fallback, so it is safe to ignore that message if you so desired. If you know that you were behind a proxy that didn't support WebSockets, you could even disable them on the server so that you wouldn't see that message.
I am very new to R and Shiny-server as well. I have installed the shiny-server and tried to run an example app from R-Studio but I am facing the same issue now. WebSocket connection to 'ws://...:7072/websocket/' failed: Error during WebSocket handshake: Unexpected response code: 503. I can only see the range filter but chart is not coming up. Where as i can see the chart and range filter properly in the default app that starts with shiny-server
The requested url from shiny-server default app is ws://...:7071/sample-apps/hello/sockjs/n=QaJOCCahR3pxU0zwzz/775/am8akd7b/websocket
where as the requested url from the app started from R-Studio is ws://...:7072/websocket/
I started the app in R-studio using the following command runExample("01_hello",port = 7072,host = getOption("shiny.host", "IP of the machine"))
Thanks @Vladicon I used your step and it also worked :)
Hi, I just deployed my app on an amazon server and using Nginx. I am getting the following error
I can't seem to find any solution online. When I run the app on my local machine, everything runs smoothly.
Below is the
sessionInfo()
.Would appreciate any suggestion on how I should attack and troubleshoot the problem.
Thanks.