[5.9.0] Getting a java.net.SocketException: Permission denied: connect after update


#1

After updating to 5.9.0 I’m getting the following message, when sending a POST request:

java.net.SocketException: Permission denied: connect
at com.kms.katalon.core.webservice.common.RestfulClient.sendPostRequest(RestfulClient.java:110)
at com.kms.katalon.core.webservice.common.RestfulClient.send(RestfulClient.java:58)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:107)
at com.kms.katalon.composer.webservice.parts.RestServicePart$4.run(RestServicePart.java:157)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)


The same request is sent without problems in previous versions.

This is the JSON body of the HTTP

{
  "username":"Katalon",
  "text":"${message}\n${attach}",
  "attachments":[
    {
      "title":"${title}",
      "title_link":"${link}",
      "text":"(some text)",
      "mrkdwn": true,
  "fields": [
        {
        	"title":"Server",
          	"value":"${server}",
           	"short":true
        },
                {
        	"title":"Fail counter",
          	"value":"${counter}",
           	"short":true
        },
           {
        	"title":"Host",
          	"value":"${host}\nKatalon Studio v${version}",
           	"short":true
        }
      ],
      
      "image_url":"",
      "thumb_url":"${thumb_url}",
      "color":"${color}"
    }]
}

And this is the request

def response = WS.sendRequest(findTestObject('Object Repository/rocket', [('message'): message, ('attach'): attach,('link'): link, ('title'): title, ('server'): GlobalVariable.testURL, ('counter'): counter, ('color'): color, ('thumb_url'): thumb_url, ('host'): host.hostName, ('version'): RunConfiguration.getAppVersion()]))

2018-11-29_11-08-03.png


#2

Has anyone else noticed this?

Wasn’t happening in 5.8.7, it is always happening in 5.9.0 and 5.9.1.


#3

i’ve got the same problem, REST request on 5.9.1 Win64.

java.net.SocketException: Permission denied: connect
	at com.kms.katalon.core.webservice.common.RestfulClient.sendPostRequest(RestfulClient.java:110)
	at com.kms.katalon.core.webservice.common.RestfulClient.send(RestfulClient.java:58)
	at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:107)
	at com.kms.katalon.composer.webservice.parts.RestServicePart$4.run(RestServicePart.java:158)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)


#4

@Katalon Studio

Any info?


#5

@Mate Mrse, the team is investigating the issue. Is it specific for POST or any other request methods?


#7

It happens with GET, as well.


#8

Sorry for the issue.

Could you please help us enable debugging information, then re-run the tests and send us the logs.

The detailed steps:

1. Add the following lines at the end of the file Include/config/log.properties:

logging.level.com=TRACE
logging.level.net=TRACE
logging.level.org=TRACE

2. Refresh the project using the menu Project/Refresh.

3. Re-run the tests.

4. Retrieve the logs in the Console tab.


