bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.3k stars 4.78k forks source link

[bitnami/scylladb] JMX service fails #68036

Closed siddjellali closed 2 months ago

siddjellali commented 3 months ago

Name and Version

bitnami/scylladb:6.0/debian-12

What architecture are you using?

amd64

What steps will reproduce the bug?

I have no name!@nosql-0:/$ netstat -lntp | grep scylla
tcp        0      0 0.0.0.0:9042            0.0.0.0:*               LISTEN      1/scylla            
tcp        0      0 0.0.0.0:19042           0.0.0.0:*               LISTEN      1/scylla            
tcp        0      0 10.42.3.233:7000        0.0.0.0:*               LISTEN      1/scylla            
tcp        0      0 10.42.3.233:9180        0.0.0.0:*               LISTEN      1/scylla            
tcp        0      0 127.0.0.1:10000         0.0.0.0:*               LISTEN      1/scylla  

What is the expected behavior?

Run JMX service

What do you see instead?

JMX fails to start in ScyllaDB due to an incorrect definition of the LOCATION_SCRIPTS variable in the /opt/scylladb/jmx/scylla-jmx script.

I have no name!@nosql-0:/opt/scylladb/jmx$ ./scylla-jmx 
./scylla-jmx: line 134: /opt/scylladb/jmx/scripts/symlinks/scylla-jmx: No such file or directory
I have no name!@nosql-0:/opt/scylladb/jmx$ ./scylla-jmx -l /opt/scylladb/jmx 
Connecting to http://localhost:10000
Starting the JMX server
JMX is enabled to receive remote connections on port: 7199

LOCATION_SCRIPTS must be "jmx" instead of "scripts"

Additional information

I have no name!@nosql-0:/$ cat /opt/scylladb/jmx/scylla-jmx | grep LOCATION
PARAM_LOCATION="-l"
LOCATION="target"
LOCATION_SCRIPTS="scripts"
    $PARAM_LOCATION <location> - The location of the jmx proxy jar file
    "$PARAM_LOCATION")
      LOCATION=$2
      LOCATION_SCRIPTS="$2"
exec "$LOCATION_SCRIPTS"/symlinks/scylla-jmx $DEBUG \
    $PROPERTIES -jar $LOCATION/scylla-jmx-1.0.jar
I have no name!@nosql-0:/$ 
carrodher commented 3 months ago

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

siddjellali commented 3 months ago

Unfortunately, i'm too noob to contribute :(

github-actions[bot] commented 2 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

jotamartos commented 2 months ago

The jmx process is not executed unless you enable this env var SCYLLADB_RUN_JMX_PROXY

https://github.com/bitnami/containers/blob/main/bitnami/scylladb/6.0/debian-12/rootfs/opt/bitnami/scripts/libscylladb.sh#L183

That env var is set to "no" by default. Can you try setting that env var to yes and confirm that JMX is started properly?

siddjellali commented 2 months ago

No it doesn't.

jotamartos commented 2 months ago

Hi @siddjellali,

I just configured that env var and the process was launched without problems

I have no name!@scylladb:/$ env | grep SCYLLADB_RUN_JMX_PROXY
SCYLLADB_RUN_JMX_PROXY=yes
I have no name!@scylladb:/$ netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:19042           0.0.0.0:*               LISTEN      171/scylla          
tcp        0      0 10.148.1.7:9180         0.0.0.0:*               LISTEN      171/scylla          
tcp        0      0 127.0.0.1:10000         0.0.0.0:*               LISTEN      171/scylla          
tcp        0      0 0.0.0.0:9042            0.0.0.0:*               LISTEN      171/scylla          
tcp        0      0 10.148.1.7:7000         0.0.0.0:*               LISTEN      171/scylla          
tcp        0      0 0.0.0.0:41633           0.0.0.0:*               LISTEN      184/java            
tcp        0      0 127.0.0.1:7199          0.0.0.0:*               LISTEN      184/java 
I have no name!@scylladb:/$ ps aux | grep jmx
1001         184  3.9  1.3 2769324 112840 ?      Sl   09:32   0:04 /usr/lib/jvm/java/bin/java -Xmx256m -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.host=localhost -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7199 -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=7199 -Djavax.management.builder.initial=com.scylladb.jmx.utils.APIBuilder -jar /opt/bitnami/scylladb/jmx/scylla-jmx-1.0.jar
1001         427  0.0  0.0   3324  1408 pts/1    S+   09:34   0:00 grep jmx
I have no name!@scylladb:/$ 

If you continue running into issues, please take a look at the log file at /opt/bitnami/scylladb/logs/scylladb_first_boot.log or the docker log information to try to debug the issue.

github-actions[bot] commented 2 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.