It throws below error and restarts thereafter without printing much logs.
TcpDiscoverySpi [tcp-disco-sock-reader-[]-#13-#76] Failed to initialize connection (this can happen due to short time network problems and can be ignored if does not affect node discovery) [sock=Socket[addr=/10.178.19.121,port=45450,localport=18036]]
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:?]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:115) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:168) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:140) ~[?:?]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:252) ~[?:?]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:292) ~[?:?]
at java.io.BufferedInputStream.read(BufferedInputStream.java:351) ~[?:?]
at org.apache.ignite.spi.discovery.tcp.ServerImpl$SocketReader.body(ServerImpl.java:6784) ~[ignite-core-2.10.0.jar!/:2.10.0]
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:58) ~[ignite-core-2.10.0.jar!/:2.10.0]
What could be the potential reason for this error and how to prevent Ignite from throwing this error?
I am running Jmeter 5.4.1 using openjdk 11 across all Linux machines. I tried using ubuntu 18.04.5, ubuntu 20.04.2, and Debian 10 which all had the same issues. I am able to run tests with specified ports or RMI SSL enabled but not both together. Everything works until I set client.rmi.localport then it has errors. Currently I don't have the firewall enabled as I was trying to eliminate obstacles. Nothing is on the specified ports until Jmeter runs (1099, 4888, 5888, 5889, 5900 are free and open). These are the changes I made to the user.properties file.
Client (Master)
remote_hosts=172.xx.xxx.xx1,172.xx.xx.xx2
server.rmi.ssl.keystore.file=/home/user/rmi_keystore.jks
client.rmi.localport=5888
Server (Slave)
server.rmi.ssl.keystore.file=/home/user/rmi_keystore.jks
server.rmi.localport=4888
/etc/hosts file looks like this on each machine just with the last number of ip changed and hostname to reflect that.
127.0.0.1 localhost
127.0.1.1 xxx-l1.xxx.xxxx.xxx xxx-l1
172.xx.xxx.xx1 xxx-l1.xxx.xxxx.xxx xxx-l1
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Currently trying to get it to work in GUI or command line but mostly been using the GUI to test with. I tried using either below to start the Client and run the tests.
./jmeter -Djava.rmi.server.hostname=172.xx.xxx.xx8
JVM_ARGS="-Xms1024m -Xmx4096m" ./jmeter -Djava.rmi.server.hostname=172.xx.xxx.xx8
If its a simple test only hitting google.com in the gui I'm able to run the distributed test once to success and then after that when rerunning the test it has these errors in the Client log and nothing generated in the Server log. If its a more complicated test or just including something as a view results tree on the first run it will show the errors. Command line also fails first run. The other log I have seen says Caused by: java.net.SocketException: Broken pipe (Write failed) inplace of the java.io.NotSerializableException but still shows same port messages.
2021-07-09 09:57:17,008 INFO o.a.j.s.FileServer: Default base='/home/user/Desktop/apache-jmeter-5.4.1/bin'
2021-07-09 09:57:17,011 INFO o.a.j.g.a.Load: Loading file: /home/user/Desktop/Summer2021/basictest.jmx
2021-07-09 09:57:17,012 INFO o.a.j.s.FileServer: Set new base='/home/user/Desktop/Summer2021'
2021-07-09 09:57:17,208 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2021-07-09 09:57:17,226 INFO o.a.j.s.SaveService: Using SaveService properties version 5.0
2021-07-09 09:57:17,228 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8
2021-07-09 09:57:17,230 INFO o.a.j.s.SaveService: Loading file: /home/user/Desktop/Summer2021/basictest.jmx
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2021-07-09 09:57:17,255 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2021-07-09 09:57:17,383 INFO o.a.j.s.FileServer: Set new base='/home/user/Desktop/Summer2021'
2021-07-09 09:57:23,234 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 172.xx.xxx.xx1
2021-07-09 09:57:24,033 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [172.xx.xxx.xx1] # Fri Jul 09 09:57:24 MDT 2021 (1625846244032)
2021-07-09 09:57:24,033 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2021-07-09 09:57:24,034 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2021-07-09 09:57:24,034 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2021-07-09 09:57:24,254 INFO o.a.j.r.RmiUtils: Resolving by name the value of System property 'java.rmi.server.hostname': 172.xx.xxx.xx8
2021-07-09 09:57:24,254 INFO o.a.j.r.RmiUtils: Local IP address=172.xx.xxx.xx8
2021-07-09 09:57:24,256 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2021-07-09 09:57:24,452 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=/172.xx.xxx.xx8,localport=5890]]
2021-07-09 09:57:24,455 INFO o.a.j.r.RmiUtils: Resolving by name the value of System property 'java.rmi.server.hostname': 172.xx.xxx.xx8
2021-07-09 09:57:24,455 INFO o.a.j.r.RmiUtils: Local IP address=172.xx.xxx.xx8
2021-07-09 09:57:24,655 INFO o.a.j.r.SSLRMIServerSocketFactory: Created SSLSocket: [SSL: ServerSocket[addr=/172.xx.xxx.xx8,localport=5889]]
2021-07-09 09:57:25,209 INFO o.a.j.e.ClientJMeterEngine: sent test to 172.xx.xxx.xx1 basedir='.'
2021-07-09 09:57:25,209 INFO o.a.j.e.ClientJMeterEngine: Sending properties {}
2021-07-09 09:57:25,212 INFO o.a.j.e.ClientJMeterEngine: sent run command to 172.xx.xxx.xx1
2021-07-09 09:57:25,213 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[172.xx.xxx.xx1]
2021-07-09 09:57:25,214 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, 172.xx.xxx.xx1)
2021-07-09 09:57:25,445 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, 172.xx.xxx.xx1)
2021-07-09 09:57:29,906 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 172.xx.xxx.xx1
2021-07-09 09:57:30,347 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [172.xx.xxx.xx1] # Fri Jul 09 09:57:30 MDT 2021 (1625846250347)
2021-07-09 09:57:30,347 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2021-07-09 09:57:30,348 INFO o.a.j.r.RmiUtils: Resolving by name the value of System property 'java.rmi.server.hostname': 172.xx.xxx.xx8
2021-07-09 09:57:30,348 INFO o.a.j.r.RmiUtils: Local IP address=172.xx.xxx.xx8
2021-07-09 09:57:30,550 ERROR o.a.j.e.ConvertListeners: RemoteException occurred while replacing Remotable item.
java.rmi.server.ExportException: Listen failed on port: 5890; nested exception is:
java.io.IOException: Could not bind to /172.xx.xxx.xx8 using port 5890
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:337) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:243) ~[?:?]
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:412) ~[?:?]
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147) ~[?:?]
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:234) ~[?:?]
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:470) ~[?:?]
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:381) ~[?:?]
at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:260) ~[?:?]
at org.apache.jmeter.samplers.RemoteSampleListenerImpl.<init>(RemoteSampleListenerImpl.java:43) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.ConvertListeners.addNode(ConvertListeners.java:77) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:975) ~[jorphan.jar:5.4.1]
at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:136) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:134) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4.1]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) [?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
Caused by: java.io.IOException: Could not bind to /172.xx.xxx.xx8 using port 5890
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:138) ~[ApacheJMeter_core.jar:5.4.1]
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:670) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324) ~[?:?]
... 28 more
Caused by: java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:436) ~[?:?]
at java.net.ServerSocket.bind(ServerSocket.java:395) ~[?:?]
at java.net.ServerSocket.<init>(ServerSocket.java:257) ~[?:?]
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:181) ~[?:?]
at sun.security.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:78) ~[?:?]
at sun.security.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:87) ~[?:?]
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:136) ~[ApacheJMeter_core.jar:5.4.1]
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:670) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324) ~[?:?]
... 28 more
2021-07-09 09:57:30,556 INFO o.a.j.r.RmiUtils: Resolving by name the value of System property 'java.rmi.server.hostname': 172.xx.xxx.xx8
2021-07-09 09:57:30,556 INFO o.a.j.r.RmiUtils: Local IP address=172.xx.xxx.xx8
2021-07-09 09:57:30,751 ERROR o.a.j.e.ConvertListeners: Error replacing class org.apache.jmeter.threads.RemoteThreadsListenerTestElement by wrapper: class org.apache.jmeter.threads.RemoteThreadsListenerWrapper
java.rmi.server.ExportException: Listen failed on port: 5889; nested exception is:
java.io.IOException: Could not bind to /172.xx.xxx.xx8 using port 5889
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:337) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:243) ~[?:?]
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:412) ~[?:?]
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147) ~[?:?]
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:234) ~[?:?]
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:470) ~[?:?]
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:381) ~[?:?]
at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:260) ~[?:?]
at org.apache.jmeter.threads.RemoteThreadsListenerImpl.<init>(RemoteThreadsListenerImpl.java:58) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.ConvertListeners.addNode(ConvertListeners.java:63) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:975) ~[jorphan.jar:5.4.1]
at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:136) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:134) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4.1]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) [?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
Caused by: java.io.IOException: Could not bind to /172.xx.xxx.xx8 using port 5889
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:138) ~[ApacheJMeter_core.jar:5.4.1]
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:670) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324) ~[?:?]
... 28 more
Caused by: java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:436) ~[?:?]
at java.net.ServerSocket.bind(ServerSocket.java:395) ~[?:?]
at java.net.ServerSocket.<init>(ServerSocket.java:257) ~[?:?]
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:181) ~[?:?]
at sun.security.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:78) ~[?:?]
at sun.security.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:87) ~[?:?]
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:136) ~[ApacheJMeter_core.jar:5.4.1]
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:670) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324) ~[?:?]
... 28 more
2021-07-09 09:57:30,770 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.io.NotSerializableException: org.apache.jmeter.threads.RemoteThreadsListenerTestElement
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162) ~[?:?]
at com.sun.proxy.$Proxy24.rconfigure(Unknown Source) ~[?:?]
at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:152) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:134) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4.1]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) [?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
Caused by: java.io.NotSerializableException: org.apache.jmeter.threads.RemoteThreadsListenerTestElement
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1185) ~[?:?]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349) ~[?:?]
at java.util.HashMap.internalWriteEntries(HashMap.java:1839) ~[?:?]
at java.util.HashMap.writeObject(HashMap.java:1411) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1145) ~[?:?]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1497) ~[?:?]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433) ~[?:?]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179) ~[?:?]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553) ~[?:?]
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:442) ~[?:?]
at org.apache.jorphan.collections.HashTree.writeObject(HashTree.java:951) ~[jorphan.jar:5.4.1]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1145) ~[?:?]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1497) ~[?:?]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433) ~[?:?]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179) ~[?:?]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349) ~[?:?]
at java.util.HashMap.internalWriteEntries(HashMap.java:1840) ~[?:?]
at java.util.HashMap.writeObject(HashMap.java:1411) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1145) ~[?:?]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1497) ~[?:?]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433) ~[?:?]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179) ~[?:?]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553) ~[?:?]
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:442) ~[?:?]
at org.apache.jorphan.collections.HashTree.writeObject(HashTree.java:951) ~[jorphan.jar:5.4.1]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1145) ~[?:?]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1497) ~[?:?]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433) ~[?:?]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179) ~[?:?]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349) ~[?:?]
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:293) ~[?:?]
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155) ~[?:?]
... 21 more
2021-07-09 09:57:30,773 INFO o.a.j.e.ClientJMeterEngine: Interrupting RMI Reaper
2021-07-09 09:57:30,773 ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.io.NotSerializableException: org.apache.jmeter.threads.RemoteThreadsListenerTestElement
2021-07-09 09:57:33,605 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[]
2021-07-09 09:57:33,606 ERROR o.a.j.e.DistributedRunner: The following remote engines have not started:[172.xx.xxx.xx1]
If anyone knows what I am doing wrong or need to change, it would be much appreciated.
If you want to override the client.rmi.localport setting make sure that it is the same on master and all the slaves
So my expectation is that if you add the next line:
client.rmi.localport=5888
to all the slaves user.properties file you setup should start working normally.
More information:
Remote hosts and RMI configuration
JMeter Distributed Testing with Docker
Apache JMeter Distributed Testing Step-by-step
I am trying to call SFMC Cloud endpoint and I need to connect through TLS. I created a trust store that contains 2 certificate one for smfc token authentication and another for the actual soap endpoint. I check the truststore and both certificates are already imported. However when I tried to deploy my application, it throws this error :
org.mule.soap.api.transport.DispatcherException: An error occured while sending the SOAP request
at com.mulesoft.connector.salesforce.marketing.internal.connection.provider.SalesforceMarketingTransportDispatcher.dispatch (SaleforceMarketingTransportDispatcher.java:58) ~[mule-sfdc-marketing-cloud-connector-3.1.6-mule-pluigin.jar:?]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[cxf-core-3.3.5.jar:3.3.5]
at org.apache.cxf.endpoint.ClientImpl.doInvoker(ClientImpl.java:530) ~[cxf-core-3.3.5]
at org.apache.cxf.endpoint.ClientImpl.invoker(ClientImpl.java:441) ~[cxf-core-3.3.5]
at org.mule.soap.internal.client.AbstractSoapCxfClient.invoke(AbstractSoapCxfClient.java:116) ~[mule-soap-engine-1.3.2.jar:?]
at org.mule.soap.internal.client.AbstractSoapCxfClient.consume(AbstractSoapCxfClient.java:102) ~[mule-soap-engine-1.3.2.jar:?]
at com.mulesoft.connector.salesforce.marketing.internal.connection.SalesforceMarketingCloudConnection.execute(SalesforceMarketingCloudConnection.java:62) ~[mule-sfdc-marketing-cloud-connector-3.1.6-mule-plugin.jar:?]
at com.mulesoft.connector.salesforce.marketing.internal.connection.SalesforceMarketingCloudConnection.execute(SalesforceMarketingCloudConnection.java:56) ~[mule-sfdc-marketing-cloud-connector-3.1.6-mule-plugin.jar:?]
at com.mulesoft.connector.salesforce.marketing.internal.connection.SalesforceMarketingCloudConnection.validate(SalesforceMarketingCloudConnection.java:50) ~[mule-sfdc-marketing-cloud-connector-3.1.6-mule-plugin.jar:?]
at com.mulesoft.connectors.commons.template.connection.provider.ConnectorConnectionProvider.validate(ConnectorConnectionProvider.java:36) ~[mule-connector-commons-2.1.0.jar:?]
at com.mulesoft.connectors.commons.template.connection.provider.ConnectorConnectionProvider.validate(ConnectorConnectionProvider.java:16) ~[mule-connector-commons-2.1.0.jar:?]
at org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.ExtensionOAuthUtils.validateOAuthConnection(ExtensionOAuthUtils.java:188) ~[mule-module-extensions-support-4.3.0-20201013:4.3.0-20201013]
at org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.BaseOAuthConnectionProviderWrapper.validate(BaseOAuthConnectionProviderWrapper.java:42) ~[mule-module-extensions-support-4.3.0-20201013:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DefaultConnectionManager.doTestConnectivity(DefaultConnectionManager.java:186) ~[mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DefaultConnectionManager.lambda$testConnectivity$1(DefaultConnectionManager.java:169) ~[mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DefaultConnectionManager.doTestConnectivity(DefaultConnectionManager.java:176) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DefaultConnectionManager.testConnectivity(DefaultConnectionManager.java:152) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter$EagerConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:176) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:98) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.connection.CompositeConnectionManager.testConnectivity(CompositeConnectionManager.java:115) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.module..extension.internal.runtime.config.LifecycleAwareConfigurationInstance$1.doWork(LifecycleAwareConfigurationInstance.java:194) [mule-module-extensions-support-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.api.retry.policy.AbstractPolicyTemplate.execure(AbstractPolicyTemplate.java:52) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at org.mule.runtime.core.internal.rety.async.RetryWorker.run(RetryWorker.java:56) [mule-core-4.3.0-20201013.jar:4.3.0-20201013]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTasl.java:264) [?:?]
at org.mule.service..scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:111) [mule-service-scheduler-1.3.2/:?]
at org.mule.service..scheduler.internal.RunnableFutureDecorator.doRun(RunnableFutureDecorator.java:54) [mule-service-scheduler-1.3.2/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:835) [?:?]
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alert.createSSLException(Alert.java:131) ~[?:?]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:320) ~[?:?]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:263) ~[?:?]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:258) ~[?:?]
at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:641) ~[?:?]
at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage360) ~[?:?]
at sun.security.ssl.SSLHandshake.consume(SSLHandshaker.java:392) ~[?:?]
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443) ~[?:?]
at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedActyion.run(SSLEngineImpl.java:1074) ~[?:?]
at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedActyion.run(SSLEngineImpl.java:1061) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:689) ~[?:?]
at sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:1008) ~[?:?]
at org.glashfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:274) ~[?:?]
at org.glashfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:723) ~[?:?]
at org.glashfish.grizzly.ssl.SSLFilter.doHandshakeStep(SSLFilter.java:345) ~[?:?]
at org.glashfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:637) ~[?:?]
at org.glashfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:349) ~[?:?]
at com.ning.http.client.providers.grizzly.SwitchingSSLFilter.handleRead(SwitchingSSLFilter.java:74) ~[?:?]
at org.glashfish.grizzly.filterchain.ExcecutorResolver$9.executer(ExcecutorResolver.java:119) ~[?:?]
at org.glashfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[?:?]
at org.glashfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[?:?]
at org.glashfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[?:?]
at org.glashfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[?:?]
at org.glashfish.grizzly.ProcessExecutor.executer(ProcessExecutor.java:77) ~[?:?]
at org.glashfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:540) ~[?:?]
at org.glashfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[?:?]
at org.glashfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:103) ~[?:?]
at org.glashfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) ~[?:?]
at org.glashfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) ~[?:?]
at org.glashfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) ~[?:?]
at org.glashfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) ~[?:?]
at org.glashfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) ~[?:?]
... 7 more
I verified that the certificates are in the truststore using this command :
keytool -list -v -keystore truststore.jks
Here is the configuration for the salesforce marketing cloud :
<sfdc-marketing-cloud:config name="Salesforce_Marketing_Cloud_Config" doc:name="Salesforce Marketing Cloud Config" doc:id="ceb6487e-d6ac-4aee-b7b3-d292d9657b3d" >
<sfdc-marketing-cloud:oauth-client-credentials-connection serviceUrl="${api.sfmc.url}" >
<tls:context >
<tls:trust-store path="keystore.jks" password="test123" type="jks" />
</tls:context>
<sfdc-marketing-cloud:oauth-client-credentials clientId="${api.sfmc.client.id}" clientSecret="${api.sfmc.client.secret}" tokenUrl="${api.sfmc.token.url}" />
</sfdc-marketing-cloud:oauth-client-credentials-connection>
</sfdc-marketing-cloud:config>
I'm using this app runtime :
<properties>
<app.runtime>4.3.0-20201013</app.runtime>
<munit.version>2.3.1</munit.version>
<mule.maven.plugin.version>3.4.2</mule.maven.plugin.version>
</properties>
SFMC connector version :
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-sfdc-marketing-cloud-connector</artifactId>
<version>3.1.4</version>
<classifier>mule-plugin</classifier>
</dependency>
Did I missed something? Thanks!
I am going through similar(http://activemq.2283324.n4.nabble.com/Sporadic-quot-Error-while-attempting-to-add-new-Connection-to-the-pool-nested-exception-is-javax-jms-td4741737.html) issues right now.
ActiveMQ version: 5.15.4
Environment: Windows
Karaf Version: 4.2.0
I am using ActiveMQ and Apache Karaf with camel and pax-jms. Multiple karaf
instances are using this one broker instance. My Karaf instances are
installed as a service, and so is ActiveMQ as well.
This is how my config looks like:
name=db-consumer
jms.url=tcp://localhost:61616
jms.username=<user>
jms.password=<password>
type=activemq
osgi.jndi.service.name=jms/consumer
Time and again, with high frequency of data, I am getting the following
error:
Uncategorized exception occurred during JMS processing; nested
exception is javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.BindException: Address already
in use: connect
Do I need to configure something specific in the broker or in the
configuration to resolve this issue?
I tried pool=transx, but it starves for transx.
I saw that, there is a related post (ActiveMQ gives: "Could not connect to broker URL: tcp://localhost:61616" after around 10 000 messages) on stackoverflow, but this seems to be a problem in spring. I am looking for solution in osgi with pax-jms.
--Update 1: Added error dump--
org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.BindException: Address already in use: connect
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316) ~[115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169) ~[115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:487) ~[115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:516) ~[52:org.apache.camel.camel-jms:2.20.3]
at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:440) ~[52:org.apache.camel.camel-jms:2.20.3]
at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:394) ~[52:org.apache.camel.camel-jms:2.20.3]
at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:157) ~[52:org.apache.camel.camel-jms:2.20.3]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) ~[51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.FatalFallbackErrorHandler.process(FatalFallbackErrorHandler.java:82) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.RedeliveryErrorHandler.deliverToFailureProcessor(RedeliveryErrorHandler.java:1063) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:474) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:117) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [51:org.apache.camel.camel-core:2.20.3]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112) [52:org.apache.camel.camel-jms:2.20.3]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:719) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:679) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:649) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1166) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1158) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1055) [115:org.apache.servicemix.bundles.spring-jms:4.3.14.RELEASE_1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.BindException: Address already in use: connect
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:374) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:304) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:244) ~[?:?]
at org.ops4j.pax.jms.activemq.ActiveMQConnectionFactoryFactory$1.createConnection(ActiveMQConnectionFactoryFactory.java:52) ~[?:?]
at Proxy907e4baf_5e06_4932_b3c9_aebc6215955c.createConnection(Unknown Source) ~[?:?]
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180) ~[?:?]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:474) ~[?:?]
... 38 more
Caused by: java.net.BindException: Address already in use: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:?]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:589) ~[?:?]
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:525) ~[?:?]
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:488) ~[?:?]
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) ~[?:?]
at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:169) ~[?:?]
at org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:52) ~[?:?]
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[?:?]
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72) ~[?:?]
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[?:?]
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:354) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:304) ~[?:?]
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:244) ~[?:?]
at org.ops4j.pax.jms.activemq.ActiveMQConnectionFactoryFactory$1.createConnection(ActiveMQConnectionFactoryFactory.java:52) ~[?:?]
at Proxy907e4baf_5e06_4932_b3c9_aebc6215955c.createConnection(Unknown Source) ~[?:?]
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180) ~[?:?]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:474) ~[?:?]
... 38 more
Update:
To people who might encounter this issue, please remember to use connection pooling on the client side. I was using Camel Bundles. And, switching to connection pooling might not work on the fly. Restart the broker and restart the instances to see the effect. I guess, there is some kind of connection caching going on, because of which I was not able to see the changes immediately.
The pax-jms version of connection pooling config looks like:
name=db-consumer
jms.url=tcp://localhost:61616
jms.username=<user>
jms.password=<password>
type=activemq
pool=pooledjms
osgi.jndi.service.name=jms/consumer
I could try transx pool as well, but pooledjms was the easiest one and it works for my requirements.
Getting below exception while executing a procedure in Spring boot application.
org.springframework.dao.DataAccessResourceFailureException: Error retrieving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLRecoverableException: Closed Connection
at org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:141) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.metadata.CallMetaDataContext.initializeMetaData(CallMetaDataContext.java:286) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.compileInternal(AbstractJdbcCall.java:303) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.compile(AbstractJdbcCall.java:288) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.checkCompiled(AbstractJdbcCall.java:348) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:386) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:193) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) [spring-tx-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115) [spring-aop-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508) ~[ojdbc6-11.2.0.3.jar!/:11.2.0.3.0]
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126) ~[tomcat-jdbc-8.5.15.jar!/:?]
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ~[tomcat-jdbc-8.5.15.jar!/:?]
at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:79) ~[tomcat-jdbc-8.5.15.jar!/:?]
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108) ~[tomcat-jdbc-8.5.15.jar!/:?]
at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81) ~[tomcat-jdbc-8.5.15.jar!/:?]
at com.sun.proxy.$Proxy78.getMetaData(Unknown Source) ~[?:?]
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:331) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
at org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:73) ~[spring-jdbc-4.3.9.RELEASE.jar!/:4.3.9.RELEASE]
I have provided following properties in DataSource.
dataSource = new org.apache.tomcat.jdbc.pool.DataSource();
dataSource.setInitialSize(5);
dataSource.setMaxActive(10);
dataSource.setMaxIdle(10);
dataSource.setMinIdle(5);
dataSource.setTimeBetweenEvictionRunsMillis(60000);
dataSource.setMinEvictableIdleTimeMillis(300000);
dataSource.setTestOnBorrow(true);
dataSource.setValidationInterval(60000);
dataSource.setValidationQuery(validationQuery);
dataSource.setRemoveAbandoned(true);
dataSource.setRemoveAbandonedTimeout(60000);
The same connection pool I am using to execute some other procedures and its working fine. Please suggest what I am missing here.
I have resolved this using Hikari connection pool.
Check this link for how to replace default Tomcat connection pool by Hikari connection pool.