Machine starts and stops right after

Here are the logs:

Event Logs
STATE   	EVENT	SOURCE	TIMESTAMP                    	INFO
stopped 	exit 	flyd  	2024-10-17T16:29:25.584+01:00	exit_code=1,oom_killed=false,requested_stop=false
started 	start	flyd  	2024-10-17T16:29:22.434+01:00
starting	start	user  	2024-10-17T16:29:21.115+01:00

Some context:
I have an app that’s built through GitHub action. The action was complaining it couldn’t connect to database (postgres). Tried a bunch of things yesterday. At some point I was getting “no active leader found” for all fly postgres commands.

The machine as in constant loop, would never start, checks would never finish:

mad [info][    1.789939] reboot: Restarting system
mad [info]2024-10-17T13:17:01.159505690 [01JAD9767W4HK9YK4JJH6VASG3:main] Running Firecracker v1.7.0
mad [info][    0.171744] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
mad [info][    0.415528] PCI: Fatal: No config space access function found
mad [info] INFO Starting init (commit: 04656915)...
mad [info] INFO Checking filesystem on /data
mad [info]/dev/vdc: clean, 19/2621440 files, 242389/10481664 blocks
mad [info] INFO Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
mad [info] INFO Resized /data to 42932895744 bytes
mad [info] INFO Preparing to run: `docker-entrypoint.sh start` as root
mad [info] INFO [fly api proxy] listening at /.fly/api
mad [info]2024/10/17 13:17:02 INFO SSH listening listen_address=[REDACTED]:22 dns_server=[fdaa::3]:53
mad [info]Provisioning standby
mad [info]panic: failed to resolve member over dns: lookup mad.my-app-db.internal on [fdaa::3]:53: no such host

Today I decided to destroy the machine, create a new one using the same volume. And that’s where the first logs come in. It starts and stops right after.

It may help to mention that this whole app was created and configured more than 1y ago and then scaled to zero until now. My reason was: let’s just configure everything and get this over with so that when my app is ready I can just deploy and enjoy. Guess what…

I’d be fine destroying the whole app if it would help. There’s no data in the volume I’ll need anyway.

I have another app running a Ruby on Rails app that connects to this Postgres DB app.
Whatever gives me the least amount of config, I’m down with it.

Any clues?

I could be wrong, but isn’t the default behavior of the postgres db to be private and only accessible on the machine that was configured w/ it? ie, GitHub actions won’t be able to access your DB.

Not exactly sure about what you mention regarding postgres (I’m new to it). But I’m not trying to reach this DB through the GH action itself. The GH action triggers a deployment which runs a bundle exec rails db:prepare rails command that fails.

So it’s my “web-app” app that’s trying to reach my “db-app” that fails. I would assume my “web-app” app would always be able to reach my “db-app”.

It depends on how you’ve configured your apps. You’ll need to add a private ip6 address to your db-app in order for your other apps to communicate with it.

That would make sense. I can see I have an IP address listed under the “Overview” menu. But I was also kind of hopping that the apps would connect via their name, which haven’t changed. Meaning the hostname is exactly the same.

Either way, is there a next logical step you can point me to with this in mind?

Is it a private ip6 address though, ie does it start with fdaa

Yeah, that’s the case!

Is your db app sleeping? I’d recommend using .flycast.

The db app is the one I’m referring to in the first post which starts and stops right after.

I’m not exactly sure where that mad.my-app-db.internal comes from. I do have a POSTGRES_HOST_PROD secret but I’m unable to see what it’s currently set to and it was originally set more than 1 year ago…

Could that be the reason the app isn’t starting in the first place?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.