smicyk / groovy-jmeter

A Groovy-based DSL for building and running JMeter test plans from command line and more.
Apache License 2.0
13 stars 1 forks source link

Running the examples/application #50

Closed AntonioSun closed 2 years ago

AntonioSun commented 2 years ago

Hi @smicyk,

What would I be expecting when running the examples/application?

I would be expecting some jmeter (or any test script) execution logs showing up, but I've been waiting for over 10 minutes, but didn't see anything, except that, after it is up for a while, I got:

testserver-app  | WARNING: An illegal reflective access operation has occurred
testserver-app  | WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v9.Java9 (file:/opt/groovy/lib/groovy-3.0.7.jar) to method sun.nio.fs.UnixFileSystem.getPath(java.lang.String,java.lang.String[])
testserver-app  | WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v9.Java9
testserver-app  | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
testserver-app  | WARNING: All illegal access operations will be denied in a future release
testserver-app  | Caught: java.nio.file.AccessDeniedException: jmeter.properties
testserver-app  | java.nio.file.AccessDeniedException: jmeter.properties
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
testserver-app  |       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase$_updateJMeterPropertiesLocation_closure7.doCall(TestScriptBase.groovy:123)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
testserver-app  |       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase.updateJMeterPropertiesLocation(TestScriptBase.groovy:122)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
testserver-app  |       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:44)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase$start$0.callCurrent(Unknown Source)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:40)
testserver-app  |       at net.simonix.dsl.jmeter.TestScriptBase$start.callCurrent(Unknown Source)
testserver-app  |       at script.executeScript(script.groovy:6)
testserver-app  |       at net.simonix.dsl.jmeter.TestScript.run(TestScript.groovy:133)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
testserver-app  |       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
testserver-app  |       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
testserver-app exited with code 1

Will there be test script execution logs normally? Or the problem is caused entirely by the testserver-app exited? thx

AntonioSun commented 2 years ago

Scrap that, for the moment -- might be my own issue.

AntonioSun commented 2 years ago

might be my own issue

Nope, tried on two of my machines and both are the same.

Find the culprit as well -- While the whole thing is up, I got:

$ curl -L localhost:1080/
curl: (7) Failed to connect to localhost port 1080: Connection refused

$ docker ps -a | grep jamesdbloom
80e8893170e2   jamesdbloom/mockserver                                                      "/opt/mockserver/run…"   14 minutes ago   Up 14 minutes                1080/tcp

$ curl -v --cookie "sessionId=055CA455-1DF7-45BB-8535-4F83E7266092" localhost:1080/api/books
*   Trying 127.0.0.1:1080...
* TCP_NODELAY set
* connect to 127.0.0.1 port 1080 failed: Connection refused
* Failed to connect to localhost port 1080: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 1080: Connection refused

In my browser it shows "This site can’t be reached".

Please advice. thx!

AntonioSun commented 2 years ago

mockserver problem resolved. I think the remaining problems are related with #52

smicyk commented 2 years ago

So it this still an issue for you?

AntonioSun commented 2 years ago

I'll be coming to it eventually, currently trying to make the first example working at my side now...

will report back.

AntonioSun commented 2 years ago

I'm having problem getting the whole thing working, but that's only problem on my side.

As long as my #53 is working, I'm fine as I now have a working environment to test the sample code. That's really what I was after when trying this, to have a working environment. So I'm closing it now.