Marco Ro Posted December 6, 2022 Share Posted December 6, 2022 Hello everyone, there is something blocking the responses of POST and GET calls. I don't know what to do, the call tried on postman works. And also from a site with an older version of ProcessWire. I can't figure out what it is that's blocking the response. All I get is this error: `Failed to connect to auth.giobby.com port 443: Connection timed out` What I can do? Link to comment Share on other sites More sharing options...
DV-JF Posted December 6, 2022 Share Posted December 6, 2022 Had a similar situation some time ago, at least it turned out that the hoster had blocked the port ? 1 Link to comment Share on other sites More sharing options...
BrendonKoz Posted December 6, 2022 Share Posted December 6, 2022 Just issued a simple GET request to the provided domain and it redirected (without error) to what I suspect is an expected subfolder. So...either it's working as expected now, it's an issue with your network/computer (and is working), or perhaps you're not taking into consideration URL forwarding from rewrite rules (whereas Postman likely is)? 2 Link to comment Share on other sites More sharing options...
Marco Ro Posted December 7, 2022 Author Share Posted December 7, 2022 18 hours ago, DV-JF said: hoster had blocked the port Yes I think is this!! OVH ? How can I unblock the port? I have written to the assistance, but they are really slowly! Link to comment Share on other sites More sharing options...
Marco Ro Posted December 7, 2022 Author Share Posted December 7, 2022 11 hours ago, BrendonKoz said: issue with your network/computer Thank you for your help! I'm quite sure that problem is in the server, because I just try with another server provider (chipper one) and everything works well. How could I check if is the server ? Link to comment Share on other sites More sharing options...
DV-JF Posted December 7, 2022 Share Posted December 7, 2022 1 minute ago, Marco Ro said: Yes I think is this!! OVH ? How can I unblock the port? I think only the hoster can (perhaps) help you. 1 Link to comment Share on other sites More sharing options...
flydev Posted December 7, 2022 Share Posted December 7, 2022 @Marco Ro get and post also works from here, at least we receive http answer code, like @BrendonKoz Also, FYI if it help, GET request on HTTP get redirected to /auth from the js code (window.location.href = "/auth/") and the same request on HTTPS is forbidden. 1 hour ago, Marco Ro said: OVH ? How can I unblock the port? On a VPS or private server, you have to adjust the firewall from the OVH dashboard. If it's an hosting plan, then you have nothing to do. https://docs.ovh.com/it/dedicated/firewall-network/#prerequisiti 2 Link to comment Share on other sites More sharing options...
Marco Ro Posted December 7, 2022 Author Share Posted December 7, 2022 4 hours ago, flydev said: firewall from the OVH dashboard Yes is this, but I have a different plan, so I can't for my self open the port 443 Link to comment Share on other sites More sharing options...
flydev Posted December 7, 2022 Share Posted December 7, 2022 I dont get it Marco, did you manage the server or its an hosting plan ? Because as we said, as we can send requests on 80 and 443, there is no firewall blocking it. One thing you could ask them or check on the logs, is if your ip get blocked somewhere, they have antiddos mesures and you might had a bad loop throwing requests during a small period, thats just a idea.. Link to comment Share on other sites More sharing options...
Marco Ro Posted December 9, 2022 Author Share Posted December 9, 2022 On 12/7/2022 at 5:44 PM, flydev said: no firewall blocking it. Problem is not on the auth.giobby.com side. The problem is in my server, where is store the e-commerce www.playwood.it I need response with the access token and not arrive because my port is close. (I think) I just change the provider from siteground to OVH, add look like the OVH with my current plane not give me the ability to setup the ports. I try to deleted the firewall but probably OVH have some security setup that not open the door by default. Link to comment Share on other sites More sharing options...
Marco Ro Posted December 14, 2022 Author Share Posted December 14, 2022 @flydev @BrendonKoz sorry, maybe I didn't understand what you tell me. Look like server side is all good, the port 443 is open. But I still to not understand way I can't get the answer from the call. You say that HTTPS is forbidden. But have I to configure Processwire to use HTTP for this call ? I can't understand where is the problem, I have this call, that start from playwood.it and go to https://auth.giobby.com/auth/... I just test with Postman and works, test with other server and other CMS and works, in my past Processwire website works but was a old PW version and other server. $auth = array( "grant_type" => 'password', "client_id" => 'PLA591WOD-playwoodsrl', "username" => 'demo-dev', "cid" => 'playwoodsrl', "password" => 'DemoPassword' ); $dati = ''; foreach ($auth as $k => $v) { $dati .= $k . '=' . urlencode($v) . '&'; } rtrim($dati, '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://auth.giobby.com/auth/realms/api-server/protocol/openid-connect/token'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $dati); $result = curl_exec($ch); $error = curl_error($ch); curl_close($ch); $result_obj = json_decode($result); $tokenGiobby = $result_obj->access_token; Link to comment Share on other sites More sharing options...
Marco Ro Posted December 14, 2022 Author Share Posted December 14, 2022 Could be my script non be configured well for my server?http://iovfspa.cluster031.hosting.ovh.net/phpinfo.php Link to comment Share on other sites More sharing options...
BrendonKoz Posted December 14, 2022 Share Posted December 14, 2022 Unfortunately I don't know anything about OVH. That knowledge might be needed here... If I can reach 'https://auth.giobby.com' in a web browser (GET request) without error, and you're saying that Postman works - then I would have to think everything is configured properly on the server that is handling the authentication portion of your server/code. Considering that, I'd be focusing on playwood.it to see if/why there are issues from there. You could enable debugging in your cURL call: curl_setopt($ch, CURLOPT_VERBOSE, 1); If there's an error, you can review that from your unused variable ($error), and/or check your server/php error logs. From using your code above, however, I was able to get a successfully retrieved value for access_token on my local machine's development/test server. Link to comment Share on other sites More sharing options...
Marco Ro Posted December 19, 2022 Author Share Posted December 19, 2022 thank you @BrendonKoz In the end I fixed by changing the server provider. I can't make change in the php ini in OVH. so, just fixed by go back to site ground. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now