activemq的配置host出现问题

在linux的/etc/hosts/目录下添加配置信息

[2015-10-21 18:17:43][WARN ][org.apache.activemq.util.IdGenerator:58] could not generate unique stub
java.net.UnknownHostException: portal.test: portal.test: Name or service not known
        at java.net.InetAddress.getLocalHost(InetAddress.java:1438) ~[na:1.7.0_09-icedtea]
        at org.apache.activemq.util.IdGenerator.<clinit>(IdGenerator.java:52) ~[activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.ActiveMQConnection.<clinit>(ActiveMQConnection.java:110) [activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:291) [activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:259) [activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230) [activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178) [activemq-all-activemq-all-5.3.2.jar:5.3.2]
        at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:125) [activemq-pool-5.3.2.jar:5.3.2]
        at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:110) [activemq-pool-5.3.2.jar:5.3.2]
        at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:81) [activemq-pool-5.3.2.jar:5.3.2]
        at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:405) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:373) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.DefaultMessageListenerContainer.establishSharedConnection(DefaultMessageListenerContainer.java:765) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:280) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:265) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:566) [spring-jms-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:167) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:339) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:945) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) [spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) [spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779) [catalina.jar:7.0.26]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273) [catalina.jar:7.0.26]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.26]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895) [catalina.jar:7.0.26]
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871) [catalina.jar:7.0.26]
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) [catalina.jar:7.0.26]
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958) [catalina.jar:7.0.26]
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599) [catalina.jar:7.0.26]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_09-icedtea]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_09-icedtea]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_09-icedtea]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_09-icedtea]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09-icedtea]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09-icedtea]
Caused by: java.net.UnknownHostException: portal.test: Name or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.7.0_09-icedtea]
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866) ~[na:1.7.0_09-icedtea]
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258) ~[na:1.7.0_09-icedtea]
        at java.net.InetAddress.getLocalHost(InetAddress.java:1434) ~[na:1.7.0_09-icedtea]
        ... 43 common frames omitted
[2015-10-21 18:17:43][INFO ][org.springframework.jms.connection.CachingConnectionFactory:291] Established shared JMS Connection: PooledConnection { [email protected]64055601 }
时间: 2024-12-17 07:21:52

activemq的配置host出现问题的相关文章

(转)关于ActiveMQ的配置

目前常用的消息队列组建无非就是MSMQ和ActiveMQ,至于他们的异同,这里不想做过多的比较.简单来说,MSMQ内置于微软操作系统之中,在部署上包含一个隐性条件:Server需要是微软操作系统.(对于这点我并去调研过MSMQ是否可以部署在非微软系统,比如:Linux,只是拍脑袋想了想,感觉上是不可以).对于ActiveMQ,微软系统和Linux都是可以部署的.从功能方面来说,一般最常用的就是:消息的收/发,感觉差异不大.从性能上来说,一般的说法是ActiveMQ略高.在稳定性上,个人感觉MSM

tomcat监听activemq jms配置

当从webservice接收到信息的时候,消息生产者producer立刻把收到的消息放入到jms里面,消费者cusomer这时要设置一个监听,当生产者发送消息时,只要消息被发出来,消费者就会接收到消息,然后进行相应的操作. 在tomcat里面,要进行配置. 首先在tomcat安装目录里面,对conf/context.xml进行配置,加入以下代码: <Resource name="jms/FailoverConnectionFactory" auth="Container

ActiveMQ基本配置

一.配置登录监视控制台 1,启用登录验证(authenticate属性的值设置为true表示需要登录验证) e:\apache-activemq-5.14.5\conf\jetty.xml <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">      <property name="name" value="

ActiveMQ安全配置

1.activeMQ管理后台用户名.密码的设置 管理后台地址http://localhost:8161/admin 默认用户名密码admin admin 端口默认是8161,且服务采用的是服务器,所以我们进入到conf/jetty.xml (1)修改端口号: <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">

centos下的activemq的配置及PHP的使用

由于公司打算将php-resque的消息队列切换到activemq来,了解一下centos+php+activemq+stomp搭建消息队列的. 一.安装JDK 下载JDK(官网:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 1.1 选择:jdk-8u131-linux-x64.tar.gz 下载到 /data/service 1.2 解压:tar -zxvf jdk-8u

activemq的配置与结合spring使用

其实无论在win下还是在linux下,都可以运行得很爽 下载安装包地址: http://www.apache.org/dyn/closer.cgi?path=/activemq/5.12.1/apache-activemq-5.12.1-bin.tar.gz 安装 1)解压文件 tar zxvf apache-activemq-5.12.1-bin.tar.gz 2)改个文件名字 mv apache-activemq-5.12.1 ../system/activemq 3)配置用户密码,比如我在

[原创]Axis2与ActiveMQ集成配置

本文详细介绍了axis2集成jms中间件ActiveMQ的全过程,参考部分网络资料进行整理. 1       ActiveMQ安装及配置 1.1   ActiveMQ简介 ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线.完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现 1.2   ActiveMQ特性 1)多种语言和协议编写客户端.语言: Java, C, C++, C#, Ruby, Perl, Python, PHP.应用协议: OpenWi

ActiveMQ基本配置与示例演示

一.下载ActiveMQ 去官方网站下载:http://activemq.apache.org/ 二.运行ActiveMQ 将apache-activemq-5.11.1-bin.zip解压,由于本系统是32位,所以进入apache-activemq-5.11.1\bin\win32目录. 1.安装InstallService.bat,如果出现下图,也许是你电脑已经安装过该服务. 2.点击wrapper.exe,运行,如果出现下图所示,表示已经简单配置好了. 不过期间,如果你没有设置JAVA_H

通过配置host文件实现本地域名任意设置

在进行web开发的时候,通常需要以http://localhost或者127.0.0.1之类的访问本地环境的网站.但是,如果本地放的网站多了,不得不做别的操作,比如端口设置.结果不容易记住啦. 我在本地之用的是ubuntu+nginx环境,nginx允许设置多个域名,只需要分别指向不同的存储位置即可.那么,接下来就要如何设置一个自己选定的域名,同时这个域名只访问本地某个网站呢? 在windows中,有一个文件:system32/drivers/etc/host,在这个文件里,可以配置域名指向本地