0

I'm trying to use curl against a remote server to access a REST API (and right now, just the welcome page...) Currently, I have a Java application that can send REST request on this server.

But if I use curl (or wget), I get a timeout.

I believe the fact that a Java app can connect but not cURL would narrow down the problem a little but more. Still, I know there are many many possibilities; I'm just looking for a way to troubleshoot the reason I'm having a timeout (so I can use cURL).

PS: It's https, on the same network, there is a certificate I tried using but it doesn't change anything.

Edit: With --verbose" or "--trace -" I just get :

== Info: About to connect() to myserver.com port 443 (#0)

== Info: Trying xxx.xxx.xxx.xxx...

3
  • The --verbose and --trace options can show you what is happening behind the scenes when you use curl. You might also want to check with the --insecure flag to see if it narrows down to a TLS problem.
    – Haxiel
    Feb 12, 2019 at 9:37
  • 2
    I wonder if that's a connectivity problem. From the same system, can you try nc -v myserver.com 443 or telnet myserver.com 443 and see if you're able to connect?
    – Haxiel
    Feb 12, 2019 at 10:01
  • Unfortunately they are not installed for the moment, I'll try to install them and comme back with the results. Thank You.
    – Asoub
    Feb 13, 2019 at 10:26

1 Answer 1

0

As I though, it was something pretty simple: the application was configured to use a proxy, and cURL was not (even though both were using the same destination IP).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .