我有Artemis ActiveMQ版本2.19.0,有3组主/从:
amq1-master
amq2-slave
amq3-master
amq4-slave
amq5-master
amq6-slave
我也在连接器之间使用SSL连接,这里是来自一台机器的broker.xml:
<connectors>
<connector name="amq1-master">tcp://amq1:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq1/client_ts.p12;trustStorePassword=trustStorePassword</connector>
<connector name="amq1-slave">tcp://amq2:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq2/client_ts.p12;trustStorePassword=trustStorePassword</connector>
<connector name="amq2-master">tcp://amq3:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq3/client_ts.p12;trustStorePassword=trustStorePassword</connector>
<connector name="amq2-slave">tcp://amq4:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq4/client_ts.p12;trustStorePassword=trustStorePassword</connector>
<connector name="amq3-master">tcp://amq5:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq5/client_ts.p12;trustStorePassword=trustStorePassword</connector>
<connector name="amq3-slave">tcp://amq6:61616?sslEnabled=true;trustStorePath=/home/artemis_certs/amq6/client_ts.p12;trustStorePassword=trustStorePassword</connector>
</connectors>
<acceptors>
<acceptor name="netty-acceptor">tcp://amq1:61616?sslEnabled=true;keyStorePath=/home/artemis_certs/amq1/broker_ks.p12;keyStorePassword=keyStorePassword</acceptor>
</acceptors>
经纪人之间的关系很好。当我试图从一个制作人那里发送消息时,我得到了这个错误
{"@timestamp":"2021-11-24T20:31:29.439Z", "log.level": "WARN", "message":"Failed to initialize a channel. Closing: [id: 0x424f0276]", "ecs.version": "1.2.0","service.name":"test-artemis","event.dataset":"test-artemis.log",
"process.thread.name":"Thread-2 (ActiveMQ-client-netty-threads)","log.logger":"io.netty.channel.ChannelInitializer","error.type":"java.lang.Exception","error.message":"Failed to find a store at /home/artemis_cert/amq5/client_ts.p12
","error.stack_trace":[
"java.lang.Exception: Failed to find a store at /home/artemis_cert/amq5/client_ts.p12",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.validateStoreURL(SSLSupport.java:314)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadKeystore(SSLSupport.java:262)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadTrustManagerFactory(SSLSupport.java:213)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadTrustManagers(SSLSupport.java:238)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.createContext(SSLSupport.java:162)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.DefaultSSLContextFactory.createSSLContext(DefaultSSLContextFactory.java:64)",
"\tat org.apache.activemq.artemis.core.remoting.impl.ssl.DefaultSSLContextFactory.getSSLContext(DefaultSSLContextFactory.java:35)",
"\tat org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.loadJdkSslEngine(NettyConnector.java:719)",
"\tat org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.access$1400(NettyConnector.java:129)",
"\tat org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector$1.initChannel(NettyConnector.java:628)",
"\tat io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)",
"\tat io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)",
"\tat io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938)",
"\tat io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)",
"\tat io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)",
"\tat io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)",
"\tat io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)",
"\tat io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)",
"\tat io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)",
"\tat io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)",
"\tat io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)",
"\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)",
"\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)",
"\tat io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:387)",
"\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)",
"\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)",
"\tat org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)"]}
{"@timestamp":"2021-11-24T20:31:29.441Z", "log.level":"ERROR", "message":"AMQ214016: Failed to create netty connection", "ecs.version": "1.2.0","service.name":"test-artemis","event.dataset":"test-artemis.log","process.thread.name":"Camel (camel-1) thread #0 - JmsConsumer[example-queue]","log.logger":"org.apache.activemq.artemis.core.client","error.type":"io.netty.channel.StacklessClosedChannelException","error.stack_trace":[
"io.netty.channel.StacklessClosedChannelException",
"\tat io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source)"]}
{"@timestamp":"2021-11-24T20:31:33.841Z", "log.level": "WARN", "message":"Failed to initialize a channel. Closing: [id: 0x62825c92]", "ecs.version": "1.2.0","service.name":"test-artemis","event.dataset":"test-artemis.log","process.thread.name":"Thread-0 (ActiveMQ-client-netty-threads)","log.logger":"io.netty.channel.ChannelInitializer","error.type":"java.lang.Exception","error.message":"Failed to find a store at /home/artemis_cert/amq5/client_ts.p12","error.stack_trace":[
下面是我的JMS连接url的样子:
jms.artemis.broker.url=(tcp://amq1:61616,tcp://amq2:61616,tcp://amq3:61616,tcp://amq4:61616,tcp://amq5:61616,tcp://amq6:61616)?ha=true&sslEnabled=true&trustStorePath=/home/cert/client_ts.p12&trustStorePassword=trustStorePassword&keyStorePath=/home/cert/broker_ks.p12&keyStorePassword=keyStorePassword
jms.artemis.user=admin
jms.artemis.password=admin
@Configuration
public class ArtemisJmsConfiguration extends JmsConfiguration{
@Override
@Bean
public ConnectionFactory artemisConnectionFactory(
@Value("${jms.artemis.broker.url}") String brokerUrl,
@Value("${jms.artemis.user}") String user,
@Value("${jms.artemis.password}") String password
) {
ActiveMQConnectionFactory conn = new ActiveMQConnectionFactory(brokerUrl, user, password);
JmsPoolConnectionFactory factory = new JmsPoolConnectionFactory();
factory.setConnectionFactory(conn);
factory.setMaxConnections(10);
return factory;
}
}
首先,我不明白为什么在日志中我看到我的商店的错误路径,它说:“在/home/artemis_cert/amq5/client_ts.p12处没有找到一个商店”,而在连接url中我有不同的路径“truststorepath=/home/cert/client_ts.p12”?
我也得到了其他商店的错误,这只是我上面提到的一个例子,例如:
Failed to find a store at /home/artemis_cert/amq1/client_ts.p12;
Failed to find a store at /home/artemis_cert/amq2/client_ts.p12
etc.
我认为keystores的默认格式是JKS,您需要在连接URL中使用truststoreType=pkcs12告诉连接器/接受者该格式。
为什么是必要的,因为我们已经在Broker.xml中指定了代理服务器的->我们知道如果我们想要连接到这个服务器,要将请求发送到哪个端口(它是端口)。即使此服务器是集群的一部分,的角色是什么?文档的其他部分也有关于“集群”的信息,但有关于集群连接的词语: 集群是由每个节点在核心配置文件broker.xml中声明到其他节点的集群连接形成的。当一个节点与另一个节点形成集群连接时,它会在内部创建它与另一个
当我把URL放入浏览器时,它的连接很好。当我使用Java时: 它抛出 这个问题展示了如何忽略整个证书的事情,但这感觉不对。我只是想使用与浏览器相同的证书。 我已经尝试添加属性,该属性将异常更改为,我从这个问题中得出的意思是它找不到称为的信任存储。不过,我不知道还能说明些什么。
目前,在WMQ端,有一个名为的队列管理器。在这个队列管理器下,我创建了两个通道。一个是,它没有指定SSL密码规范;另一个是,它用配置SSL密码规范,用配置SSL身份验证。 我已经使用IBM密钥管理工具为队列管理器创建了一个密钥存储区。密钥db的路径是。 对于通道,我定义了一个队列连接工厂,如下所示: 现在我只能使用创建连接。但未能查找SSL队列连接工厂。我的代码如下所示: 在查找SSL工厂时,我是
简介: 我有一个 SAAJ 客户端,它通过 HTTPS 调用远程网络服务。客户端和服务器都需要通过证书进行身份验证。在 IDE 中运行 JUnit 测试时,我可以成功调用该服务,但在 JBoss 中运行时无法连接。 密钥库/信任库配置详细信息:在IDE和JBoss中,我通过系统属性设置密钥库和信任库:,,, 日志配置:在JBoss中,我已经通过系统属性< code>javax.net.debug=
我在连接到SQL数据库时遇到问题。每当我尝试连接到SQL server时,都会出现以下错误; 这是使用 每当我使用JtDS驱动程序时(如本文所建议的),我仍然无法连接到SQL server,并出现以下错误。 我使用的连接字符串:(使用jtds) 或者不使用jtds时... 我还有一个服务器,它实际上能够使用这些配置运行并连接到数据库。我只是在本地连接数据库时不断遇到这些错误。 我正在运行macOS