amazon-kinesis-agent
amazon-kinesis-agent copied to clipboard
Kinesis agent not coming up on Linux system with /tmp noexec option
Changed the java.io.tmpdir and SQLITE_TMPDIR. But still I see the SQLite creates temp files in /tmp. This /tmp directory is set as noexec.
This error goes away with removing noexec option on /tmp. But I do not want do this.
Failed to load native library:sqlite-3.20.1-2fa29ae4-bc43-4dd1-949e-37c8103f629f-libsqlitejdbc.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.20.1-2fa29ae4-bc43-4dd1-949e-37c8103f629f-libsqlitejdbc.so: /tmp/sqlite-3.20.1-2fa29ae4-bc43-4dd1-949e-37c8103f629f-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted
FATAL: Thread main threw an unrecoverable error. Aborting application
java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8([BI)V
at org.sqlite.core.NativeDB._open_utf8(Native Method)
at org.sqlite.core.NativeDB._open(NativeDB.java:71)
at org.sqlite.core.DB.open(DB.java:174)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:220)
at org.sqlite.core.CoreConnection.
I didn't remount /tmp with noexec attr. Instead, I removed exec permission from /tmp directory, and observed UnsatisfiedLinkError error. However, setting java.io.tmpdir to the directory with exec permission fixed the issue.
You need to pass java.io.tmpdir as a JVM argument: -Djava.io.tmpdir=[directory-with-exec-permission].