O problema foi com o armazenamento de chaves java:
pe-activemq começou bem
$ sudo /etc/init.d/pe-activemq start
* pe-activemq started
No entanto, ao ver o PS, notei que o activemq tentou iniciar, mas falhou quase imediatamente. Eu modifiquei o script de inicialização para fazer algumas depurações:
start() {
echo -n "Starting $APP_NAME... "
getpid
if [ "X$pid" = "X" ]
then
# original command
# COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
# custom command with deamonize=FALSE
COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=FALSE $ANCHORPROP $IGNOREPROP $LOCKPROP"
echo "executing [$COMMAND_LINE]"
A partir de pe-activemq deu o seguinte erro
jvm 1 | ERROR | Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: stomp+ssl://0.0.0.0:61613 due to: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
Parecia um problema com o armazenamento de chaves. O arquivo de configuração /opt/puppet/activemq/conf/activemq-wrapper.conf fornece os seguintes detalhes:
set.default.ACTIVEMQ_BASE=/opt/puppet/activemq
wrapper.working.dir=/var/log/pe-activemq
[...]
# Enable SSL of the Stomp Connection (Note, this provides encryption only as per #10596)
wrapper.java.additional.7=-Djavax.net.ssl.keyStorePassword=puppet
wrapper.java.additional.8=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
# The trust store need not be present.
wrapper.java.additional.9=-Djavax.net.ssl.trustStorePassword=puppet
wrapper.java.additional.10=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
FYI / opt / puppet / activemq / conf é um link simbólico para / etc / puppetlabs / activemq Nesse diretório, o arquivo broket.ts existe, mas o broker.ks estava ausente
Com base nesta página ( link ), fiz o seguinte
$ cd /etc/puppetlabs/activemq
$ sudo keytool -genkey -alias broker -keyalg RSA -keystore broker.ks
=> provided puppet password everywhere
Então o activemq estava começando bem
jvm 1 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/opt/puppet/activemq/data/kahadb]
jvm 1 | INFO | KahaDB is version 3
jvm 1 | INFO | Recovering from the journal ...
jvm 1 | INFO | Recovery replayed 1 operations from the journal in 0.022 seconds.
jvm 1 | INFO | ActiveMQ 5.5.0 JMS Message Broker (localhost) is starting
jvm 1 | INFO | For help or more information please see: http://activemq.apache.org/
jvm 1 | INFO | Installing StaticsBroker
jvm 1 | INFO | Starting StatisticsBroker
jvm 1 | INFO | Listening for connections at: tcp://myserver:61616
jvm 1 | INFO | Connector openwire Started
jvm 1 | INFO | Listening for connections at: stomp+ssl://myserver:61613
jvm 1 | INFO | Connector stomp+ssl Started
jvm 1 | INFO | ActiveMQ JMS Message Broker (localhost, ID:myserver-44300-1324455724257-0:1) started
jvm 1 | INFO | jetty-7.1.6.v20100715
jvm 1 | INFO | ActiveMQ WebConsole initialized.
jvm 1 | INFO | Initializing Spring FrameworkServlet 'dispatcher'
jvm 1 | INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
jvm 1 | INFO | WebApp@2109578614 at http://0.0.0.0:8161/camel
jvm 1 | INFO | WebApp@2109578614 at http://0.0.0.0:8161/demo
jvm 1 | INFO | WebApp@2109578614 at http://0.0.0.0:8161/fileserver
jvm 1 | INFO | Started [email protected]:8161
PROBLEMA RESOLVIDO