be8f1ac511
Currently scylla-jmx.service's PWD is "/", we get following error when JVM trying to write heap dump on current directory: Aug 17 05:52:15 localhost.localdomain scylla-jmx[3469]: Starting the JMX server Aug 17 05:52:16 localhost.localdomain scylla-jmx[3469]: java.lang.OutOfMemoryError: Java heap space Aug 17 05:52:16 localhost.localdomain scylla-jmx[3469]: Dumping heap to java_pid3469.hprof ... Aug 17 05:52:16 localhost.localdomain scylla-jmx[3469]: Unable to create java_pid3469.hprof: Permission denied To fix this, we need to specify WorkingDirectory on systemd unit.
19 lines
492 B
Desktop File
19 lines
492 B
Desktop File
[Unit]
|
|
Description=Scylla JMX
|
|
Requires=scylla-server.service
|
|
After=scylla-server.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=/etc/sysconfig/scylla-jmx
|
|
User=scylla
|
|
Group=scylla
|
|
ExecStart=/opt/scylladb/jmx/scylla-jmx $SCYLLA_JMX_PORT $SCYLLA_API_PORT $SCYLLA_API_ADDR $SCYLLA_JMX_ADDR $SCYLLA_JMX_FILE $SCYLLA_JMX_LOCAL $SCYLLA_JMX_REMOTE $SCYLLA_JMX_DEBUG
|
|
KillMode=process
|
|
Restart=on-abnormal
|
|
Slice=scylla-helper.slice
|
|
WorkingDirectory=/var/lib/scylla
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|