Proxy authentication error while setAccountInfo()

1,921 views
Skip to first unread message

Timm Suess

unread,
Feb 23, 2016, 10:16:34 AM2/23/16
to Shiny - Web Framework for R

I'm trying to connect from R to shinyapps.io behind a corporate firewall. I don't manage to authenticate my account via rsconnect::setAccountInfo.

Without setting any environment variables, I get a time-out:

> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in function (type, msg, asError = TRUE)  :
 
Failed to connect to api.shinyapps.io port 443: Timed out

After figuring out my proxy settings from the proxy configuration script, I have tried the following things:
  • set RCurlOptions:
> options(RCurlOptions = list(proxy = "http://my.proxy:my.port")
> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in function (type, msg, asError = TRUE)  : 
  Received HTTP code 407 from proxy after CONNECT

#same thing happens with the following settings:
> options(RCurlOptions = list(proxy = "userid:password@http://my.proxy:my.port")
> options(RCurlOptions = list(proxy = "DOMAIN\\userid:password@http://my.proxy:my.port")

  • Added entries to the .Renviron file (including reboot of R after each ):
export all_proxy=DOMAIN\\userid:password@http://my.proxy:my.port
export https_proxy=DOMAIN\\userid:password@
http://my.proxy:my.port

# in R console

> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in function (type, msg, asError = TRUE)  : 
  Failed to connect to api.shinyapps.io port 443: Timed out
Timing stopped at: 0 0.08 42.59 

 

http_proxy=http://my.proxy:my.port/
http_proxy_user=user:passwd

https_proxy=https://my.proxy:my.port/
https_proxy_user=user:passwd


> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in function (type, msg, asError = TRUE)  : 
  Received HTTP code 407 from proxy after CONNECT
  • Used unsecured  connection method:
options(shinyapps.service_url = "http://api.shinyapps.io/v1")

> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in function (type, msg, asError = TRUE)  : 
  Received HTTP code 407 from proxy after CONNECT

 Is there something I am missing?

Timm Suess

unread,
Feb 23, 2016, 11:20:22 AM2/23/16
to Shiny - Web Framework for R
Using internet2 (as suggested in ?rsconnect::rsConnectProxies) leads to another error:

> library(rsconnect)
> setInternet2(use = TRUE)
> options(rsconnect.http = "internal")

> rsconnect::setAccountInfo(name='...', token='...', secret='...')

Error in socketConnection(host = host, port = as.integer(port), open = "w+b",  : 
  cannot open the connection
In addition: Warning message:
In socketConnection(host = host, port = as.integer(port), open = "w+b",  :
  api.shinyapps.io:80 cannot be opened
Timing stopped at: 0 0.06 60.07 


Andy Kipp

unread,
Feb 25, 2016, 1:08:24 PM2/25/16
to Timm Suess, Shiny - Web Framework for R
Timm,

The 407 error implies the username or password is incorrect. It seems as though rsconnect package is talking to the proxy server, but the request is not being allowed through.

-Andy

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/33be15f4-b710-4239-ad48-37d103e2f551%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Timm Suess

unread,
Feb 26, 2016, 5:09:46 AM2/26/16
to Shiny - Web Framework for R
Problem solved - I used the following options combination, leaving out the domain information in the user name, which allowed me to tunnel through.

options(RCurlOptions = list(proxy = "PROXY:PORT", proxyuserpwd="USER:PWD", verbose = TRUE))
Reply all
Reply to author
Forward
0 new messages