Upload report from command line redirect to localhost and get connection refused


#1

Using katalon-report-uploader-0.0.4.jar

I used my username and password for my Katalon account to upload report, but I got connection refused, request is sent to localhost:
2019-06-09 12:15:06.343 ERROR 6514 — [ main] c.k.k.r.u.h.KatalonAnalyticsConnector : Cannot get access_token from server by your credentials

And the connection seem connect to localhost:8444. I used command line:
java -jar ./Drivers/katalon-report-uploader-0.0.4.jar --kit.server.api=https://analytics.katalon.com --projectId=17372 --path=“Reports/xxx/20190609_061926” --email=“mykatalon_account_email” --password=“my katalon password” or

java -jar ./Drivers/katalon-report-uploader-0.0.4.jar --type=katalon --projectId=17372 --path=“Reports/xxx/20190609_061926” --email=“mykatalon_account_email” --password=“my katalon password”
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159) ~[httpclient-4.5.3.jar!/:4.5.3]


#2

Hi @Grace,

We have a new release to fix this issue. Please download the latest one and try again.


#3

Hi @Thong thanks for the update.
Downloaded katalon-report-uploader-0.0.5.jar, the bug is fixed.
Now I sent this command:
java -jar ./Drivers/katalon-report-uploader-0.0.5.jar --kit.server.api=https://analytics.katalon.com --projectId=17372 --path=“Reports/PortalValidationSuite/20190609_061751” --email=###@###.com --password=#####

I got 403 with null point. Note the file is found,

Request: POST https://analytics.katalon.com/oauth/token HTTP/1.1
2019-07-01 13:33:57.865 DEBUG 3257 — [ main] c.k.k.report.uploader.helper.HttpHelper : Response: HttpResponseProxy{HTTP/1.1 200 [Date: Mon, 01 Jul 2019 20:33:57 GMT, Content-Type: application/json;charset=UTF-8, Connection: keep-alive, Server: Apache/2.4.39 (Amazon) OpenSSL/1.0.2k-fips, X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, Strict-Transport-Security: max-age=31536000 ; includeSubDomains, X-Frame-Options: DENY, X-Application-Context: application:fixed,production,listener:8080, Set-Cookie: kan_remember_me=false; Path=/; HttpOnly, Set-Cookie: kan_access_token=388e9a5e-2726-410f-8a17-6e608ae75afb; Path=/; HttpOnly, Set-Cookie: kan_refresh_token=00f09815-0444-47cf-939e-ead2fd9ad129; Path=/; HttpOnly, Set-Cookie: kan_expiry=1562444271832; Path=/, Vary: Accept-Encoding] org.apache.http.client.entity.DecompressingEntity@5f2108b5}
2019-07-01 13:33:57.903 INFO 3257 — [ main] c.k.k.r.uploader.service.UploadService : Uploading log files in folder path: Reports/PortalValidationSuite/20190609_061751
2019-07-01 13:33:57.903 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Looking for log files
2019-07-01 13:33:57.915 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Looking for log files
2019-07-01 13:33:57.915 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/execution0.log
2019-07-01 13:33:57.915 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/.DS_Store
2019-07-01 13:33:57.916 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/execution.properties
2019-07-01 13:33:57.916 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/videos/test_1.srt
2019-07-01 13:33:57.916 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/videos/test_2.srt
2019-07-01 13:33:57.916 INFO 3257 — [ main] c.k.k.report.uploader.helper.FileHelper : Found file /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/1560086287873.png
2019-07-01 13:33:57.918 INFO 3257 — [ main] c.k.k.r.uploader.service.UploadService : Sending file: /Users/gxu/ent-web-automation/Reports/PortalValidationSuite/20190609_061751/execution0.log
2019-07-01 13:33:57.919 DEBUG 3257 — [ main] c.k.k.report.uploader.helper.HttpHelper : Request: GET https://analytics.katalon.com/api/v1/files/upload-url?projectId=17372 HTTP/1.1
2019-07-01 13:33:58.233 DEBUG 3257 — [ main] c.k.k.report.uploader.helper.HttpHelper : Response: HttpResponseProxy{HTTP/1.1 403 [Date: Mon, 01 Jul 2019 20:33:58 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Server: Apache/2.4.39 (Amazon) OpenSSL/1.0.2k-fips, X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, Strict-Transport-Security: max-age=31536000 ; includeSubDomains, X-Frame-Options: DENY, X-Application-Context: application:fixed,production,listener:8080, Cache-Control: no-store, Pragma: no-cache] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Chunked: true]}}
2019-07-01 13:33:58.260 ERROR 3257 — [ main] c.k.k.r.u.h.KatalonAnalyticsConnector : Cannot send data to server: null

Caused by: java.lang.NullPointerException: null

at java.net.URI$Parser.parse(URI.java:3042) ~[na:1.8.0_171]

at java.net.URI.<init>(URI.java:588) ~[na:1.8.0_171]

at java.net.URI.create(URI.java:850) ~[na:1.8.0_171]

at org.apache.http.client.methods.HttpPut.<init>(HttpPut.java:65) ~[httpclient-4.5.3.jar!/:4.5.3]

at com.katalon.kit.report.uploader.helper.KatalonAnalyticsConnector.uploadFile(KatalonAnalyticsConnector.java:139) ~[classes!/:0.0.5]

… 18 common frames omitted


#4

Could you access katalon-analytics on web browser ? If yes, please make sure the user who submit to KA have permission to access KA. And give me your username.


#5

@Thong I can access katalon-analytics on web browser, same credential can log into my board. username is gxu@guardanthealth.com.


#6

@Thong any update?