-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trouble debugging daemon=TRUE #8
Comments
I tested my own minimal Jekyll repo, and it worked. I tried to build your site, but it requires a few additional ruby gems that do not seem to be straightforward for me to install... |
okay, I can replicate the same problem with your minimal site; I guess a few more details are pertinent. I'm running inside docker, though not clear why that should cause The gems are already installed on my image, so inside the repo for your minimal image you can run:
This sets up RStudio on port 8787 and an open port on 4000. It links the current working dir to I then go into RStudio via http://localhost:8787 (login = rstudio:rstudio). Switch to the jeykll::serve(host='0.0.0.0', port=4000) and your site builds and displays on jeykll::serve(host='0.0.0.0', port=4000, daemon=TRUE) and the site builds but doesn't display. Weird, eh? Same problem occurs if we try this just on a bash shell on the container (e.g. take RStudio out of the mix). Works fine unless we have |
(minor edit to the above: I meant to write that when using |
If you are using docker, then I'm out of ideas. One thing you need to be careful is not to close the R session: daemon = TRUE relies on the R session; once the R session is closed, the daemonized server will be shut down. I do not quite see what the advantage is to use daemon = TRUE in your case. |
Yeah, I realize that; I'm not closing the R session. My idea is that a user should be able to just open RStudio, render the site by running I do this with docker, since as you noted dependencies aren't always a trivial thing, particularly with ruby in the mix. Guess I'll have to dig deeper into what you're doing with |
You can first check if the following minimal httpuv example works: httpuv::startDaemonizedServer("0.0.0.0", 4000, app = list(
call = function(req) list(
status = 200L,
headers = list(
'Content-Type' = 'text/html'
),
body = 'Hello World!'
)
)) If it does not, I guess I won't be able to help. |
Ah, thanks for the minimal example, that's helpful. With that I can see that the problem only occurs when run from RStudio, and works just fine outside of RStudio. Since this shows my problem is just related to whatever |
No worries. I guess even if you report to the httpuv repo, Joe is unlikely to investigate it soon. The hep page of |
I cannot get my site to load when I use
daemon=TRUE
and I'm not sure how to debug this one. If I omit that option, everything works just swanky.If I include
daemon=TRUE
, the site still builds as before, I get the identical terminal output plus the additional line:and of course I get my command prompt back, but as far as I can tell the server isn't running. Am I missing something or is
daemon=TRUE
not compatible withservr::jekyll
? fwiw, my site source is here https://github.com/cboettig/2015.The text was updated successfully, but these errors were encountered: