• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • core
    • None
    • - Linux, CentOS 6.5 x86_64
      - Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
      - Jenkins 1.599
      - Jolokia 1.2.3

      I want to use jolokia <http://jolokia.org/> to access JMX via HTTP.

      Jolokia cannot listen port when start Jenkins with --daemon option.

      # sudo -H -u jenkins /usr/bin/java -javaagent:/usr/local/app/jolokia/jolokia-jvm-agent.jar=port=8781,host=0.0.0.0 -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --daemon
      I> No access restrictor found, access to all MBean is allowed
      Jolokia: Agent started with URL http://10.6.25.200:8781/jolokia/
      Forking into background to run as a daemon.
      Use --logfile to redirect output to a file
      Could not start Jolokia agent: java.net.BindException: Address already in use
      
      $ curl -m 3 http://10.6.25.200:8781/jolokia/
      curl: (56) Failure when receiving data from the peer
      

      Does this issue relate on https://issues.jenkins-ci.org/browse/JENKINS-14529 ?

          [JENKINS-27142] Could not listen jolokia agent port

          Any updates?

           

          Valeriy Zabawski added a comment - Any updates?  

          In reference to JENKINS-14529 which was resolved by jglick back then it seems that any agent that may bind to a port will fail unless it was patched out of com.sun.akuma.Daemon like the native JMX functionality in #L116-L124.

          jglick what do you think about having a property like com.sun.akuma.Daemon.agent being read after #L127. This value could be set to whatever agent people like dziki_jam or mtizzoni from JENKINS-23023 may want to use and it can then be prepended to the ArrayList of arguments for the child process?

          I'm aware that anybody can realize the daemonization with own tooling but it would be fair to log a warning on startup that embedded daemonization introduces some interesting limitations that may not be obvious for everybody.

          Thomas Heidrich added a comment - In reference to JENKINS-14529 which was resolved by jglick back then it seems that any agent that may bind to a port will fail unless it was patched out of com.sun.akuma.Daemon like the native JMX functionality in #L116-L124 . jglick what do you think about having a property like com.sun.akuma.Daemon.agent being read after #L127 . This value could be set to whatever agent people like dziki_jam or mtizzoni from JENKINS-23023 may want to use and it can then be prepended to the ArrayList of arguments for the child process? I'm aware that anybody can realize the daemonization with own tooling but it would be fair to log a warning on startup that embedded daemonization introduces some interesting limitations that may not be obvious for everybody.

          Jesse Glick added a comment -

          Whatever I changed was eight years ago and I have no memory of it now.

          If this is a problem with the Akuma library, my recommendation is that it be removed.

          Jesse Glick added a comment - Whatever I changed was eight years ago and I have no memory of it now. If this is a problem with the Akuma library, my recommendation is that it be removed.

          Mark Waite added a comment -

          Jenkins only support Java 11, Java 17, and Java 21. Akuma was removed from Jenkins core in September 2021 with commit 195dacbf556fdf0a393d5d139df27ffba3a82b11

          Mark Waite added a comment - Jenkins only support Java 11, Java 17, and Java 21. Akuma was removed from Jenkins core in September 2021 with commit 195dacbf556fdf0a393d5d139df27ffba3a82b11

            Unassigned Unassigned
            hirose31 Masaaki HIROSE
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: