Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5961

Handle scenario where jansi library cannot be loaded

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0, 1.6.2, 1.8.0
    • Component/s: run
    • Labels:
      None

      Description

      Following exception is seen on setup where jansi cannot be loaded

      Apache Jackrabbit Oak 1.6.1
      Repository connected in read-only mode. Use '--read-write' for write operations
      Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi64-1.6.1 in java.library.path, no jansi-1.6.1 in java.library.path, no jansi in java.library.pa
      th, /tmp/libjansi-64-1-9219049328008584189.6: /tmp/libjansi-64-1-9219049328008584189.6: failed to map segment from shared object: Operation not permitted]
              at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
              at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
              at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)
              at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)
              at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)
              at org.apache.jackrabbit.oak.console.GroovyConsole.<clinit>(GroovyConsole.groovy:45)
              at org.apache.jackrabbit.oak.console.Console.main(Console.java:155)
              at org.apache.jackrabbit.oak.run.ConsoleCommand.execute(ConsoleCommand.java:26)
              at org.apache.jackrabbit.oak.run.Mode.execute(Mode.java:65)
              at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
      

      As per [1] such issues can occur if noexec is set for /tmp. Oak Console should handle such case at least for those cases where the console is not to be loaded and just a script needs to be run

      [1] https://support.cloudbees.com/hc/en-us/articles/215281717-Jenkins-fails-to-start-with-JNA-error

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chetanm Chetan Mehrotra
                Reporter:
                chetanm Chetan Mehrotra
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: