Skip to content

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

Open
@dothebart

Description

@dothebart

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions