The OpenShift forums have been retired, but you can still read and search them.
For the most up-to-date information about how to use OpenShift please visit


Hi Everyone, This is my first time deploying an app in Openshift.

I have an activemq running on our local server. To become familiar with OpenShift, I decided to try deploying ActiveMQ from

After pushing the files and checking the status by running ctl_app status I got a message "Application is either stopped or inaccessible".

I executed tail_all the message was "/usr/bin/tail: cannot open `/logs/' for reading: No such file or directory"

In the example it used OPENSHIFT_INTERNAL_IP in the (action_hooks, jetty.xml and activemq.xml )and changed it to OPENSHIFT_DIY_IP, but did not work as well.

My url is

Appreciate any help you can give.

Regards, Walter

Hello Walter,

Recently OpenShift updated to V2 Cartridge system which resulted in some changes. I have updated the quickstart and it seem to be working fine. Just recreate the application by following the commands shown below. The example is running here

$ rhc app create activemq diy
$ cd activemq/
$ git remote add upstream
$ git pull -s recursive -X theirs upstream master
$ git push


Shekhar (OpenShift Developer Evangelist)

Hi Shekhar,

I have re-created activemq and it's working properly now.

I tried editing the configuration file activemq.xml by changing the broker name from localhost to savanna and restarted the application. I went to and I did not reflect the change. I even tried to kill the broker then restarted activemq app but still did not work.

Do you have any idea how to make it work?

Thanks, Walter

Hello Walter,

Yes, you can change the broker name. I just updated the quickstart with some more changes I would suggest recreate the app again. The example app You can see that I am now using shekhar as my broker name.



Hi Shekhar,

I was able to change the broker name. I tried to use ActiveMQ and tried to subscribe to a queue using websocket over stomp coming from the browser. It appears that the http server and the broker should reside in the same host. Is there a way that an app in a PHP 5.1 cartridge can communicate to an app in a diy(ActiveMQ) cartridge ?

Thank you so much for responding.

More power,

Hello Walter,

There are couple of ways you can use it but you have to understand that we are using ActiveMQ REST interface.

1) Within your PHP code you can send messages using ActiveMQ REST Post endpoint and Get messages using ActiveMQ Get endpoint. Read this

2) Use ActiveMQ Ajax interface. So, you can use ActiveMQ javascript library amq.js to send message or subscribe to the channel. Read this

I have not tried the above two approaches so you can give them a try. Also, it would be good if you can blog about your experience.



Hi Shekhar,

