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

starter instance shouldn't stop instances from other (running) starter #235

Open
dothebart opened this issue Jul 31, 2019 · 0 comments
Open

Comments

@dothebart
Copy link
Contributor

If another starter is ran with the same directory as an already running starter, it will rightfully complain:

2019-07-31T14:26:03+02:00 |ERRO| Failed to listen on 0.0.0.0:8538 component=arangodb error="listen tcp 0.0.0.0:8538: bind: address already in use"

and start monitoring the other instances services:

2019-07-31T14:26:03+02:00 |INFO| agent is already running on 8541. No need to start anything. component=arangodb
2019-07-31T14:26:03+02:00 |INFO| agent up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:26:04+02:00 |INFO| Looking for a running instance of dbserver on port 8540 component=arangodb
2019-07-31T14:26:04+02:00 |INFO| dbserver seems to be running already, checking port 8540... component=arangodb
2019-07-31T14:26:04+02:00 |INFO| dbserver is already running on 8540. No need to start anything. component=arangodb
2019-07-31T14:26:04+02:00 |INFO| dbserver up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:26:05+02:00 |INFO| Looking for a running instance of coordinator on port 8539 component=arangodb
2019-07-31T14:26:05+02:00 |INFO| coordinator seems to be running already, checking port 8539... component=arangodb
2019-07-31T14:26:05+02:00 |INFO| coordinator is already running on 8539. No need to start anything. component=arangodb
2019-07-31T14:26:05+02:00 |INFO| coordinator up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:26:05+02:00 |INFO| Your cluster can now be accessed with a browser at `http://localhost:8539` or component=arangodb
2019-07-31T14:26:05+02:00 |INFO| using `arangosh --server.endpoint tcp://localhost:8539`. component=arangodb


^CReceived signal: interrupt
2019-07-31T14:27:58+02:00 |INFO| Shutting down services... component=arangodb
2019-07-31T14:28:00+02:00 |INFO| coordinator has terminated component=arangodb
2019-07-31T14:28:02+02:00 |INFO| dbserver has terminated component=arangodb
2019-07-31T14:28:07+02:00 |INFO| agent has terminated component=arangodb

And kill them on shutdown!

the other one will then detect that, and respawn:

2019-07-31T14:25:56+02:00 |INFO| dbserver up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:25:57+02:00 |INFO| coordinator up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:25:57+02:00 |INFO| Your cluster can now be accessed with a browser at `http://localhost:8539` or component=arangodb
2019-07-31T14:25:57+02:00 |INFO| using `arangosh --server.endpoint tcp://localhost:8539`. component=arangodb
2019-07-31T14:27:59+02:00 |INFO| coordinator has terminated component=arangodb
2019-07-31T14:27:59+02:00 |INFO| restarting coordinator component=arangodb
2019-07-31T14:27:59+02:00 |INFO| Looking for a running instance of coordinator on port 8539 component=arangodb
2019-07-31T14:27:59+02:00 |INFO| Starting coordinator on port 8539 component=arangodb
2019-07-31T14:28:00+02:00 |INFO| coordinator up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:28:00+02:00 |INFO| Your cluster can now be accessed with a browser at `http://localhost:8539` or component=arangodb
2019-07-31T14:28:00+02:00 |INFO| using `arangosh --server.endpoint tcp://localhost:8539`. component=arangodb
2019-07-31T14:28:01+02:00 |INFO| dbserver has terminated component=arangodb
2019-07-31T14:28:01+02:00 |INFO| restarting dbserver component=arangodb
2019-07-31T14:28:01+02:00 |INFO| Looking for a running instance of dbserver on port 8540 component=arangodb
2019-07-31T14:28:01+02:00 |INFO| Starting dbserver on port 8540 component=arangodb
2019-07-31T14:28:02+02:00 |INFO| dbserver up and running (version 3.5.0-rc.6). component=arangodb
2019-07-31T14:28:06+02:00 |INFO| agent has terminated component=arangodb
2019-07-31T14:28:06+02:00 |INFO| restarting agent component=arangodb
2019-07-31T14:28:06+02:00 |INFO| Looking for a running instance of agent on port 8541 component=arangodb
2019-07-31T14:28:06+02:00 |INFO| Starting agent on port 8541 component=arangodb
2019-07-31T14:28:06+02:00 |INFO| agent up and running (version 3.5.0-rc.6). component=arangodb

If the starter can't bind, and a health check to the old instance is successfull it should instead abort on itself with a proper errormessage.

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

No branches or pull requests

2 participants