scylladb / scylla-jmx

Scylla JMX proxy
GNU Affero General Public License v3.0
29 stars 52 forks source link

dist/common/systemd: set WorkingDirectory to get heap dump correctly #126

Closed syuu1228 closed 4 years ago

syuu1228 commented 4 years ago

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.

See scylladb/scylla-enterprise#1469

avikivity commented 4 years ago

Note tools-java and jmx now merge to master, not next.