以前的2台JBoss 6服务器(主
主实例使用port-offset = "220 "在以下配置下运行(仅发布片段):
<server-group name="other-server-group" profile="full-ha">
<jvm name="default">
<heap size="256m" max-size="1303m"/>
<permgen max-size="256m"/>
</jvm>
<socket-binding-group ref="full-ha-sockets"/>
<deployments>
<deployment name="mc-ds.xml" runtime-name="mc-ds.xml"/>
<deployment name="abc.ear" runtime-name="abc.ear"/>
</deployments>
</server-group>
我尝试使用Undertow来处理JMS的连接和HornetQ,配置如下:
<subsystem xmlns="urn:jboss:domain:messaging:2.0">
<hornetq-server>
<security-enabled>false</security-enabled>
<cluster-password>${jboss.messaging.cluster.password:root}</cluster-password>
<journal-file-size>102400</journal-file-size>
<connectors>
<http-connector name="http-connector" socket-binding="messaging">
<param key="http-upgrade-endpoint" value="http-acceptor"/>
</http-connector>
<http-connector name="http-connector-throughput" socket-binding="messaging-throughput">
<param key="http-upgrade-endpoint" value="http-acceptor-throughput"/>
<param key="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0"/>
</connectors>
<acceptors>
<http-acceptor http-listener="acceptors-messaging" name="http-acceptor"/>
<http-acceptor http-listener="acceptors-messaging-throughput" name="http-acceptor-throughput">
<param key="batch-delay" value="50"/>
<param key="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0"/>
</acceptors>
...
<subsystem xmlns="urn:jboss:domain:undertow:1.1">
<buffer-cache name="default"/>
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http"/>
<http-listener name="remoting-connector" socket-binding="remoting"/>
<http-listener name="acceptors-messaging" socket-binding="messaging"/>
<http-listener name="acceptors-messaging-throughput" socket-binding="messaging-throughput"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>
...
<socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
我对远程处理也做了同样的事情。
<subsystem xmlns="urn:jboss:domain:remoting:2.0">
<endpoint worker="default"/>
<http-connector name="http-remoting-connector" connector-ref="remoting-connector" security-realm="ApplicationRealm"/>
</subsystem>
...
<socket-binding name="remoting" port="${jboss.http.port:4447}"/>
<socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>
这允许我启动主实例并部署应用程序。该实例监听端口4667 (4447端口偏移量220)。
但是,在从属实例上部署应用程序会失败,因为它似乎无法连接到主实例。失败只发生在Wildfly身上,JBoss没有。
即使配置了一个in-vm连接器,从属实例也应该使用网络接口进行连接。
host.xml - Slave
...
<property name="hibernate.search.default.worker.jndi.java.naming.provider.url" value="remote://127.0.0.1:4667"/>
...
从机无法加载消息队列,因为从机的server.log显示与JNDI的连接失败。在本地测试设置中,从机与主机运行在同一台机器上。
捕获网络流量显示主服务器确认 (TCP ACK) 与其端口 4667 的连接,尽管在下面的日志中找到“连接异常:操作失败,状态为等待 5000 毫秒后”。
任何指点或提示都值得赞赏。
来自服务器.log - 从属服务器的错误消息:
2015-03-26 09:34:43,226 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 59) MSC000001: Failed to start service jboss.persistenceunit."abc.ear/web.war#mc": org.jboss.msc.service.StartException in service jboss.persistenceunit."abc.ear/web.war#mc": org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager AssetDerivate
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_40]
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager AssetDerivate
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:265) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:528) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:495) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:104) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:363) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:219) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:143) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:74) [hibernate-search-orm-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:588) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
... 8 more
Caused by: org.hibernate.search.SearchException: HSEARCH000164: Unable to lookup Search queue 'queue/hibernatesearch' and connection factory 'jms/RemoteConnectionFactory' for index 'AssetDerivate'
at org.hibernate.search.backend.impl.jms.JndiJMSBackendQueueProcessor.initializeJMSQueueConnectionFactory(JndiJMSBackendQueueProcessor.java:56) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.backend.impl.jms.JmsBackendQueueProcessor.initialize(JmsBackendQueueProcessor.java:77) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.backend.BackendFactory.createBackend(BackendFactory.java:85) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.backend.BackendFactory.createBackend(BackendFactory.java:53) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.createBackend(DirectoryBasedIndexManager.java:204) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:102) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:261) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
... 24 more
Caused by: javax.naming.CommunicationException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4667 (Operation failed with status WAITING after 5000 MILLISECONDS)] [Root exception is java.net.ConnectException: Operation failed with status WAITING after 5000 MILLISECONDS]
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:240) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingStore(HaRemoteNamingStore.java:149) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:130) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:87) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:129) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_40]
at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_40]
at org.hibernate.search.backend.impl.jms.JndiJMSBackendQueueProcessor.initializeJMSQueueConnectionFactory(JndiJMSBackendQueueProcessor.java:53) [hibernate-search-engine-4.5.1.Final.jar:4.5.1.Final]
... 30 more
Caused by: java.net.ConnectException: Operation failed with status WAITING after 5000 MILLISECONDS
at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:97) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:198) [jboss-remote-naming-2.0.1.Final.jar:2.0.1.Final]
... 38 more
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([("deployment" => "abc.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"abc.ear/web.war#mc\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"abc.ear/web.war#mc\": org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager AssetDerivate
Caused by: org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager AssetDerivate
Caused by: org.hibernate.search.SearchException: HSEARCH000164: Unable to lookup Search queue 'queue/hibernatesearch' and connection factory 'jms/RemoteConnectionFactory' for index 'AssetDerivate'
Caused by: javax.naming.CommunicationException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4667 (Operation failed with status WAITING after 5000 MILLISECONDS)] [Root exception is java.net.ConnectException: Operation failed with status WAITING after 5000 MILLISECONDS]
Caused by: java.net.ConnectException: Operation failed with status WAITING after 5000 MILLISECONDS"}}
当搜索该消息时
Failed to connect to any server. Servers tried: [remote://127.0.0.1
从您的堆栈跟踪中,我发现了这个听起来类似的问题:
由于在 Wildfly Beta1 中不再启用远程处理端口,因此您需要使用 http 远程处理协议并指向端口 8080。https://developer.jboss.org/message/843963#843963
另一个类似的查询也指向 8080 作为 http 远程处理的新端口:https://developer.jboss.org/thread/239301?start=0
您可以尝试使用8080(您的端口偏移量)来代替您的配置吗?
我将使用嵌入在 JBoss EAP 6.2 中的 HornetQ 2.3.12,并且需要一些集群队列。 我是否需要设置 JBoss 集群才能让 JMS 集群由大黄蜂 Q 提供支持,或者大黄蜂 Q 是独立的?根据文档,我认为是后者,因为大黄蜂Q集群是大黄蜂Q的一部分,可以在没有JBoss的情况下存在。 节点通过核心网桥连接,因此部署在每个节点中的应用程序将对队列名称执行本地 JNDI 查找,而无需集
我想在我的Web应用程序中使用服务器托管连接池,现在我使用JdbcTemboard来获取连接。如何从WebSphere获取数据源并在我的应用程序中使用。
我已经在机器A中安装了IBM MQ server v9,在这个MQ服务器中,通过MQ Explorer,我定义了队列管理器和一些队列。我希望通过JNDI从运行在另一台机器B上的客户端查找这个队列管理器及其队列。 因此,通过MQ Explorer,我尝试在“JMS Administed Objects”中添加初始上下文,对于所定位的JNDI命名空间,我不想使用LDAP服务器或文件系统,我选择“Oth
我试图将Hibernate与我的spring应用程序上下文联系起来。我正在成功地连接SessionFactory,但当我尝试调用getCurrentSession时,我看到以下错误: 我正在配置数据源会话工厂和事务管理器。我还指定了事务处理将是注释驱动的 下面是我的上下文XML: null 下面是我发现错误的类: 当这被称为sessionFactory时不是null,而是带有上述错误的错误。如果我
我想了解更多这句话发现Grails留档: 如果测试涉及证明测试对象以特定方式与合作者交互,则使用模拟。如果协作者以某种方式的行为暴露了测试主题中的特定行为,那么该行为的结果就是您正在测试的,请使用存根
我有一个烧瓶服务器运行在http://127.0.0.1:5000和一个vuejs前端运行http://localhost:8080我已经做了api,并用postman测试了它,一切都如预期的那样工作:( > 将请求发布到/登录- (将请求发送至/登录)- 烧瓶API代码: 登录。vue: 指数vue 当我使用邮递员登录时,我得到的响应为;当我使用邮递员获取url/索引时,我得到响应。数据但当我使