Thank your for your suggestions. I decided to try using the websocket demo ( It is not working when I tried to connect. I curiously change the Server url from ws://localhost:61614/stomp to ws://mylocalhost:61614/stomp, surprisingly I was able to connect to my existing broker. That means it is possible for web browser using websocket/stomp to connect to a broker in a different host. I also checked my activemq.log and there was an error during startup and maybe this is the reason why the websocket was not working properly. Here is the error log

Regards, Walter

2013-07-04 14:36:25,610 | INFO | ActiveMQ 5.6.0 JMS Message Broker (savanna) is starting | | main 2013-07-04 14:36:25,621 | INFO | For help or more information please see: | | main 2013-07-04 14:36:25,751 | WARN | could not generate unique stub by using DNS and binding to local port | org.apache.activemq.util.IdGenerator | main Permission denied at Method) at at at at at org.apache.activemq.util.IdGenerator.( at at at at at at at at at at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at at at at at at$1.getObject( at at at at at at at org.apache.xbean.spring.context.ResourceXmlApplicationContext.( at org.apache.xbean.spring.context.ResourceXmlApplicationContext.( at org.apache.activemq.xbean.XBeanBrokerFactory$1.( at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext( at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker( at at at org.apache.activemq.console.command.StartCommand.startBroker( at org.apache.activemq.console.command.StartCommand.runTask( at org.apache.activemq.console.command.AbstractCommand.execute( at org.apache.activemq.console.command.ShellCommand.runTask( at org.apache.activemq.console.command.AbstractCommand.execute( at org.apache.activemq.console.command.ShellCommand.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.apache.activemq.console.Main.runTaskClass( at org.apache.activemq.console.Main.main( 2013-07-04 14:36:26,516 | INFO | jetty-7.6.1.v20120215 | org.eclipse.jetty.server.Server | main 2013-07-04 14:36:26,750 | INFO | started o.e.j.s.ServletContextHandler{/,null} | org.eclipse.jetty.server.handler.ContextHandler | main 2013-07-04 14:36:26,916 | INFO | Started SelectChannelConnector@ | org.eclipse.jetty.server.AbstractConnector | main 2013-07-04 14:36:26,916 | INFO | Connector http Started | | main 2013-07-04 14:36:27,075 | INFO | Listening for connections at: tcp:// | org.apache.activemq.transport.TransportServerThreadSupport | main 2013-07-04 14:36:27,077 | INFO | Connector openwire Started | | main 2013-07-04 14:36:27,113 | INFO | Listening for connections at: stomp:// | org.apache.activemq.transport.TransportServerThreadSupport | main 2013-07-04 14:36:27,113 | INFO | Connector stomp Started | | main 2013-07-04 14:36:27,133 | INFO | jetty-7.6.1.v20120215 | org.eclipse.jetty.server.Server | main 2013-07-04 14:36:27,133 | INFO | started o.e.j.s.ServletContextHandler{/,null} | org.eclipse.jetty.server.handler.ContextHandler | main 2013-07-04 14:36:27,233 | INFO | Started SelectChannelConnector@ | org.eclipse.jetty.server.AbstractConnector | main 2013-07-04 14:36:27,233 | INFO | Connector websocket Started | | main 2013-07-04 14:36:27,303 | INFO | ActiveMQ JMS Message Broker (savanna, started | | main 2013-07-04 14:36:27,303 | WARN | Store limit is 102400 mb, whilst the data directory: /var/lib/openshift/51d5bbe7e0b8cd6caf000075/app-root/data/activemq-data/kahadb only has 64079 mb of usable space | | main 2013-07-04 14:36:27,540 | INFO | jetty-7.6.1.v20120215 | org.eclipse.jetty.server.Server | main 2013-07-04 14:36:29,699 | INFO | ActiveMQ WebConsole initialized. | org.apache.activemq.web.WebConsoleStarter | main 2013-07-04 14:36:29,699 | INFO | started o.e.j.w.WebAppContext{/admin,file:/var/lib/openshift/51d5bbe7e0b8cd6caf000075/app-root/runtime/repo/diy/activemq/webapps/admin/} | org.eclipse.jetty.server.handler.ContextHandler | main 2013-07-04 14:36:29,817 | INFO | Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog | org.mortbay.log | main 2013-07-04 14:36:30,250 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | main 2013-07-04 14:36:32,148 | INFO | ActiveMQ Console at | org.eclipse.jetty.webapp.WebAppContext | main 2013-07-04 14:36:32,439 | INFO | started o.e.j.w.WebAppContext{/demo,file:/var/lib/openshift/51d5bbe7e0b8cd6caf000075/app-root/runtime/repo/diy/activemq/webapps/demo/} | org.eclipse.jetty.server.handler.ContextHandler | main 2013-07-04 14:36:32,544 | INFO | ActiveMQ Web Demos at | org.eclipse.jetty.webapp.WebAppContext | main 2013-07-04 14:36:32,732 | INFO | started o.e.j.w.WebAppContext{/fileserver,file:/var/lib/openshift/51d5bbe7e0b8cd6caf000075/app-root/runtime/repo/diy/activemq/webapps/fileserver/} | org.eclipse.jetty.server.handler.ContextHandler | main 2013-07-04 14:36:32,852 | INFO | RESTful file access application at | org.eclipse.jetty.webapp.WebAppContext | main 2013-07-04 14:36:32,899 | INFO | Started SelectChannelConnector@ | org.eclipse.jetty.server.AbstractConnector | main 2013-07-04 15:20:31,597 | WARN | Broker localhost not started so using savanna instead | | qtp17391146-46 2013-07-04 15:20:31,625 | INFO | Connector vm://localhost Started | | qtp17391146-46 2013-07-04 15:21:30,988 | WARN | Broker localhost not started so using savanna instead | | qtp17391146-44 2013-07-04 15:51:33,341 | INFO | Connector vm://localhost Stopped | | HashSessionScavenger-1 2013-07-05 11:51:27,297 | WARN | Broker localhost not started so using savanna instead | | qtp17391146-42 2013-07-05 11:51:27,297 | INFO | Connector vm://localhost Started | | qtp17391146-42 2013-07-05 12:23:40,164 | INFO | Connector vm://localhost Stopped | | HashSessionScavenger-1 2013-07-05 13:20:37,213 | WARN | /admin/sendMessage.action | org.eclipse.jetty.servlet.ServletHandler | qtp17391146-65 java.lang.NullPointerException at org.apache.activemq.web.handler.BindingBeanNameUrlHandlerMapping.getHandlerInternal( at org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler( at org.springframework.web.servlet.DispatcherServlet.getHandler( at org.springframework.web.servlet.DispatcherServlet.getHandler( at org.springframework.web.servlet.DispatcherServlet.doDispatch( at org.springframework.web.servlet.DispatcherServlet.doService( at org.springframework.web.servlet.FrameworkServlet.processRequest( at org.springframework.web.servlet.FrameworkServlet.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.eclipse.jetty.servlet.ServletHolder.handle( at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter( at org.apache.activemq.web.AuditFilter.doFilter( at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter( at org.springframework.web.filter.RequestContextFilter.doFilterInternal( at org.springframework.web.filter.OncePerRequestFilter.doFilter( at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter( at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter( at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter( at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent( at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter( at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter( at org.eclipse.jetty.servlet.ServletHandler.doHandle( at org.eclipse.jetty.server.handler.ScopedHandler.handle( at at org.eclipse.jetty.server.session.SessionHandler.doHandle( at org.eclipse.jetty.server.handler.ContextHandler.doHandle( at org.eclipse.jetty.servlet.ServletHandler.doScope( at org.eclipse.jetty.server.session.SessionHandler.doScope( at org.eclipse.jetty.server.handler.ContextHandler.doScope( at org.eclipse.jetty.server.handler.ScopedHandler.handle( at org.eclipse.jetty.server.handler.HandlerCollection.handle( at at org.eclipse.jetty.server.handler.HandlerCollection.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest( at org.eclipse.jetty.server.AbstractHttpConnection.content( at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.AsyncHttpConnection.handle( at at$ at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( at org.eclipse.jetty.util.thread.QueuedThreadPool$ at 2013-07-05 13:21:27,633 | WARN | Broker localhost not started so using savanna instead | | qtp17391146-65 2013-07-05 13:21:27,634 | INFO | Connector vm://localhost Started | | qtp17391146-65 2013-07-05 13:48:38,257 | INFO | Connector vm://localhost Stopped | | Timer-1

Hi Everyone,

I am a newbie to openshift., I deployed activemq using this "how to" successfully but the broker name still referring to shekhar even after I changed the name to something else.

I followed these steps to change the broker name

Changed the name reference in activemq.xml locally


git add activemq.xml git commit activemq.xml m '.xxx' git push

and also re-starting the gear does not seem to help either. I am getting a message on the browser that an exception is thrown but when I checked activemq.log file, the file is empty.

Any idea what I am doing wrong?

Did you change both lines in your activemq.xml?

<broker xmlns="" brokerName="shekhar" dataDirectory="${}">
<transportConnector name="http" uri="http://OPENSHIFT_DIY_IP:15005?brokerName=shekhar"/>

Thanks for the response. Yes, I did but that doesn't seem to have any effect.