cloudbees - Configuration of CloudAMQP Connection -
i'm having difficulty configuring connection cloudamqp in deployed grails application. can run application locally against locally installed rabbitmq instance can't figure out how correctly define application run on cloudbees using cloudamqp service.
in config.groovy, i'm defining connection info , queue:
rabbitmq { connectionfactory { username = 'username' password = 'password' hostname = 'lemur.cloudamqp.com' } queues = { testqueue autodelete: false, durable: false, exclusive: false } }
when application starts , tries connect, see following log messages:
2013-08-23 21:29:59,195 [main] debug listener.simplemessagelistenercontainer - starting rabbit listener container. 2013-08-23 21:29:59,205 [simpleasynctaskexecutor-1] debug listener.blockingqueueconsumer - starting consumer consumer: tag=[null], channel=null, acknowledgemode=auto local queue size=0 2013-08-23 21:30:08,405 [simpleasynctaskexecutor-1] warn listener.simplemessagelistenercontainer - consumer raised exception, processing can restart if connection factory supports org.springframework.amqp.amqpioexception: java.io.ioexception @ org.springframework.amqp.rabbit.connection.rabbitutils.convertrabbitaccessexception(rabbitutils.java:112) @ org.springframework.amqp.rabbit.connection.abstractconnectionfactory.createbareconnection(abstractconnectionfactory.java:163) @ org.springframework.amqp.rabbit.connection.cachingconnectionfactory.createconnection(cachingconnectionfactory.java:228) @ org.springframework.amqp.rabbit.connection.connectionfactoryutils$1.createconnection(connectionfactoryutils.java:119) @ org.springframework.amqp.rabbit.connection.connectionfactoryutils.dogettransactionalresourceholder(connectionfactoryutils.java:163) @ org.springframework.amqp.rabbit.connection.connectionfactoryutils.gettransactionalresourceholder(connectionfactoryutils.java:109) @ org.springframework.amqp.rabbit.listener.blockingqueueconsumer.start(blockingqueueconsumer.java:199) @ org.springframework.amqp.rabbit.listener.simplemessagelistenercontainer$asyncmessageprocessingconsumer.run(simplemessagelistenercontainer.java:524) @ java.lang.thread.run(unknown source) caused by: java.io.ioexception @ com.rabbitmq.client.impl.amqchannel.wrap(amqchannel.java:106) @ com.rabbitmq.client.impl.amqchannel.wrap(amqchannel.java:102) @ com.rabbitmq.client.impl.amqchannel.exnwrappingrpc(amqchannel.java:124) @ com.rabbitmq.client.impl.amqconnection.start(amqconnection.java:381) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:516) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:545) caused by: com.rabbitmq.client.shutdownsignalexception: connection error; reason: java.net.socketexception: connection reset @ com.rabbitmq.utility.valueorexception.getvalue(valueorexception.java:67) @ com.rabbitmq.utility.blockingvalueorexception.uninterruptiblegetvalue(blockingvalueorexception.java:33) @ com.rabbitmq.client.impl.amqchannel$blockingrpccontinuation.getreply(amqchannel.java:343) @ com.rabbitmq.client.impl.amqchannel.privaterpc(amqchannel.java:216) @ com.rabbitmq.client.impl.amqchannel.exnwrappingrpc(amqchannel.java:118) ... 3 more caused by: java.net.socketexception: connection reset @ com.rabbitmq.client.impl.frame.readfrom(frame.java:95) @ com.rabbitmq.client.impl.socketframehandler.readframe(socketframehandler.java:131) @ com.rabbitmq.client.impl.amqconnection$mainloop.run(amqconnection.java:508) 2013-08-23 21:30:08,406 [simpleasynctaskexecutor-1] info listener.simplemessagelistenercontainer - restarting consumer: tag=[null], channel=null, acknowledgemode=auto local queue size=0 2013-08-23 21:30:08,406 [simpleasynctaskexecutor-1] debug listener.blockingqueueconsumer - closing rabbit channel: null 2013-08-23 21:30:08,407 [simpleasynctaskexecutor-2] debug listener.blockingqueueconsumer - starting consumer consumer: tag=[null], channel=null, acknowledgemode=auto local queue size=0 aug 23, 2013 9:30:11 pm org.apache.catalina.core.applicationcontext log info: initializing spring frameworkservlet 'grails' aug 23, 2013 9:30:11 pm org.apache.coyote.http11.http11protocol init info: initializing coyote http/1.1 on http-8634 aug 23, 2013 9:30:11 pm org.apache.coyote.http11.http11protocol start info: starting coyote http/1.1 on http-8634
according https://developer.cloudbees.com/bin/view/run/cloudamqp
when bind cloudamqp service app - config params provided in pattern of cloudamqp_url_ - type of thing need put in config files can wired in when app launches.
Comments
Post a Comment