Skip to content
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

Unable to run service using stack deployment #1350

Open
Nutties93 opened this issue Apr 21, 2021 · 4 comments
Open

Unable to run service using stack deployment #1350

Nutties93 opened this issue Apr 21, 2021 · 4 comments
Labels

Comments

@Nutties93
Copy link

https://github.com/CrunchyData/crunchy-containers/tree/master/examples/docker/swarm-service

I have copied the docker-compose file and tried running it. However, the services are not starting. I tried to deploy only the primary service without replica, and it's still not running. Do you know what's the reason? Did it miss out on anything?

@jkatz jkatz added the question label Apr 21, 2021
@jkatz
Copy link
Contributor

jkatz commented Apr 21, 2021

Without any logs, commands, etc. this is a bit challenging to troubleshoot.

@Nutties93
Copy link
Author

Oh. I managed to resolve this. I realized that the MODE environment variable needs to be set to POSTGRES.
Meanwhile, I was testing the replication. it works fine. However, when I tried to down the primary database. I'm unable to do a write to the other. Is there a way to implement an election between the databases so that the selection of the primary databases will be dynamic? like an etcd configuration or something?

@dancernogorsky
Copy link

Oh. I managed to resolve this. I realized that the MODE environment variable needs to be set to POSTGRES. Meanwhile, I was testing the replication. it works fine. However, when I tried to down the primary database. I'm unable to do a write to the other. Is there a way to implement an election between the databases so that the selection of the primary databases will be dynamic? like an etcd configuration or something?

@Nutties93
I know it's been a minute, but where you ever able to get the failover to work in swarm?
I am getting ready to try this again. In the past a I had the same issues and aborted but it looks like theres been updates to the package.

@mikesutton
Copy link

Quote reply
Reference i

This is from the future.

MODE=postgres [lower case]

is what you need to get past the deploy failing (as I just did)

Will test and report if replication and recovery fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants