Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I cannot access a certain website in my Linux Server.

# curl https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL
curl: (7) couldn't connect to host

It's accessible from anywhere else but my server. I disabled ConfigServer Firewall but the problem still persist. I have no idea how I can investigate the issue and realize why this page is not accessible in my server?

I would appreciate any comment.

share|improve this question

2 Answers 2

  • Is this URL password protected, if so you'll need to pass that info.
  • Does the server have a valid SSL certificate, if not you'll need to use the -k option.
  • Use the -v option to get verbose output
  • Try using wget with the same URL and see if that works.
  • Can you ping that server?
  • Can you traceroute that server?

It's possible that server has blocked you on their side. Only thing you can do in that case is contact the administrator for that system. I can't access it from my system, so it's not just your system. May be restricted to certain networks/hosts.

[edit]

  • Name or service not known == DNS problem.
  • Can you ping the IP address?
  • Try disabling your firewall temporarily to see if it is causing a problem.
share|improve this answer
    
1) URL is not password protected 2) Yes, server has valid SSL certificate. 3) "Trying 79.170.146.134... Connection timed out" 4) "wget" did not work too. 5) I cannot ping the server 6) Traceroute: "pgws.bpm.bankmellat.ir: Name or service not known" –  Dane Sep 25 '11 at 6:44
1  
Name service not known = DNS/resolver problem. –  Mircea Vutcovici Sep 25 '11 at 6:51
    
See updated answer –  Andrew Case Sep 25 '11 at 7:00

The error

curl: (7) couldn't connect to host

means that the DNS is working fine, but the TCP connection failed. This is a networking issue at TCP level. Check the firewall and may be your MTU. If you have a bad firewall that filters all ICMP, then you might have problem if there is a lower MTU on the path that is smaller that the one from the local machine.

To disable certificate checking use:

curl -k https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL
share|improve this answer
1  
For me it is working with curl http://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL. Try with http instead https. –  Mircea Vutcovici Sep 25 '11 at 8:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.