7 Replies Latest reply on Jun 8, 2012 10:14 AM by Alain Defrance

    Many byteman run in the same device

    Alain Defrance Newbie



      I going to explain what I did and what is my usecase with byteman.

      Actually I'm using byteman to count how many SQL queries are executed during an unit test. Since my test suite is executed by jenkins, I have many concurrent builds and sometimes the testsuite is failing with :

      java.net.ConnectException: Connection refused

      at java.net.PlainSocketImpl.socketConnect(Native Method)

      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)

      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)

      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)

      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

      at java.net.Socket.connect(Socket.java:529)

      at java.net.Socket.connect(Socket.java:478)

      at java.net.Socket.<init>(Socket.java:375)

      at java.net.Socket.<init>(Socket.java:189)

      at org.jboss.byteman.agent.submit.Submit$Comm.<init>(Submit.java:797)

      at org.jboss.byteman.agent.submit.Submit.submitRequest(Submit.java:735)

      at org.jboss.byteman.agent.submit.Submit.addScripts(Submit.java:574)

      at org.jboss.byteman.agent.submit.Submit.addRulesFromFiles(Submit.java:547)

      at org.jboss.byteman.contrib.bmunit.BMUnit.loadScriptFile(BMUnit.java:295)


      I thought that I could have a port conflict during agent installing and I definied a random port (filling "org.jboss.byteman.contrib.bmunit.agent.port" system property) to prevent port conflicts.


      But this didn't solve my issue and after a deeper investigation, I found this constructor : https://github.com/bytemanproject/byteman/blob/master/install/src/main/java/org/jboss/byteman/agent/install/Install.java#L162

      Actually the port attribute seem unused and the port is always definied to 0 (I guess default).


      Thus I wonder if my configuration is really considered or not and how could I fix my issue.

      Please, can someone help me with this issue ?