bmsubmit is not working due to Bad Request 400. Why?

51 Views Asked by At

I am using byteman 4.0.17. Installing byteman succeeded. Using bmsubmit.sh tool is throwing an error.

$ byteman-download-4.0.17/bin/bmsubmit.sh -y
Failed to process request: java.lang.Exception: Invalid name/value pair in line [HTTP/1.1 400 Bad Request]. Full response below:
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close

400 Bad Request

java.lang.Exception: Invalid name/value pair in line [HTTP/1.1 400 Bad Request]. Full response below:
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close

400 Bad Request

    at [org.jboss.byteman.agent.submit.Submit.listSystemProperties][1](Submit.java:767)
    at org.jboss.byteman.agent.submit.Submit.main(Submit.java:1113)
$

Also when I try to submit a rule I get an error.

$ byteman-download-4.0.17/bin/bmsubmit.sh -l /mnt/jenkins/FileDescriptorLeak.btm
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close

400 Bad Request

$

Am I doing something wrong here ?

########################################################################
#
# Rule to trace opening files
#

RULE FileOutputStream open trace
CLASS java.io.FileOutputStream
METHOD <init>
AT EXIT
IF TRUE
DO traceStack("*** Called init in thread " + Thread.currentThread().getName() + "\n", 30)
ENDRULE
1

There are 1 best solutions below

0
On

The solution to the issue is to define an unused port when using the bminstall command. With the -p flag.