-
15. Re: activemq exception
tbw Jan 5, 2017 11:49 AM (in response to jbertram)I get this message if i have spring boot in maven. Version in archive is without this problem.
-
16. Re: activemq exception
jbertram Jan 5, 2017 12:00 PM (in response to tbw)So what exactly is the problem in the version in the archive you attached?
-
17. Re: activemq exception
tbw Jan 5, 2017 12:50 PM (in response to jbertram)1. spring boot is problem, not main problem. Is this a wildfly (libs) or spring bug?
2. Main problem is jms is not working with ssl.
Archive contains "http-remote" and working (jms + ejb), but if you change (by changing comments) to "https-remote" only ejb is working.
All from one context.
also you can add to pom.xml for generating class versions exception (plus @SpringBootApplication on main class):
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version></parent>
-
18. Re: activemq exception
jbertram Jan 5, 2017 2:06 PM (in response to tbw)1. spring boot is problem, not main problem. Is this a wildfly (libs) or spring bug?
I don't have any experience with Spring Boot so it's hard to say.
2. Main problem is jms is not working with ssl.
In my previous comment I asked "what exactly is the problem." Your answer here isn't very exact. Can you elaborate on the problem you're seeing with SSL when Spring Boot is taken out of the equation?
I also previously asked for a reproducible test-case and you provided an archive with a Maven project. However, you provided no instructions on how to use the contents of the archive to reproduce the issue and certainly no automated way to execute the test. I'm trying to provide some help with limited time so I'm not inclined to dig through your project and deduce what needs to be done. You seem like a user with a legitimate question, but I honestly can't tell if you're trolling or not when your comments are so vague and unhelpful.
-
19. Re: activemq exception
tbw Jan 5, 2017 2:34 PM (in response to jbertram)>Can you elaborate on the problem you're seeing with SSL when Spring Boot is taken out of the equation?
java.lang.ClassCastException: org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V2 cannot be cast to org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V3
Make db as config datasource
copy wildfly config to wildfly config
copy ejb to wildfly deploy dir
start wildfly (standalone.bat -c standalone-full.xml)
run: maven clean compile packege exec:exec
see normal work
change http-remote to https-remote and you can see work of ejb and exceptions for jms
-
20. Re: activemq exception
jbertram Jan 5, 2017 2:56 PM (in response to tbw)>Can you elaborate on the problem you're seeing with SSL when Spring Boot is taken out of the equation?
java.lang.ClassCastException: org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V2 cannot be cast to org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V3
I'm confused. Previously I asked if you were still seeing this CCE and you said, "I get this message if i have spring boot in maven. Version in archive is without this problem." I took this to mean that the archive you attached (i.e. without Spring Boot) didn't exhibit the CCE. However, now you're saying that you do see the CCE even without Spring Boot? Please clarify.
Make db as config datasource
Your test requires a PostgreSQL instance to reproduce a problem with JMS and SSL? Can you elaborate on this point? If the database isn't required please provide a test that can run without it. I don't really have any interest is setting up PostgreSQL on my box.
To be clear, test-cases like this should only include things absolutely necessary to reproduce the problem so as to simplify the investigation process (and also make it more likely that someone would provide assistance).
-
21. Re: activemq exception
mnovak Jan 6, 2017 10:27 AM (in response to jbertram)Hi Andrew,
could you check mvn clean dependency:tree of your pom.xml? Your config seems to be ok afaict. Is there netty on the classpath? Are there any same libraries?
Could you try to place jboss client jms bom as first dependency in the pom?
Thanks,
Mirek
-
22. Re: activemq exception
tbw Jan 7, 2017 2:18 PM (in response to mnovak)>could you check mvn clean dependency:tree of your pom.xml?
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ WC ---
[INFO] WC:WC:jar:1.0
[INFO] +- WC:SharedNetLib:jar:1.0-SNAPSHOT:compile
[INFO] +- org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:jar:1.0.0.Final:compile
[INFO] +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:pom:1.0.1.Final:compile
[INFO] +- org.wildfly:wildfly-ejb-client-bom:pom:10.1.0.Final:runtime
[INFO] | +- org.jboss:jboss-ejb-client:jar:2.1.4.Final:compile
[INFO] | +- org.jboss:jboss-remote-naming:jar:2.0.4.Final:compile
[INFO] | +- org.jboss.marshalling:jboss-marshalling:jar:1.4.11.Final:compile
[INFO] | +- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.11.Final:compile
[INFO] | +- org.jboss.remoting:jboss-remoting:jar:4.0.21.Final:compile
[INFO] | +- org.jboss.sasl:jboss-sasl:jar:1.0.5.Final:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:runtime
[INFO] | +- org.jboss.xnio:xnio-api:jar:3.4.0.Final:compile
[INFO] | | \- org.wildfly.common:wildfly-common:jar:1.1.0.Final:compile
[INFO] | +- org.jboss.xnio:xnio-nio:jar:3.4.0.Final:compile
[INFO] | \- org.wildfly.checkstyle:wildfly-checkstyle-config:jar:1.0.4.Final:compile
[INFO] +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:runtime
[INFO] \- org.wildfly:wildfly-jms-client-bom:pom:10.0.0.Final:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- org.apache.activemq:artemis-commons:jar:1.1.0.wildfly-011:compile
[INFO] | +- io.netty:netty-all:jar:4.0.30.Final:compile
[INFO] | \- com.google.guava:guava:jar:18.0:compile
[INFO] +- org.apache.activemq:artemis-core-client:jar:1.1.0.wildfly-011:compile
[INFO] | +- org.jgroups:jgroups:jar:3.6.0.Final:compile
[INFO] | +- org.apache.activemq:artemis-selector:jar:1.1.0.wildfly-011:compile
[INFO] | \- org.apache.activemq:artemis-journal:jar:1.1.0.wildfly-011:compile
[INFO] | \- org.apache.activemq:artemis-native:jar:1.1.0.wildfly-011:compile
[INFO] +- org.apache.activemq:artemis-hqclient-protocol:jar:1.1.0.wildfly-011:compile
[INFO] +- org.apache.activemq:artemis-jms-client:jar:1.1.0.wildfly-011:compile
[INFO] | \- javax.inject:javax.inject:jar:1:compile
[INFO] +- org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec:jar:1.0.0.Final:compile
[INFO] \- org.slf4j:jcl-over-slf4j:jar:1.7.7.jbossorg-1:compile
[INFO] \- org.slf4j:slf4j-api:jar:1.7.7.jbossorg-1:compile
>Could you try to place jboss client jms bom as first dependency in the pom?
After this i got a similar result (ejb is work and jms is broken).
On server side under debug logging i see only ejb call text, without jms errors.
>Is there netty on the classpath? Are there any same libraries?
no
-
23. Re: activemq exception
tbw Jan 8, 2017 7:20 AM (in response to jbertram)Upgraded version of test case without postgres dependency
1. copy wildfly standalone-full.xml to wildfly config dir (plus server.keystore in this directory too)
2. copy Server.ejb to wildfly deploy dir
3. start wildfly (standalone.bat -c standalone-full.xml)
4. run: maven clean compile packege exec:exec
result: no exceptrions, jms is work (spam on console)
5. then change http-remote to https-remote (lines 34, 42, 45) and you can see work of ejb and exceptions for jms
Current dependencies:
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ WC ---
[INFO] WC:WC:jar:1.0
[INFO] +- org.wildfly:wildfly-jms-client-bom:pom:10.1.0.Final:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- io.netty:netty-all:jar:4.0.33.Final:compile
[INFO] | +- org.apache.activemq:artemis-commons:jar:1.1.0.wildfly-017:compile
[INFO] | | \- com.google.guava:guava:jar:18.0:compile
[INFO] | +- org.apache.activemq:artemis-core-client:jar:1.1.0.wildfly-017:compile
[INFO] | | +- org.apache.activemq:artemis-selector:jar:1.1.0.wildfly-017:compile
[INFO] | | \- org.apache.activemq:artemis-journal:jar:1.1.0.wildfly-017:compile
[INFO] | | \- org.apache.activemq:artemis-native:jar:1.1.0.wildfly-017:compile
[INFO] | +- org.apache.activemq:artemis-hqclient-protocol:jar:1.1.0.wildfly-017:compile
[INFO] | +- org.apache.activemq:artemis-jms-client:jar:1.1.0.wildfly-017:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.jboss:jboss-remote-naming:jar:2.0.4.Final:compile
[INFO] | +- org.jboss.marshalling:jboss-marshalling:jar:1.4.11.Final:compile
[INFO] | +- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.11.Final:compile
[INFO] | +- org.jboss.remoting:jboss-remoting:jar:4.0.21.Final:compile
[INFO] | +- org.jboss.sasl:jboss-sasl:jar:1.0.5.Final:compile
[INFO] | +- org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec:jar:1.0.0.Final:compile
[INFO] | +- org.jboss.xnio:xnio-api:jar:3.4.0.Final:compile
[INFO] | | \- org.wildfly.common:wildfly-common:jar:1.1.0.Final:compile
[INFO] | +- org.jboss.xnio:xnio-nio:jar:3.4.0.Final:compile
[INFO] | +- org.jgroups:jgroups:jar:3.6.10.Final:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.7.jbossorg-1:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.7.jbossorg-1:compile
[INFO] | \- org.wildfly.checkstyle:wildfly-checkstyle-config:jar:1.0.4.Final:compile
[INFO] +- org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:jar:1.0.0.Final:compile
[INFO] +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:pom:1.0.1.Final:compile
[INFO] +- org.wildfly:wildfly-ejb-client-bom:pom:10.1.0.Final:runtime
[INFO] | +- org.jboss:jboss-ejb-client:jar:2.1.4.Final:compile
[INFO] | \- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:runtime
[INFO] \- org.jboss.logging:jboss-logging:jar:3.3.0.Final:runtime
6. For spring test (spring-boot-starter-parent package), rollback step 5 to step 4 (all work). Then uncomment pom.xml at for lines 15-19, rebuild project and you can see:
WARN: AMQ212052: Packet PACKET(SessionBindingQueryResponseMessage_V2)[type=-8, channelID=13, packetObject=SessionBindingQueryResponseMessage_V2, exists=true, queueNames=[jms.queue.testQueue], autoCreateJmsQueues=false] was answered out of sequence due to a previous server timeout and it's being ignored
java.lang.Exception: trace
UPD.
Maybe i need to do something like this (Cannot use JMS over HTTPS port in WildFly ) for fixing step 5?
UPD2.
I was add spring problem to spring issue tracker.
[SPR-15111] Spring boot bug if wildfly libs is used - Spring JIRA
-
test2.7z.zip 19.2 KB
-
-
24. Re: activemq exception
mnovak Jan 10, 2017 2:20 AM (in response to tbw)Edited:
Hi Andrew,
I did a few tries and working configuration looks like this - messaging-activemq subsystem:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"> <server name="default"> ... <http-connector name="https-connector" socket-binding="https" endpoint="https-acceptor"> <param name="ssl-enabled" value="true"/> </http-connector> <http-acceptor name="https-acceptor" http-listener="undertow-https"/> <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="https-connector"/> ... </server> </subsystem>
undertow subsystem:
<subsystem xmlns="urn:jboss:domain:undertow:3.1"> ... <https-listener name="undertow-https" socket-binding="https" security-realm="https"/> .... </subsystem>
and security-realm "https" is configured like:
<management> ... <security-realm name="https"> <server-identities> <ssl> <keystore path="/home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/jboss-hornetq-testsuite/tests-eap7/target/test-classes/org/jboss/qa/artemis/test/transportprotocols/server.keystore" keystore-password="123456"/> </ssl> </server-identities> </security-realm> </security-realms> ... </management>
Client configures its truststore using system properties:
System.setProperty("javax.net.ssl.trustStore", trustStorePath); System.setProperty("javax.net.ssl.trustStorePassword", password);
Thanks,
Mirek
-
25. Re: activemq exception
tbw Jan 9, 2017 12:47 PM (in response to mnovak)I'm test this configuration but it is not work. I have a similar error for jms:
Failed to connect to any server. Servers tried: [https-remoting://localhost:8443 (java.io.IOException: Failed to configure SSL)]
(with work ejb over ssl)
Can you upload your standalone.xml here?
You have a wildfly from a future? I was download last wildfly 10.1 and it have the undertow 3.1 and activemq 1.0.
-
26. Re: activemq exception
mnovak Jan 10, 2017 2:24 AM (in response to tbw)Hi Andrew,
sorry, I tried on latest WF11/EAP 7.1. I modified the config above and changed versions of subsystem. Now it should on WF 10.1 as well but did not try it myself. Still configuration looks the same. Just use your schema version. Here is the xml config which I used.
Thanks,
Mirek
standalone-full-ha.xml:
<?xml version='1.0' encoding='UTF-8'?> <server xmlns="urn:jboss:domain:4.1"> <extensions> <extension module="org.jboss.as.clustering.infinispan"/> <extension module="org.jboss.as.clustering.jgroups"/> <extension module="org.jboss.as.connector"/> <extension module="org.jboss.as.deployment-scanner"/> <extension module="org.jboss.as.ee"/> <extension module="org.jboss.as.ejb3"/> <extension module="org.jboss.as.jaxrs"/> <extension module="org.jboss.as.jdr"/> <extension module="org.jboss.as.jmx"/> <extension module="org.jboss.as.jpa"/> <extension module="org.jboss.as.jsf"/> <extension module="org.jboss.as.jsr77"/> <extension module="org.jboss.as.logging"/> <extension module="org.jboss.as.mail"/> <extension module="org.jboss.as.modcluster"/> <extension module="org.jboss.as.naming"/> <extension module="org.jboss.as.pojo"/> <extension module="org.jboss.as.remoting"/> <extension module="org.jboss.as.sar"/> <extension module="org.jboss.as.security"/> <extension module="org.jboss.as.transactions"/> <extension module="org.jboss.as.webservices"/> <extension module="org.jboss.as.weld"/> <extension module="org.wildfly.extension.batch.jberet"/> <extension module="org.wildfly.extension.bean-validation"/> <extension module="org.wildfly.extension.clustering.singleton"/> <extension module="org.wildfly.extension.io"/> <extension module="org.wildfly.extension.messaging-activemq"/> <extension module="org.wildfly.extension.request-controller"/> <extension module="org.wildfly.extension.security.manager"/> <extension module="org.wildfly.extension.undertow"/> <extension module="org.wildfly.iiop-openjdk"/> </extensions> <management> <security-realms> <security-realm name="ManagementRealm"> <authentication> <local default-user="$local" skip-group-loading="true"/> <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/> </authentication> <authorization map-groups-to-roles="false"> <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/> </authorization> </security-realm> <security-realm name="ApplicationRealm"> <authentication> <local default-user="$local" allowed-users="*" skip-group-loading="true"/> <properties path="application-users.properties" relative-to="jboss.server.config.dir"/> </authentication> <authorization> <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/> </authorization> </security-realm> <security-realm name="https"> <server-identities> <ssl> <keystore path="/home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/jboss-hornetq-testsuite/tests-eap7/target/test-classes/org/jboss/qa/artemis/test/transportprotocols/server.keystore" keystore-password="123456"/> </ssl> </server-identities> </security-realm> </security-realms> <audit-log> <formatters> <json-formatter name="json-formatter"/> </formatters> <handlers> <file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/> </handlers> <logger log-boot="true" log-read-only="false" enabled="false"> <handlers> <handler name="file"/> </handlers> </logger> </audit-log> <management-interfaces> <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true"> <socket-binding http="management-http"/> </http-interface> </management-interfaces> <access-control provider="simple"> <role-mapping> <role name="SuperUser"> <include> <user name="$local"/> </include> </role> </role-mapping> </access-control> </management> <profile> <subsystem xmlns="urn:jboss:domain:logging:3.0"> <console-handler name="CONSOLE"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> </console-handler> <periodic-rotating-file-handler name="FILE" autoflush="true"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> <size-rotating-file-handler name="FILE-TRACE" autoflush="true"> <level name="TRACE"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server-trace.log"/> <rotate-size value="500M"/> <max-backup-index value="500"/> <append value="true"/> </size-rotating-file-handler> <logger category="com.arjuna"> <level name="WARN"/> </logger> <logger category="org.jboss.as.config"> <level name="DEBUG"/> </logger> <logger category="sun.rmi"> <level name="WARN"/> </logger> <logger category="org.apache.activemq"> <level name="TRACE"/> </logger> <root-logger> <level name="INFO"/> <handlers> <handler name="FILE"/> <handler name="FILE-TRACE"/> <handler name="CONSOLE"/> </handlers> </root-logger> <formatter name="PATTERN"> <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/> </formatter> <formatter name="COLOR-PATTERN"> <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/> </formatter> </subsystem> <subsystem xmlns="urn:jboss:domain:batch-jberet:1.0"> <default-job-repository name="in-memory"/> <default-thread-pool name="batch"/> <job-repository name="in-memory"> <in-memory/> </job-repository> <thread-pool name="batch"> <max-threads count="10"/> <keepalive-time time="30" unit="seconds"/> </thread-pool> </subsystem> <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/> <subsystem xmlns="urn:jboss:domain:datasources:4.0"> <datasources> <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource> <drivers> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> </driver> </drivers> </datasources> </subsystem> <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0"> <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/> </subsystem> <subsystem xmlns="urn:jboss:domain:ee:4.0"> <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement> <concurrent> <context-services> <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/> </context-services> <managed-thread-factories> <managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/> </managed-thread-factories> <managed-executor-services> <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/> </managed-executor-services> <managed-scheduled-executor-services> <managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/> </managed-scheduled-executor-services> </concurrent> <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/> </subsystem> <subsystem xmlns="urn:jboss:domain:ejb3:4.0"> <session-bean> <stateless> <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/> </stateless> <stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/> <singleton default-access-timeout="5000"/> </session-bean> <mdb> <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> <pools> <bean-instance-pools> <strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/> <strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/> </bean-instance-pools> </pools> <caches> <cache name="simple"/> <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/> </caches> <passivation-stores> <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/> </passivation-stores> <async thread-pool-name="default"/> <timer-service thread-pool-name="default" default-data-store="default-file-store"> <data-stores> <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/> </data-stores> </timer-service> <remote connector-ref="http-remoting-connector" thread-pool-name="default"/> <thread-pools> <thread-pool name="default"> <max-threads count="10"/> <keepalive-time time="100" unit="milliseconds"/> </thread-pool> </thread-pools> <iiop enable-by-default="false" use-qualified-name="false"/> <default-security-domain value="other"/> <default-missing-method-permissions-deny-access value="true"/> <log-system-exceptions value="true"/> </subsystem> <subsystem xmlns="urn:jboss:domain:io:1.1"> <worker name="default"/> <buffer-pool name="default"/> </subsystem> <subsystem xmlns="urn:jboss:domain:infinispan:4.0"> <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server"> <transport lock-timeout="60000"/> <replicated-cache name="default" mode="SYNC"> <transaction mode="BATCH"/> </replicated-cache> </cache-container> <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan"> <transport lock-timeout="60000"/> <distributed-cache name="dist" mode="ASYNC" l1-lifespan="0" owners="2"> <locking isolation="REPEATABLE_READ"/> <transaction mode="BATCH"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan"> <transport lock-timeout="60000"/> <distributed-cache name="dist" mode="ASYNC" l1-lifespan="0" owners="2"> <locking isolation="REPEATABLE_READ"/> <transaction mode="BATCH"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan"> <transport lock-timeout="60000"/> <local-cache name="local-query"> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </local-cache> <invalidation-cache name="entity" mode="SYNC"> <transaction mode="NON_XA"/> <eviction strategy="LRU" max-entries="10000"/> <expiration max-idle="100000"/> </invalidation-cache> <replicated-cache name="timestamps" mode="ASYNC"/> </cache-container> </subsystem> <subsystem xmlns="urn:jboss:domain:iiop-openjdk:1.0"> <initializers transactions="spec" security="identity"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/> <subsystem xmlns="urn:jboss:domain:jca:4.0"> <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/> <bean-validation enabled="true"/> <default-workmanager> <short-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </short-running-threads> <long-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </long-running-threads> </default-workmanager> <cached-connection-manager/> </subsystem> <subsystem xmlns="urn:jboss:domain:jdr:1.0"/> <subsystem xmlns="urn:jboss:domain:jgroups:4.0"> <channels default="ee"> <channel name="ee" stack="udp"/> </channels> <stacks> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> </stack> <stack name="tcp"> <transport type="TCP" socket-binding="jgroups-tcp"/> <protocol type="MPING" socket-binding="jgroups-mping"/> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> <protocol type="FD"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK2"/> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="MFC"/> <protocol type="FRAG2"/> </stack> </stacks> </subsystem> <subsystem xmlns="urn:jboss:domain:jmx:1.3"> <expose-resolved-model/> <expose-expression-model/> <remoting-connector/> </subsystem> <subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jsf:1.0"/> <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/> <subsystem xmlns="urn:jboss:domain:mail:2.0"> <mail-session name="default" jndi-name="java:jboss/mail/Default"> <smtp-server outbound-socket-binding-ref="mail-smtp"/> </mail-session> </subsystem> <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"> <server name="default"> <security enabled="false"/> <cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/> <journal compact-min-files="0" min-files="10"/> <security-setting name="#"> <role name="guest" delete-non-durable-queue="true" create-non-durable-queue="true" consume="true" send="true"/> </security-setting> <address-setting name="#" redistribution-delay="1000" message-counter-history-day-limit="10" page-size-bytes="2097152" max-size-bytes="10485760" expiry-address="jms.queue.ExpiryQueue" dead-letter-address="jms.queue.DLQ"/> <http-connector name="http-connector" endpoint="https-acceptor" socket-binding="https"/> <http-connector name="https-connector" socket-binding="https" endpoint="https-acceptor"> <param name="ssl-enabled" value="true"/> </http-connector> <http-connector name="http-connector-throughput" endpoint="http-acceptor-throughput" socket-binding="http"> <param name="batch-delay" value="50"/> </http-connector> <in-vm-connector name="in-vm" server-id="0"/> <http-acceptor name="https-acceptor" http-listener="undertow-https"/> <http-acceptor name="http-acceptor-throughput" http-listener="default"> <param name="batch-delay" value="50"/> <param name="direct-deliver" value="false"/> </http-acceptor> <in-vm-acceptor name="in-vm" server-id="0"/> <broadcast-group name="bg-group1" connectors="http-connector" jgroups-channel="activemq-cluster"/> <discovery-group name="dg-group1" jgroups-channel="activemq-cluster"/> <cluster-connection name="my-cluster" discovery-group="dg-group1" connector-name="http-connector" address="jms"/> <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/> <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/> <jms-queue name="InQueue" entries="java:jboss/exported/jms/queue/InQueue"/> <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/> <connection-factory name="RemoteConnectionFactory" reconnect-attempts="-1" block-on-acknowledge="true" ha="true" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="https-connector"/> <pooled-connection-factory name="activemq-ra" transaction="xa" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm"/> </server> </subsystem> <subsystem xmlns="urn:jboss:domain:modcluster:2.0"> <mod-cluster-config advertise-socket="modcluster" connector="ajp"> <dynamic-load-provider> <load-metric type="cpu"/> </dynamic-load-provider> </mod-cluster-config> </subsystem> <subsystem xmlns="urn:jboss:domain:naming:2.0"> <remote-naming/> </subsystem> <subsystem xmlns="urn:jboss:domain:pojo:1.0"/> <subsystem xmlns="urn:jboss:domain:remoting:3.0"> <endpoint/> <http-connector name="http-remoting-connector" connector-ref="default"/> </subsystem> <subsystem xmlns="urn:jboss:domain:resource-adapters:4.0"/> <subsystem xmlns="urn:jboss:domain:request-controller:1.0"/> <subsystem xmlns="urn:jboss:domain:sar:1.0"/> <subsystem xmlns="urn:jboss:domain:security-manager:1.0"> <deployment-permissions> <maximum-set> <permission class="java.security.AllPermission"/> </maximum-set> </deployment-permissions> </subsystem> <subsystem xmlns="urn:jboss:domain:security:1.2"> <security-domains> <security-domain name="other" cache-type="default"> <authentication> <login-module code="Remoting" flag="optional"> <module-option name="password-stacking" value="useFirstPass"/> <module-option name="unauthenticatedIdentity" value="guest"/> </login-module> <login-module code="RealmDirect" flag="required"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> </authentication> </security-domain> <security-domain name="jboss-web-policy" cache-type="default"> <authorization> <policy-module code="Delegating" flag="required"/> </authorization> </security-domain> <security-domain name="jboss-ejb-policy" cache-type="default"> <authorization> <policy-module code="Delegating" flag="required"/> </authorization> </security-domain> <security-domain name="jaspitest" cache-type="default"> <authentication-jaspi> <login-module-stack name="dummy"> <login-module code="Dummy" flag="optional"/> </login-module-stack> <auth-module code="Dummy"/> </authentication-jaspi> </security-domain> </security-domains> </subsystem> <subsystem xmlns="urn:jboss:domain:singleton:1.0"> <singleton-policies default="default"> <singleton-policy name="default" cache-container="server"> <simple-election-policy/> </singleton-policy> </singleton-policies> </subsystem> <subsystem xmlns="urn:jboss:domain:transactions:3.0"> <core-environment> <process-id> <uuid/> </process-id> </core-environment> <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/> </subsystem> <subsystem xmlns="urn:jboss:domain:undertow:3.1"> <buffer-cache name="default"/> <server name="default-server"> <ajp-listener name="ajp" socket-binding="ajp"/> <http-listener name="default" socket-binding="http" redirect-socket="https"/> <https-listener name="undertow-https" security-realm="https" socket-binding="https"/> <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/> <websockets/> </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="JBoss-EAP/7"/> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/> </filters> </subsystem> <subsystem xmlns="urn:jboss:domain:webservices:2.0"> <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> <endpoint-config name="Standard-Endpoint-Config"/> <endpoint-config name="Recording-Endpoint-Config"> <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM"> <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/> </pre-handler-chain> </endpoint-config> <client-config name="Standard-Client-Config"/> </subsystem> <subsystem xmlns="urn:jboss:domain:weld:3.0"/> </profile> <interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:127.0.0.1}"/> </interface> <interface name="private"> <inet-address value="${jboss.bind.address.private:127.0.0.1}"/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces> <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/> <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/> <socket-binding name="http" port="${jboss.http.port:8080}"/> <socket-binding name="https" port="${jboss.https.port:8443}"/> <socket-binding name="iiop" interface="unsecure" port="3528"/> <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/> <socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/> <socket-binding name="jgroups-tcp" interface="private" port="7600"/> <socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/> <socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/> <socket-binding name="jgroups-udp-fd" interface="private" port="54200"/> <socket-binding name="modcluster" port="0" multicast-address="${jboss.default.multicast.address:224.0.1.105}" multicast-port="23364"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group> </server>
-
27. Re: activemq exception
tbw Jan 10, 2017 3:21 PM (in response to mnovak)Failed to connect to any server. Servers tried: [https-remoting://localhost:8443 (java.io.IOException: Failed to configure SSL)]
UPD.
Also i recommend to use http2:
<https-listener name="default-https" socket-binding="https" security-realm="HttpsRealm" enabled-protocols="TLSv1.2" enable-http2="true"/>
becouse http2 is binary, support compression and many other userful things.
My problem is not in using http2.
-
28. Re: activemq exception
mnovak Jan 11, 2017 2:19 AM (in response to tbw)I guess the problem is that there is use of SSL for JNDI lookup in your code. What's the stacktrace in your client code?
Configuration I've provided is for using secured SSL connection when connecting to JMS(Artemis). Thus "ssl" configuration is present on https-acceptor. Could you remove any authentication and ejb things from Context properties and try? At least we'll know that JMS is ok.
-
29. Re: activemq exception
tbw Jan 12, 2017 12:51 PM (in response to mnovak)>What's the stacktrace in your client code?
INFO: JBoss EJB Client version 2.1.4.Final
remote.add(2,10) => 12
remote.sayHello('MiddlewareMagic') => [MathBean] Hello, MiddlewareMagic
goJms
init
эт 12, 2017 8:48:51 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: EJBCLIENT000017: Received server version 2 and marshalling strategies [river]
эт 12, 2017 8:48:51 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@12405818, receiver=Remoting connection EJB receiver [connec
on=Remoting connection <5c551118> on endpoint "config-based-naming-client-endpoint" <314c508a>,channel=jboss.ejb,nodename=desktop-9rfidkc]} on channel Channel ID ff9efaf3 (outbound) of Remoting connection 16267862
o localhost/127.0.0.1:8080 of endpoint "config-based-naming-client-endpoint" <314c508a>
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
init end
эт 12, 2017 8:48:52 PM org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl createTransportConnection
WARN: AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.
java.lang.IllegalStateException: Unable to create NettyConnector for 127.0.0.1:8443
at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.start(NettyConnector.java:445)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1007)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1053)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1232)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:867)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:769)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:238)
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:760)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:724)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:255)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:248)
at WC.WC.init(WC.java:179)
at WC.WC.goJms(WC.java:121)
at WC.WC.connectToTargetServer(WC.java:84)
at WC.WC.main(WC.java:19)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadKeystore(SSLSupport.java:106)
at org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadTrustManager(SSLSupport.java:89)
at org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.createContext(SSLSupport.java:54)
at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.start(NettyConnector.java:441)
... 14 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
... 23 more
Exception in thread "main" javax.jms.JMSRuntimeException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.JmsExceptionUtils.convertToRuntimeException(JmsExceptionUtils.java:88)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:262)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:248)
at WC.WC.init(WC.java:179)
at WC.WC.goJms(WC.java:121)
at WC.WC.connectToTargetServer(WC.java:84)
at WC.WC.main(WC.java:19)
Caused by: javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:727)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext(ActiveMQConnectionFactory.java:255)
... 5 more
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:778)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:724)
... 6 more
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
>Could you remove any authentication and ejb things from Context properties and try?
At now this is problem, i have errors for ejb.