I have Jmeter script, in which using Parallel controller with 2 threads. In one thread, I am sending web socket traffic and another one http traffic. In first iteration everything works fine, but in second http traffic thread gives below error.
Getting same error in both Jmeter 5.3 and 5.4. Getting error in highlighted part in screenshot.
021-11-21 23:10:47,046 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.NullPointerException: null
at org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:285) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.TransactionController.next(TransactionController.java:135) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.GenericController.next(GenericController.java:174) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.GenericController.next(GenericController.java:174) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291) [ApacheJMeter_core.jar:5.3]
at com.blazemeter.jmeter.controller.JMeterThreadParallel.run(JMeterThreadParallel.java:61) [jmeter-parallel-0.11.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_292]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
2021-11-21 23:10:47,047 INFO o.a.j.t.JMeterThread: Thread finished: org.apache.jmeter.threads.JMeterThread#75ae80c2 - Parallel Controller(Web Socket Http) - Http Traffic
This definitely seems a bug in Jmeter. Just found that, encountering error only when using Transaction Controller(that to in only second iteration). Error disappeared when I remove transaction controllers and had samplers directly.
Related
I am trying to implement the below site(without update attribute).I have taken a directory which has few files that needs to be put in the marklogic database. I have added the ML database configuration.
https://marklogic-community.github.io/marklogic-nifi-incubator/file-system-to-marklogic.html
Attached the screenshot. Please help.
Error :
2021-08-17 10:57:36,900 ERROR [Timer-Driven Process Thread-6] o.a.n.marklogic.processor.PutMarkLogic PutMarkLogic[id=017b100b-ebe4-1ae5-b791-0cc5e89e6e2c] : java.lang.NullPointerException
java.lang.NullPointerException: null
2021-08-17 10:57:36,905 INFO [Timer-Driven Process Thread-6] o.a.n.marklogic.processor.PutMarkLogic PutMarkLogic[id=017b100b-ebe4-1ae5-b791-0cc5e89e6e2c] Rolling back session
2021-08-17 10:57:36,906 ERROR [Timer-Driven Process Thread-6] o.a.n.marklogic.processor.PutMarkLogic PutMarkLogic[id=017b100b-ebe4-1ae5-b791-0cc5e89e6e2c] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException: java.lang.NullPointerException
↳ causes: org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException
org.apache.nifi.processor.exception.ProcessException: java.lang.NullPointerException
at org.apache.nifi.marklogic.processor.AbstractMarkLogicProcessor.logErrorAndRollbackSession(AbstractMarkLogicProcessor.java:215)
at org.apache.nifi.marklogic.processor.PutMarkLogic.onTrigger(PutMarkLogic.java:394)
at org.apache.nifi.marklogic.processor.PutMarkLogic.onTrigger(PutMarkLogic.java:329)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1202)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:214)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:103)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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: java.lang.NullPointerException: null
I figured out the error. It is that I didn’t set JAVA_HOME properly. Once I set it it’s working fine.
Frequently I have been receiving this Error.
15-Dec-2018 18:54:06.788 INFO [HikariPool-2 connection adder] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [sun.reflect.ConstructorAccessorImpl]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [sun.reflect.ConstructorAccessorImpl]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1355)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1341)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1206)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:393)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:92)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:55)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:243)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:706)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:692)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Moving ojdbc.jar file from Web app lib folder to Tomcat lib folder solved my problem.
I am using spring web socket api to implement Web Socket connection in my application. I have implemented this by extending spring TextWebSocketHandler using the example in the below link.
http://www.devglan.com/spring-boot/spring-websocket-integration-example-without-stomp.
It works most of the time. But, the connection stops sometimes, I see the below error where there is conneciton failure.
DEBUG [http-nio-8222-exec-9] [138F0E344FB38D5997135FD3BEF59EC2] 2017-12-06 05:33:44,418 LoggingWebSocketHandlerDecorator.java | (62) - Transport error in StandardWebSocketSession[id=20, uri=/connect/app-socket]
java.io.EOFException
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1134)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1074)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:63)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:767)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1347)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
DEBUG [http-nio-8222-exec-9] [138F0E344FB38D5997135FD3BEF59EC2] 2017-12-06 05:33:44,418 LoggingWebSocketHandlerDecorator.java | (70) - StandardWebSocketSession[id=20, uri=/connect/app-socket] closed with CloseStatus[code=1006, reason=null]
I'm trying to create my first flow using the QueryDatabaseTable to incrementally extract rows from an Oracle database table.
I'm getting the errors below. I enabled full debug but nothing else useful is logged.
Thoughts on what to try next?
2017-07-10 14:43:52,280 WARN [StandardProcessScheduler Thread-4] o.a.n.controller.StandardProcessorNode Timed out while waiting for OnScheduled of 'QueryDatabaseTable' processor to finish. An attempt is made to cancel the task via Thread.interrupt(). However it does not guarantee that the task will be canceled since the code inside current OnScheduled operation may have been written to ignore interrupts which may result in a runaway thread. This could lead to more issues, eventually requiring NiFi to be restarted. This is usually a bug in the target Processor 'QueryDatabaseTable[id=1e535f00-015d-1000-236d-7adebe14958a]' that needs to be documented, reported and eventually fixed.
2017-07-10 14:43:52,280 ERROR [StandardProcessScheduler Thread-4] o.a.n.p.standard.QueryDatabaseTable QueryDatabaseTable[id=1e535f00-015d-1000-236d-7adebe14958a] QueryDatabaseTable[id=1e535f00-015d-1000-236d-7adebe14958a] failed to invoke #OnScheduled method due to java.lang.RuntimeException: Timed out while executing one of processor's OnScheduled task.; processor will not be scheduled to run for 30 seconds: java.lang.RuntimeException: Timed out while executing one of processor's OnScheduled task.
java.lang.RuntimeException: Timed out while executing one of processor's OnScheduled task.
at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1480)
at org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:102)
at org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1303)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.TimeoutException: null
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1465)
... 9 common frames omitted
2017-07-10 14:43:52,280 ERROR [StandardProcessScheduler Thread-4] o.a.n.controller.StandardProcessorNode Failed to invoke #OnScheduled method due to java.lang.RuntimeException: Timed out while executing one of processor's OnScheduled task.
java.lang.RuntimeException: Timed out while executing one of processor's OnScheduled task.
at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1480)
at org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:102)
at org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1303)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.TimeoutException: null
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1465)
... 9 common frames omitted
The #OnScheduled method of QueryDatabaseTable is trying to connect to your database and appears to be having problems causing it to hit the 60 second processor scheduling timeout.
Can you verify your DBCPConnectionPool service is correctly configured and that the servers running NiFi can otherwise connect to the database with the same credentials?
I Only have one Nifi Server Running. If I Chance the Connection String it Throws a Oracle Error. So I assume that this is working. Any Tipps How can I debug this ?
UPDATE: I checked and I have no connection from the nifi to the DB. This error is misleading.
On my case, it was a firewall issue. I asked to permission from security manager. The connection also can be checked via telnet.
telnet databaseserver port_number
Expected output:
Trying database_server...
Connected to 1database_server.
Escape character is '^]'.
I'm trying to build a load test for my queues, which are Weblogic Queues, but I can't figure out which weblogic libraries I need for this. At least, that's what I think my problem is (because I get ClassNotFoundExceptions). I've already copied
weblogic.jar
wlclient.jar
wljmsclient.jar
into my jMeter/lib directory.
but I still get ClassNotFoundError like:
Response message: java.lang.NoClassDefFoundError: weblogic/utils/collections/ConcurrentHashMap
Here, also the full stacktrace...
2014/09/16 19:17:19 ERROR - jmeter.protocol.jms.sampler.JMSSampler: weblogic/utils/collections/ConcurrentHashMap java.lang.NoClassDefFoundError:
weblogic/utils/collections/ConcurrentHashMap
at weblogic.jndi.spi.EnvironmentManager.<clinit>(EnvironmentManager.java:19)
at weblogic.jndi.Environment.getContext(Environment.java:307)
at weblogic.jndi.Environment.getContext(Environment.java:277)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.getInitialContext(JMSSampler.java:424)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:319)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: weblogic.utils.collections.ConcurrentHashMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 17 more
2014/09/16 19:17:19 WARN - jmeter.protocol.jms.sampler.JMSSampler: Session may not be null while creating message java.lang.IllegalStateExcepti
on: Session may not be null while creating message
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.createMessage(JMSSampler.java:179)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.sample(JMSSampler.java:140)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Thread.java:662)
... and, also my JMeter Configuration:
After the first run I get the following error: ConcurrentHashMap not found
And on every run after the first one: EnvironmentManager can't be initialized
What am I not doing right here? Thanks a lot for the help!
Regards,
al
According to http://mazanatti.info/index.php?/archives/68-JMeter-configure-and-post-JMS-messages-to-Weblogic-Server.html you probably need wlthint3client.jar instead of weblogic.jar and wlclient.jar
Combo of wljmsclient.jar and wlthint3client.jar works for me.