App deploys successfully but I get "ERROR: cannot open the connection"

87 views
Skip to first unread message

Steven Ranney

unread,
Sep 9, 2014, 12:02:36 AM9/9/14
to shinyap...@googlegroups.com
I think Shiny is a great platform and look forward to using it quite a bit in the future.  I've deployed two apps thus far (just testing everything out) but today when I tried to deploy an app that runs successfully locally, I get "ERROR: cannot open the connection" after the app is deployed.

I can't tell what's wrong: everything is in the working directory, including the sourced function and I received no errors during deployment. Output from deployApp() is:

> deployApp()
Preparing to deploy application...DONE
Uploading application bundle...DONE
Deploying application: 19458...
Waiting for task: 1407047
  building: Building image: 48851
  building: Installing packages
  building: Installing files
  building: Pushing image: 48851
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to http://stevenranney.shinyapps.io/craps


Any help?  This is mostly a learning exercise for me so not truly important in the grand scheme of things but I'm curious as to why it's not deploying successfully.

Thanks - 

SR

Tareef Kawaf

unread,
Sep 9, 2014, 7:19:25 AM9/9/14
to Steven Ranney, shinyap...@googlegroups.com
Hi Steven,
Glad you are looking at Shiny, hopefully we can get this issue resolved for you quickly.  Without visibility into the code or the error log, it is hard to guess at exactly what is going on, but I suspect your application is trying to open a connection to a resource that is either not bundled in with the application, or perhaps is behind a firewall.  
Would you mind sharing the output of showLogs() with us?

Thanks,
Tareef


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/f726939a-438c-45d8-b4dd-0d66fcc00a09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Ranney

unread,
Sep 9, 2014, 9:54:04 AM9/9/14
to shinyap...@googlegroups.com, steven...@gmail.com
Tareef - 

Thanks for the tip on the showLogs() function.  I discovered I had an issue with the naming of an external function.  It was a ".r" vs. ".R" issue and Shiny couldn't find the function with the ".r" extension.  After the change, the app deployed and is working successfully.

Thanks for the tip.  Again, the app is working successfully now.

SR

For consistency, the output from showLogs() is below.

> showLogs()
2014-09-09T03:55:47.675325+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T03:55:47.675460+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T03:55:47.675507+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T03:55:52.683385+00:00 shinyapps[shuttle]: 
2014-09-09T03:55:52.708457+00:00 shinyapps[shuttle]: 
2014-09-09T03:55:52.683829+00:00 shinyapps[shuttle]: Execution halted
2014-09-09T03:55:52.709147+00:00 shinyapps[shuttle]: 
2014-09-09T03:59:17.936322+00:00 shinyapps[shuttle]: 
2014-09-09T03:59:17.936476+00:00 shinyapps[shuttle]: Listening on http://127.0.0.1:48971
2014-09-09T03:59:18.047724+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T03:59:18.047865+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T03:59:18.047694+00:00 shinyapps[shuttle]: Warning in file(filename, "r", encoding = encoding) :
2014-09-09T03:59:18.047925+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T03:59:23.054528+00:00 shinyapps[shuttle]: 
2014-09-09T03:59:23.081804+00:00 shinyapps[shuttle]: 
2014-09-09T03:59:23.055289+00:00 shinyapps[shuttle]: Execution halted
2014-09-09T03:59:23.082476+00:00 shinyapps[shuttle]: 
2014-09-09T04:29:42.601450+00:00 shinyapps[shuttle]: 
2014-09-09T04:29:42.601648+00:00 shinyapps[shuttle]: Listening on http://127.0.0.1:51336
2014-09-09T04:29:42.657053+00:00 shinyapps[shuttle]: Warning in file(filename, "r", encoding = encoding) :
2014-09-09T04:29:42.657117+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T04:29:42.657258+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T04:29:42.657300+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T04:29:47.663800+00:00 shinyapps[shuttle]: 
2014-09-09T04:29:47.690717+00:00 shinyapps[shuttle]: 
2014-09-09T04:29:47.664496+00:00 shinyapps[shuttle]: Execution halted
2014-09-09T04:29:47.691358+00:00 shinyapps[shuttle]: 
2014-09-09T04:32:43.636027+00:00 shinyapps[shuttle]: 
2014-09-09T04:32:43.636178+00:00 shinyapps[shuttle]: Listening on http://127.0.0.1:36747
2014-09-09T04:32:43.760303+00:00 shinyapps[shuttle]: Warning in file(filename, "r", encoding = encoding) :
2014-09-09T04:32:43.760335+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T04:32:43.760434+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T04:32:43.760488+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T04:32:48.769018+00:00 shinyapps[shuttle]: Execution halted
2014-09-09T04:32:48.796898+00:00 shinyapps[shuttle]: 
2014-09-09T04:32:48.768263+00:00 shinyapps[shuttle]: 
2014-09-09T04:32:48.796094+00:00 shinyapps[shuttle]: 
2014-09-09T11:17:10.543821+00:00 shinyapps[shuttle]: 
2014-09-09T11:17:10.543966+00:00 shinyapps[shuttle]: Listening on http://127.0.0.1:38790
2014-09-09T11:17:10.668062+00:00 shinyapps[shuttle]: Warning in file(filename, "r", encoding = encoding) :
2014-09-09T11:17:10.668110+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T11:17:10.668264+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T11:17:10.668315+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T11:17:15.347013+00:00 shinyapps[shuttle]: Warning in file(filename, "r", encoding = encoding) :
2014-09-09T11:17:15.347026+00:00 shinyapps[shuttle]:   cannot open file 'rollCraps.r': No such file or directory
2014-09-09T11:17:15.347168+00:00 shinyapps[shuttle]: Error in file(filename, "r", encoding = encoding) : 
2014-09-09T11:17:15.347214+00:00 shinyapps[shuttle]:   cannot open the connection
2014-09-09T11:17:20.354414+00:00 shinyapps[shuttle]: 
2014-09-09T11:17:20.377543+00:00 shinyapps[shuttle]: 
2014-09-09T11:17:20.355088+00:00 shinyapps[shuttle]: Execution halted
2014-09-09T11:17:20.378248+00:00 shinyapps[shuttle]: 

Andy Kipp

unread,
Sep 9, 2014, 10:53:05 AM9/9/14
to Steven Ranney, shinyap...@googlegroups.com
Steven.

I am glad it's working. ShinyApps servers run Linux which uses a case-sensitive file system. Users on Mac OSX (and Windows I believe) may run into issues like this. We should perhaps put this in the documentation. 

-Andy


Steven Ranney

unread,
Sep 9, 2014, 10:55:32 AM9/9/14
to Andy Kipp, shinyap...@googlegroups.com
Andy - 

Looking for case issues should have been my first thought!  It just didn't even occur to me though I've dealt with that very issue during package development.  I was just in a hurry yesterday and wasn't thinking.

I'm running Windows XP and I had the case-sensitive issue.

Thanks again - 

SR

Steven H. Ranney
Reply all
Reply to author
Forward
0 new messages