0

First off thanks for your time in looking at this question. I'm having some issues getting qpid up and running on a PaaS (Openshift Origin).

I'm using a blunt force method to get it running my first time by just copying it to the server without using the ReST API. The error I'm getting when I try to run qpid is as follow:

[dsxcore-dsx.dsx.org apache-qpid]\> qpid-broker-0.22/bin/qpid-server
System Properties set to -Damqj.logging.level=info -DQPID_HOME=/var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/qpid-broker-0.22 -DQPID_WORK=apache-qpid/work
QPID_OPTS set to -Damqj.read_write_pool_size=32 -DQPID_LOG_APPEND=
Using QPID_CLASSPATH /var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/qpid-broker-0.22/lib/qpid-all.jar:/var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/qpid-broker-0.22/lib/plugins/*:/var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/qpid-broker-0.22/lib/opt/*
Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx1024m
[Broker] BRK-1006 : Using configuration : /var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/apache-qpid/work/config.json
[Broker] BRK-1007 : Using logging configuration : /var/lib/openshift/52851c6e8000fdf616000015/apache-qpid/qpid-broker-0.22/etc/log4j.xml
[Broker] BRK-1001 : Startup : Version: 0.22 Build: 1486100
[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_45-mockbuild_2013_10_16_17_47-b00 OS : Linux version: 3.11.4-201.fc19.x86_64 arch: amd64
[Broker] BRK-1011 : Maximum Memory : 1,056,309,248 bytes
[Broker] BRK-1002 : Starting : Listening on TCP port 5672
[Broker] MNG-1001 : JMX Management Startup
[Broker] MNG-1002 : Starting : RMI Registry : Listening on port 8999
[Broker] MNG-1002 : Starting : JMX RMIConnectorServer : Listening on port 9099
[Broker] MNG-1004 : JMX Management Ready
[Broker] MNG-1001 : Web Management Startup
Exception during startup: java.lang.RuntimeException: Failed to start http management on ports [PortAdapter [id=1cdbe831-ee81-4039-aa46-4b07865189bf, name=HTTP]]
java.lang.RuntimeException: Failed to start http management on ports [PortAdapter [id=1cdbe831-ee81-4039-aa46-4b07865189bf, name=HTTP]]
at org.apache.qpid.server.management.plugin.HttpManagement.start(HttpManagement.java:180)
at org.apache.qpid.server.management.plugin.HttpManagement.setState(HttpManagement.java:156)
at org.apache.qpid.server.model.adapter.AbstractAdapter.setDesiredState(AbstractAdapter.java:99)
at org.apache.qpid.server.model.adapter.BrokerAdapter.changeState(BrokerAdapter.java:907)
at org.apache.qpid.server.model.adapter.BrokerAdapter.setState(BrokerAdapter.java:870)
at org.apache.qpid.server.model.adapter.AbstractAdapter.setDesiredState(AbstractAdapter.java:99)
at org.apache.qpid.server.configuration.updater.ChangeStateTask.call(ChangeStateTask.java:59)
at org.apache.qpid.server.configuration.updater.ChangeStateTask.call(ChangeStateTask.java:28)
at org.apache.qpid.server.configuration.updater.TaskExecutor.executeTask(TaskExecutor.java:213)
at org.apache.qpid.server.configuration.updater.TaskExecutor.access$200(TaskExecutor.java:46)
at org.apache.qpid.server.configuration.updater.TaskExecutor$CallableWrapper$1.run(TaskExecutor.java:252)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.qpid.server.configuration.updater.TaskExecutor$CallableWrapper.call(TaskExecutor.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
catagon87
  • 548
  • 5
  • 21

2 Answers2

1

By default, Qpid Broker (Java) starts a HTTP Management interface on port 8080. The most likely explanation for the stack trace you are seeing is that some other process has already bound to that port. This problem is preventing Qpid from starting. (Ports are a shared system resource and only one process can bind to [=listen on] a port at any one time).

Before you can proceed you will need to resolve the port conflict. You can go about this in two ways: you could identify the other process and reconfigure it to use a different port, or you could reconfigure Quid.

If you choose the former, use a command such as lsof or netstat to discover the name of the other process, and then refer to its documentation to learn how to reconfigure the port bindings. Remember the process may belong to another user.

sudo lsof -i:8080

If you choose the latter route, the technique varies depending on whether you have an existing configuration store or not. If you are starting Qpid the first time (i.e. without existing configuration store on disk), you can use the --config-property option to override the default HTTP management port.

./bin/qpid-server --config-property "qpid.http_port=8081"

(The port assignment is permanently written to the configuration store, so the new value is used for subsequent restarts).

If you have an existing configuration store, then use the --management-mode and --management-mode-http-port <port> options to start the broker in management mode listening on a temporary management port.

./bin/qpid-server --management-mode --management-mode-http-port 10080

Then use a web browser to connect to management and then permanently reassign the conflicting HTTP port to the desired (unused) value. Finally, restart Qpid normally (without management mode options) to return the broker to normal operation.

Both these techniques are described in more detail in Configuring and Managing within the Qpid documentation.

k-wall
  • 409
  • 3
  • 9
0

Maybe a little too late, but still.... I found out with an strace that config goes to /home/userdirectory/config.json