Open lioncubs opened 1 year ago
Found the issue - in backtrace
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[FATAL] 2023-01-10 18:30:31.009 [main] Logstash - Logstash stopped processing because of an error: (LoadError) no such file to load -- logstash/build
org.jruby.exceptions.LoadError: (LoadError) no such file to load -- logstash/build
The file to load that fails logstash/build.rb not logstash/build
The Permissions for the following file had been changed from 7.17.7 -> 7.17.8
# logstash:7.17.7 - File is OK
root@kind:/home/radware/git/waas/waas_backend/docker-images/logstash# docker run -u nobody:nogroup -v $PWD/data.7.17.7:/usr/share/logstash/data --rm -ti --entrypoint bash docker.elastic.co/logstash/logstash:7.17.7
nobody@4b9d4f571e35:/usr/share/logstash$ ls -al ./logstash-core/lib/logstash/build.rb
-rw-rw-r-- 1 logstash root 156 Oct 13 13:24 ./logstash-core/lib/logstash/build.rb
nobody@4b9d4f571e35:/usr/share/logstash$ #Verify that this is the ONLY file that is not other+r
nobody@4b9d4f571e35:/usr/share/logstash$ find . ! -perm /o+r
nobody@4b9d4f571e35:/usr/share/logstash$
# logstash:7.17.8 - File is NOT OK
root@kind:/home/radware/git/waas/waas_backend/docker-images/logstash# docker run -u nobody:nogroup -v $PWD/data.7.17.8:/usr/share/logstash/data --rm -ti --entrypoint bash docker.elastic.co/logstash/logstash:7.17.8
nobody@45c2639679b8:/usr/share/logstash$ ls -al ./logstash-core/lib/logstash/build.rb
-rw-rw---- 1 logstash root 156 Nov 30 16:11 ./logstash-core/lib/logstash/build.rb
nobody@45c2639679b8:/usr/share/logstash$ #Verify that this is the ONLY file that is not other+r
nobody@45c2639679b8:/usr/share/logstash$ find . ! -perm /o+r
./logstash-core/lib/logstash/build.rb
nobody@45c2639679b8:/usr/share/logstash$
Currently we have patched our docker image from docker.elastic.co/logstash/logstash:7.17.8 with the following changes, and all works - So there is your Fix :slight_smile:
Dockerfile
# Get Original Docker image from elastic.co
FROM docker.elastic.co/logstash/logstash:7.17.8
# fix permission issue on /usr/share/logstash/logstash-core/lib/logstash/build.rb in 7.17.8 (also exists in 8.6.0)
RUN chmod 0664 /usr/share/logstash/logstash-core/lib/logstash/build.rb
NOTE: I have also verified that this issue ALSO exists with 8.6.0 - So I assume any changes to 8.x since Nov 30 16:11 also has the same issue - Please make the same change in the 8.x Branch
The same issue was found in 8.5.1 but not in 8.5.0 diff of two versions
build.rb
is created from temp file from rake artifact:generate_build_metadata
. The temp file has permissions 0600. In the docker build process, chmod and chown change the permission of user and group. I do not see any change related to others
. It is unclear to me why v8.5.0 has -rw-rw-r--
, while v8.5.1 has -rw-rw----
.
The fix will be update Dockerfile.j2
to add read permission to others
btw, I have tested locally with v8.5.0 and run the docker image build process, but the build.rb is missing read permission.
Logstash information:
Plugins installed: (
bin/logstash-plugin list --verbose
)AS in from docker image:
JVM (e.g.
java -version
):OS version (
uname -a
if on a Unix-like system):Any Linux version - tested on the following
Description of the problem including expected versus actual behavior:
Steps to reproduce:
Success with 7.17.7
Failure with 7.17.8
7.17.8 Failure - using nobody:nogroup
Success with 7.17.7 - using nobody:nogroup - CTRL-C to stop
Running 7.17.8 as root works - no need to show full output (same as with 7.17.7)
Provide logs (if relevant):