Closed Ashi1993 closed 1 week ago
Can you try increasing the connection timeout(default is 15s):
http:Client tokenClient = check new ("https://localhost:9446",
secureSocket = {
key: {
certFile: "resources/qseal.crt",
keyFile: "resources/qseal.key"
}
},
httpVersion = http:HTTP_1_1,
followRedirects = {enabled: true},
socketConfig = {
connectTimeOut: 60
}
);
Also can you provide the steps to run the WSO2 IS token endpoint
with your configurations?
Hi,
The API works after disabling secure socket in HTTP Client as mentioned in [1]. Thank you for the quick responses.
[1] https://github.com/wso2-enterprise/internal-support-ballerina/issues/780#issuecomment-2348855080
Regards, Ashirwada
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
Description: I am trying to incoke WSO2 IS token endpoint deployed locally via a ballerina service. I am using the ballerina http:Client to invoke the api but I am getting a timeout even before the SSL handshake.
Error
time=2024-09-13T16:26:13.990+05:30 level=ERROR module=ballerina/http message="unhandled error returned from the service" error={"causes":[{"message":"Connection timeout: localhost/127.0.0.1:9446","detail":{},"stackTrace":[]}],"message":"Something wrong with the connection","detail":{},"stackTrace":[]} path="/xs2a/v1/appToken?clientId=PSDGB-OB-Unknown0015800001HQQrZAAX&redirect_uri=https://www.google.com&scopes=accounts%20openid" method="GET"
Steps to reproduce: Write a ballerina service and use httpClient to perform the rest call. Below is the resource function I wrote.
Try to invoke the API through postman by invokeing http://localhost:9090/xs2a/v1/appToken?clientId=PSDGB-OB-Unknown0015800001HQQrZAAX&redirect_uri=https://www.google.com&scopes=accounts openid
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):