#9
2018-12-05 08:38:51.430 e[39mDEBUGe[0;39m e[36mc.k.k.core.testobject.ObjectRepository   -e[0;39m e[39mFinding Test Object 'Object Repository/rocket'e[0;39m
2018-12-05 08:38:51.481 e[39mDEBUGe[0;39m e[36mc.k.k.c.w.helper.WebServiceCommonHelper  -e[0;39m e[39mChecking request objecte[0;39m
2018-12-05 08:38:52.214 e[39mDEBUGe[0;39m e[36mn.l.b.m.m.ImpersonatingMitmManager       -e[0;39m e[39mAllowed ciphers for proxy connections to upstream servers (some ciphers may not be available): [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]e[0;39m
2018-12-05 08:38:52.215 e[39mDEBUGe[0;39m e[36mn.l.b.m.m.ImpersonatingMitmManager       -e[0;39m e[39mAllowed ciphers for client connections to proxy (some ciphers may not be available): [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]e[0;39m
2018-12-05 08:38:52.235 e[39mDEBUGe[0;39m e[36morg.littleshoot.proxy.impl.ServerGroup   -e[0;39m e[39mUDT provider not found on classpath. UDT transport will not be available.e[0;39m
2018-12-05 08:38:52.278 e[34mINFO e[0;39m e[36mo.l.proxy.impl.DefaultHttpProxyServer    -e[0;39m e[39mStarting proxy at address: 0.0.0.0/0.0.0.0:0e[0;39m
2018-12-05 08:38:52.281 e[39mDEBUGe[0;39m e[36morg.littleshoot.proxy.impl.ServerGroup   -e[0;39m e[39mInitializing thread pools for TCP with 2 acceptor threads, 8 incoming worker threads, and 8 outgoing worker threadse[0;39m
2018-12-05 08:38:52.333 e[34mINFO e[0;39m e[36mo.l.proxy.impl.DefaultHttpProxyServer    -e[0;39m e[39mProxy listening with TCP transporte[0;39m
2018-12-05 08:38:52.435 e[34mINFO e[0;39m e[36mo.l.proxy.impl.DefaultHttpProxyServer    -e[0;39m e[39mProxy started at address: /0:0:0:0:0:0:0:0:58290e[0;39m
2018-12-05 08:38:52.615 e[39mDEBUGe[0;39m e[36mc.k.k.core.util.BrowserMobProxyManager   -e[0;39m e[39mRequests will be captured by BrowserMob proxy at port 58290e[0;39m
2018-12-05 08:38:52.627 e[34mINFO e[0;39m e[36mc.k.k.core.util.BrowserMobProxyManager   -e[0;39m e[39mHAR: C:\Users\me\git\my-project\Reports\9999 Email reports\20181205_083847\requests\main\0.hare[0;39m2018-12-05 08:38:52.703 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain  -e[0;39m e[31m❌ Unable to send request (Root cause: java.net.SocketException: Permission denied: connect)e[0;39m
2018-12-05 08:38:52.703 e[1;31mERRORe[0;39m e[36mc.k.k.core.context.internal.TestHooker   -e[0;39m e[31m❌ com.kms.katalon.core.exception.StepFailedException: Unable to send request (Root cause: java.net.SocketException: Permission denied: connect)e[0;39m
2018-12-05 08:38:52.703 e[39mTRACEe[0;39m e[36mc.k.k.core.context.internal.TestHooker   -e[0;39m e[39mEND null: EmailReports.posaljiMail()e[0;39m
2018-12-05 08:38:52.704 e[39mTRACEe[0;39m e[36mc.k.k.core.context.internal.TestHooker   -e[0;39m e[39mEND null: reporterAfterTestSuitee[0;39m
2018-12-05 08:38:52.725 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestSuiteExecutor  -e[0;39m e[39m--------------------e[0;39m
2018-12-05 08:38:52.725 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestSuiteExecutor  -e[0;39m e[39mEND Test Suites/9999 Email reports

This is the log.


#10

Thank you @Mate_Mrse. Could you please send us the HAR file mentioned in this line HAR: C:\Users\me\git\my-project\Reports\9999 Email reports\20181205_083847\requests\main\0.har?


#11

How do I upload it to the new forum? I get “Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif).”


#12

I’ve allowed .zip and .har file extensions. Could you please try again?


#13

0.har (441 Bytes)

There you go! :+1:


#14

Is there any progress on this issue?


#15

Sorry for the late response. We’re are working on a fix. Since 5.9.1 we use BrowserMob to capture HTTP requests in order to help users debug easier. There might be a proxy issue that prevent BrowserMob from working properly.


#16

I noticed it is still present in [5.10.0] beta. You probably didn’t plan it for this release.

Well… :man_shrugging:

I’ll wait.


#17

No it’s WIP but it missed the beta train. Please rest assured we took this issue seriously.


#18

Thanks Mate for your patience. We’ll try to make it in 5.10.
By the way, we’re working on more enhancement for API testing, hope to receive more feedback from you.

Thanks again and Best regards,


#19
2018-12-19 10:17:49.520 e[39mDEBUGe[0;39m e[36mc.k.k.c.w.k.builtin.SendRequestKeyword   -e[0;39m e[39m✓ Send request successfullye[0;39m
2018-12-19 10:17:49.527 e[39mDEBUGe[0;39m e[36mc.k.k.c.keyword.builtin.CommentKeyword   -e[0;39m e[39m{"success":true}e[0;39m
2018-12-19 10:17:49.527 e[39mDEBUGe[0;39m e[36mc.k.k.c.keyword.builtin.CommentKeyword   -e[0;39m e[39m###################################e[0;39m
2018-12-19 10:17:49.528 e[39mDEBUGe[0;39m e[36mc.k.k.c.keyword.builtin.CommentKeyword   -e[0;39m e[39m###### Rocket message sent. ######e[0;39m
2018-12-19 10:17:49.528 e[39mDEBUGe[0;39m e[36mc.k.k.c.keyword.builtin.CommentKeyword   -e[0;39m e[39m###################################

I can see this has been fixed in 5.10.! Great job, @Katalon_Studio!

:clap:


#20

Guys, this is again a problem in v5.10.1!


#21

Hi @Mate_Mrse,

Please check Disable BrowserMob proxy option in Preferences/Katalon/Proxy.

Thanks.