Graylog - Docker Compose Error

Hello World!

I, generally speaking, a new (-ish) user in the world of docker-compose and containerization – but outside of that specific arena, I am a veteran of all things tech … so I’m trying to step outside my comfort zone, and I thought setting up Graylog with docker compose would be a good start. Although I’m getting an error during the container build process … because of course I am.

I followed Tom’s steps pretty close, and I’m getting a JAVA error from ‘opensearch’, which ultimately causes Graylog to fail. Here is the error from the console:

========================================================
opensearch | OpenSearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/opensearch/data/nodes];
opensearch | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/opensearch/data/nodes
opensearch | at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
opensearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
opensearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
opensearch | at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397)
opensearch | at java.base/java.nio.file.Files.createDirectory(Files.java:700)
opensearch | at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
opensearch | at java.base/java.nio.file.Files.createDirectories(Files.java:793)
opensearch | at org.opensearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:322)
opensearch | at org.opensearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:259)
opensearch | at org.opensearch.env.NodeEnvironment.(NodeEnvironment.java:320)
opensearch | at org.opensearch.node.Node.(Node.java:506)
opensearch | at org.opensearch.node.Node.(Node.java:389)
opensearch | at org.opensearch.bootstrap.Bootstrap$5.(Bootstrap.java:242)
opensearch | at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242)
opensearch | at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404)
opensearch | at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180)
opensearch | at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:171)
opensearch | at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
opensearch | at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
opensearch | at org.opensearch.cli.Command.main(Command.java:101)
opensearch | at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:137)
opensearch | at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:103)
opensearch | For complete error details, refer to the log at /usr/share/opensearch/logs/docker-cluster.log

As I understand it, that error is coming from inside the container? I assume so, as I have not installed anything on the host system, except docker-compose, directly from the docker-ce repo.

Here is the host system:

OS: Red Hat Enterprise Linux 9.2 (Plow) x86_64
Host: PowerEdge R330
Kernel: 5.14.0-284.25.1.el9_2.x86_64
Uptime: 1 day, 5 hours, 5 mins
Packages: 736 (rpm)
Shell: bash 5.1.8
Resolution: 1280x1024
Terminal: /dev/pts/3
CPU: Intel Xeon E3-1270 v5 (8) @ 4.000GHz
GPU: 08:00.0 Matrox Electronics Systems Ltd. G200eR2
Memory: 653MiB / 31670MiB
Docker Compose version v2.20.2

I am running root-less, but the “docker run hello-world” test runs without an issue. I have not yet tried to replicate this as the root user.

Thanks for your review and insight on this issue!

Not an error I have encountered but sounds like a permissions issue so I would try running as root to see if that solves it.

So, I tore everything down and rebuilt docker – running it all as native root now … I’m able to launch the application now and login. Doing it root-less was just one whack-a-mole issue after another.

1 Like