Comments (14)
@timcdlucas Yes, httr assumes port 1410 is free. If this happens again you can use sudo lsof -i :1410
(I think) to see what process is using it.
from httpuv.
Have you compared your library(httr); library(httpuv); sessionInfo()
with that person?
from httpuv.
@yihui not yet, I'll ask
from httpuv.
Here's @timcdlucas session info
R version 3.1.1 (2014-07-10)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] httr_0.4
loaded via a namespace (and not attached):
[1] digest_0.6.4 httpuv_1.3.0 Rcpp_0.11.2 RCurl_1.95-4.3 stringr_0.6.2
I have the same pkg versions of httr
and httpuv
from httpuv.
cc @hadley
from httpuv.
Maybe it's a security issue?
from httpuv.
I'll look into that
from httpuv.
@sckott The port 1410 might have already been used, or requires admin privilege in his system. @hadley shiny tries a series of random ports and you can probably do the same in httr: https://github.com/rstudio/shiny/blob/ab1494777d3b5d943a00502b21e6832467887524/R/server.R#L655-L683
from httpuv.
This might be relevant:
r-lib/httr#120
Scott, can you get your user to try both of these commands, separately?
shiny::runExample("01_hello")
shiny::runExample("01_hello", port=1410)
from httpuv.
@yihui Thanks. I'll ask him about 1410
@jcheng5 Thanks. I'll have him try that. He's in the UK, so response tomorrow probably...
from httpuv.
@yihui unfortunately I can't do that because I need a determinstic url for OAuth
from httpuv.
@yihui I ran R as sudo R and still had the same errors.
@jcheng5 Hi. Yes runExample("01_hello") works but shiny::runExample("01_hello", port=1410) doesn't. shiny::runExample("01_hello", port=1450) did work so I think it is just a port issue.
I restarted my computer and it seems to work now. Is this quite fragile then? i.e. if someone else happens to be using port 1410 they will get the same, fairly opaque error?
Thanks for the help everyeone!
from httpuv.
thanks @jcheng5
from httpuv.
Hey - i'm running into issues here with packages like googlesheets and rdfp that seem to use httrpuv for the oauth.
Here is some output from some some commands:
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.1
And:
> shiny::runExample("01_hello")
Loading required package: shiny
Listening on http://127.0.0.1:6838
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:6838'
And:
> shiny::runExample("01_hello", port=1410)
Loading required package: shiny
Listening on http://127.0.0.1:1410
Error in startServer(host, port, handlerManager$createHttpuvApp()) :
Failed to create server
Does this just mean that the port is blocked - is there any way to know what port is going to be used before i make the call and kill that pid in advance (feels ugly).
Or do you see anything above that might suggest something else is going on?
Cheers - am kinda struggling with this one given a lot of what is going on is abstracted so far away from where i call it.
My real problem is that when i run:
> library(googlesheets)
> gs_auth()
Error in httpuv::startServer(use$host, use$port, list(call = listen)) :
Failed to create server
>
Was trying to use the shiny example as a reproducible error.
from httpuv.
Related Issues (20)
- staticPath logging HOT 1
- HTTP/2 support HOT 2
- Random crashes on MacOS HOT 16
- Unable to install httput - R 4.2.2 HOT 3
- Warning with clang 16 HOT 2
- Possible to use multiple worker threads? HOT 2
- Unable to install httpuv - R 3.5.3 HOT 2
- macOS: Assertion fails when closing `{httpuv}` server HOT 2
- CRAN firedrill 2023-05 HOT 4
- clang-ASAN: "runtime error: applying zero offset to null pointer"
- httpuv v1.6.11 release checklist HOT 1
- httpuv 1.6.10 crashes with "uv__finish_close: Assertion `handle->flags & UV_HANDLE_CLOSING' failed" HOT 4
- Don't dynamically link to libuv on macOS
- CI workflows for sanitizers HOT 1
- Simple server API HOT 1
- Heartbeat in discord HOT 1
- Compile error with clang on WIndows HOT 1
- Release httpuv 1.6.12
- warning: format string is not a string literal
- Release httpuv 1.6.13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpuv.