Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Portal version 5.11.1 doesnot support junit agent #111

Open
beherad opened this issue Jul 3, 2024 · 5 comments
Open

Report Portal version 5.11.1 doesnot support junit agent #111

beherad opened this issue Jul 3, 2024 · 5 comments
Labels

Comments

@beherad
Copy link

beherad commented Jul 3, 2024

Describe the bug
For RP version 5.11.1, i was trying junit agent
image

Steps to Reproduce
Steps to reproduce the behavior:

  1. POM.xml
org.apache.maven.plugins maven-dependency-plugin 3.1.1 getClasspathFilenames properties org.apache.maven.plugins maven-surefire-plugin 3.1.2 -javaagent:${com.nordstrom.tools:junit-foundation:jar} ${parallelRun} false 20 false ${testsCategory} ${testSuiteClass} ${envConfig}
  1. reportportal.properties

rp.attributes=Environment:Stage; Browser:Chrome; RemoteService:Selenium Grid; Product:PRODUCT; Subproduct:SUBPRODUCT;
rp.convertimage=false
rp.project=PROJECT
rp.enable=true
rp.launch=PRODUCT
rp.endpoint=****
rp.api.key=****

Expected behavior
Should not throw java.net.SocketTimeoutException: connect timed out

Actual behavior
16:19:34 INFO: Using OpenTelemetry for tracing
16:19:43 2024-07-02 10:49:43 [rp-io-2] ERROR(LaunchLoggingCallback.java:46) [Launch] [22] ReportPortal execution error
16:19:43 java.net.SocketTimeoutException: connect timed out
16:19:43 at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
16:19:43 at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
16:19:43 at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
16:19:43 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
16:19:43 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[?:?]
16:19:43 at java.net.Socket.connect(Socket.java:591) ~[?:?]
16:19:43 at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at com.epam.reportportal.service.PathParamInterceptor.intercept(PathParamInterceptor.java:55) ~[client-java-5.2.1.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at com.epam.reportportal.service.BearerAuthInterceptor.intercept(BearerAuthInterceptor.java:40) ~[client-java-5.2.1.jar:?]
16:19:43 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[okhttp-4.12.0.jar:?]
16:19:43 at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[okhttp-4.12.0.jar:?]
16:19:43 at retrofit2.OkHttpCall.execute(OkHttpCall.java:204) ~[retrofit-2.9.0.jar:?]
16:19:43 at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46) ~[adapter-rxjava2-2.9.0.jar:?]
16:19:43 at io.reactivex.Observable.subscribe(Observable.java:12267) ~[rxjava-2.2.10.jar:?]
16:19:43 at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35) ~[adapter-rxjava2-2.9.0.jar:?]
16:19:43 at io.reactivex.Observable.subscribe(Observable.java:12267) ~[rxjava-2.2.10.jar:?]
16:19:43 at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) ~[rxjava-2.2.10.jar:?]
16:19:43 at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38) ~[rxjava-2.2.10.jar:?]
16:19:43 at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26) ~[rxjava-2.2.10.jar:?]
16:19:43 at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
16:19:43 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
16:19:43 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
16:19:43 at java.lang.Thread.run(Thread.java:834) ~[?:?]

Dependency versions
Include version info of the following libraries: client-java, agent-java-junit

@beherad beherad added the bug label Jul 3, 2024
@akuiz
Copy link

akuiz commented Jul 3, 2024

Facing same issue with the latest agent-java-junit 5.2.3 and Report Portal 5.11.1

@luisjba
Copy link

luisjba commented Jul 3, 2024

Our team is facing same issue on all Java based agents and Report Portal 5.11.1.

@akuiz
Copy link

akuiz commented Jul 3, 2024

Some additional details:

  1. Report Portal UI is accessible properly with no issues.
  2. A locally deployed instance of the Report Portal with the same version doesn't have this problem so it might be either a network problem or Report Portal setup/performance issue due to a high load.
  3. Robot framework agent https://github.com/reportportal/agent-Python-RobotFramework is also not able to reach out to the same remote instance while trying to upload results.

What is the best way to trace requests & connections being made to Report Portal instance while uploading results? This would help to rule out potential Network accessibility issues

@Pink-Bumblebee
Copy link

What is the best way to trace requests & connections being made to Report Portal instance while uploading results?

Dev engineer recommended to use this setting : rp.http.logging=true
https://github.com/reportportal/client-java?tab=readme-ov-file#http-parameters

@akuiz
Copy link

akuiz commented Jul 4, 2024

Thanks @Pink-Bumblebee, seems like 'launch' request times out for some reason.

Request to the same endpoint with incorrect token throws 401 Unauthorised, so probably something happens on the Report portal side.

The following request gets stuck (all values are correct):

curl --location 'http://host_name:8080/api/v2/project_name/launch'
--header 'Authorization: Bearer <valid_api-key>'
--header 'Content-Type: application/json; charset=UTF-8'
--data '{"startTime":"2024-07-04T13:43:43.264+0300","name":"Test API launch creation","attributes":[{"key":"agent","value":"agent-java-junit|5.2.3","system":true},{"key":"skippedIssue","value":"true","system":true},{"key":"jvm","value":"OpenJDK 64-Bit Server VM|11.0.22|55.0","system":true},{"key":"os","value":"Mac OS X|x86_64|12.7.5","system":true}],"uuid":"3e60c416-bcb5-4b5e-99da-ee54982479d4","mode":"DEFAULT","rerun":false}
'

The following request throws 401 Unauthorised (that's why I assume it's not a network error):
curl --location 'http://host_name:8080/api/v2/project_name/launch'
--header 'Authorization: Bearer <invalid_api-key>'
--header 'Content-Type: application/json; charset=UTF-8'
--data '{"startTime":"2024-07-04T13:43:43.264+0300","name":"Test API launch creation","attributes":[{"key":"agent","value":"agent-java-junit|5.2.3","system":true},{"key":"skippedIssue","value":"true","system":true},{"key":"jvm","value":"OpenJDK 64-Bit Server VM|11.0.22|55.0","system":true},{"key":"os","value":"Mac OS X|x86_64|12.7.5","system":true}],"uuid":"3e60c416-bcb5-4b5e-99da-ee54982479d4","mode":"DEFAULT","rerun":false}
'

What's the best way to check the logs to debug this issue on Report Portal side? Or maybe even check that it reaches Report Portal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants