BUG at docker exec command

When I want to restart the Graylog services through docker cli, ALWAYS this happen.

$ sudo docker exec -it graylog /usr/share/graylog/bin/graylogctl restart
Restarting graylog-server …
Stopping graylog-server (17) …
Waiting for graylog-server to halt.
/usr/share/graylog/bin/graylogctl: line 84: : command not found
graylog-server stopped
Starting graylog-server …

When I check the graylogctl file at line 84 appears:

while “$PS” -p $PID > /dev/null; do sleep 1; done;

So I installed the PS command, with:

apt-get update && apt-get install procps

But when I enter the command again the container just don’t restart, checking the docker logs only says:

2020-02-12 00:42:47,596 INFO : org.graylog2.system.shutdown.GracefulShutdown - Goodbye.
2020-02-12 00:42:47,597 INFO : org.graylog2.shared.journal.JournalReader - Stopping.
2020-02-12 00:42:47,615 INFO : org.graylog2.shared.initializers.JerseyService - Shutting down HTTP listener at <0.0.0.0:9000>
2020-02-12 00:42:47,629 INFO : kafka.log.LogManager - Shutting down.
2020-02-12 00:42:47,642 INFO : org.graylog2.lookup.LookupDataAdapterRefreshService - Stopping 0 jobs
2020-02-12 00:42:47,684 INFO : org.glassfish.grizzly.http.server.NetworkListener - Stopped listener bound to [0.0.0.0:9000]
2020-02-12 00:42:47,711 INFO : kafka.log.LogManager - Shutdown complete.
2020-02-12 00:42:48,317 INFO : org.graylog2.shared.initializers.ServiceManagerListener - Services are now stopped.

Any ideas? Is this a Graylog bug?

PD: I’m using Graylog 3.1

he @Luisj5231

this is not how it is supposed to be used. As you can see in the docker-entrypoint it takes more:

In the docker world you would restart the container and not the service inside the container.

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