-
Notifications
You must be signed in to change notification settings - Fork 71
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
Error occurred when launching bundle server: ensureAlive failed #189
Comments
@snoyberg, @creichert, I'm fairly stumped but will try deploying an unaltered scaffold, and try deploying with a domain name (rather than a static IP) later today. Do either of you know what the issue might be? |
I looked at this for a little bit, and I'm not 100% sure, sorry. Maybe
@tolysz has an idea.
This part of Keter has been quite stable for some time and your app
looks like it's loaded correctly. I would try a few other options as you
mentioned to sanity check a real domain name.
Please report back.
|
Ah, did you check into the the app possible crashing after the
migrations? Are you running the migrations using Keter or through your
app?
|
Thanks for following up @creichert - my Yesod app is using SQLite and does the migrations itself without Keter when running locally. The "migrations" above are just it creating the tables in the database for the first time. I don't have any reason to believe that it is crashing based on the output above, and it doesn't crash when run locally with Stack. Do you know of any way to find out for sure? |
So I got a domain name, changed keter.yml accordingly, redeployed, and the results were the same. Next I'll try deploying the Yesod SQLite scaffold with this domain name and see if that helps. |
I'm thinking... the domain name / "not found" might not be the core issue.
Are you dynamically reading the `PORT` environment variable in your app?
Can you add some logging for your application immediately after the
migration run to sanity check what point it's getting to?
This doesn't happen often, so I'm still leaning towards the app not
communicating with Keter in some fashion. Even if your app isn't failing
locally, it would help to have an idea of what it does after the migration.
|
@creichert, in order to get away from the specifics of my app, I tried deploying the Yesod SQLite Scaffold, with similar results. It seems that after two minutes the application gets killed by Warp's timeout reaper, but I don't know why that would be.
|
The log files with the Yesod SQLite scaffold are the same as before, but with fewer tables created by the application. |
Does your app read and use the `PORT` environment variable required by
Keter? The yesod-scaffold appears to only read YESOD_PORT env var.
Sorry you're having trouble getting everything setup. If we can figure
out what the problem is, I'm sure we can find a way to ensure this is
documented/fixed for future users.
|
@creichert my app didn't make any changes in this regard: it uses the YESOD_PORT same as the scaffold |
I am going to try deploying after changing this to |
@creichert, thank you so very much, it works! |
A terrible issue that took a long time to find... snoyberg/keter#189
I think it might be worth changing the Yesod scaffold to work with Keter out of the box. |
I agree and the Yesod scaffold used to do this by default. It was likely
overlooked as the PORT env var is something that is frequently added by
default without further thought.
If you have time, it would be great if you could review the Keter
README, and ensure your problem is at least somewhat mentioned. I'd
definitely be happy to receive documentation pull requests.
I also encourage you to open an issue with the Yesod Scaffold repo. I
think the YESOD_PORT var is used by the yesod cli tools, so I wouldn't
immediately create a PR.
|
Thank you @SongWithoutWords for tracking down this problem! I overlooked your change in the README because I read the Bundle section and then only used |
I'm having trouble deploying a Yesod app with Keter on a Ubuntu 18.04 VM hosted by Google Cloud Platform, using the sqlite scaffold as a jumping off point. I compiled both the Yesod app and Keter on my own machine, running the same version of Ubuntu.
When I visit the IP of my site, I am greeted by:
It seems that the Yesod App has timed out after a minute, based on the contents of
/opt/keter/log/keter/current.log
:The contents of `/opt/keter/log/app-server/current.log are as follows (it doesn't seem like the app is crashing):
The contents of the /opt/keter directory are :
The contents of
opt/keter/keter-config.yaml
are (I've tried both with and without the port):The contents of
config/keter.yml
are:Does anyone have any ideas?
The text was updated successfully, but these errors were encountered: