wget can't connect to domain on same server

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm trying to run the following command on the server. The site example.com is hosted on the same server.



wget --spider "https://example.com/script.php?actions=1"


Response:



Spider mode enabled. Check if remote file exists.
--2018-05-03 16:50:48-- https://example.com/script.php?actions=1
Resolving example.com (example.com)... [CORRECT_IP_ADDRESS]
Connecting to example.com (example.com)|[CORRECT_IP_ADDRES]|:443... failed: Connection timed out.
Retrying.


but it fails with a timeout. It's the same with "http".



wget resolves the domain to the correct IP-address (CORRECT_IP_ADDRESS) and pingning example.com gives the same IP.



The site is up and running and can be accessed from anywhere using any browser. I can successfully run the same command from any other server (inside or outside our own network) without problems.



The server is running a standard Debian 9 setup with Apache, PHP 7 and MySql. The server has two ethernet ports but only uses one. Static external IP.



After some comments (thank you all!) I have updated my post with the result from the suggested tests.



I have tried the following commands from the within the same server:



telnet example.com => Connection refused 
telnet example.com 443 => Connection timed out
telnet IP_ADDRESS => Connection refused
telnet IP_ADDRESS 443 => Connection timed out
telnet localhost => Connection refused
telnet localhost 443 => SUCCESS


Running the same commands from any other server gives:



telnet example.com => Resource temporarily unavailable 
telnet example.com 443 => SUCCESS
telnet IP_ADDRESS => Resource temporarily unavailable
telnet IP_ADDRESS 443 => SUCCESS


Any idea where/how to start troubleshooting?







share|improve this question





















  • try curl and ip address and pass hostname
    – mdeora
    May 3 at 15:04






  • 1




    Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
    – L.Ray
    May 3 at 15:20










  • @mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
    – Juri Salminen
    May 3 at 15:42










  • @L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
    – Juri Salminen
    May 3 at 15:42










  • Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
    – sourcejedi
    May 3 at 16:28














up vote
1
down vote

favorite












I'm trying to run the following command on the server. The site example.com is hosted on the same server.



wget --spider "https://example.com/script.php?actions=1"


Response:



Spider mode enabled. Check if remote file exists.
--2018-05-03 16:50:48-- https://example.com/script.php?actions=1
Resolving example.com (example.com)... [CORRECT_IP_ADDRESS]
Connecting to example.com (example.com)|[CORRECT_IP_ADDRES]|:443... failed: Connection timed out.
Retrying.


but it fails with a timeout. It's the same with "http".



wget resolves the domain to the correct IP-address (CORRECT_IP_ADDRESS) and pingning example.com gives the same IP.



The site is up and running and can be accessed from anywhere using any browser. I can successfully run the same command from any other server (inside or outside our own network) without problems.



The server is running a standard Debian 9 setup with Apache, PHP 7 and MySql. The server has two ethernet ports but only uses one. Static external IP.



After some comments (thank you all!) I have updated my post with the result from the suggested tests.



I have tried the following commands from the within the same server:



telnet example.com => Connection refused 
telnet example.com 443 => Connection timed out
telnet IP_ADDRESS => Connection refused
telnet IP_ADDRESS 443 => Connection timed out
telnet localhost => Connection refused
telnet localhost 443 => SUCCESS


Running the same commands from any other server gives:



telnet example.com => Resource temporarily unavailable 
telnet example.com 443 => SUCCESS
telnet IP_ADDRESS => Resource temporarily unavailable
telnet IP_ADDRESS 443 => SUCCESS


Any idea where/how to start troubleshooting?







share|improve this question





















  • try curl and ip address and pass hostname
    – mdeora
    May 3 at 15:04






  • 1




    Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
    – L.Ray
    May 3 at 15:20










  • @mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
    – Juri Salminen
    May 3 at 15:42










  • @L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
    – Juri Salminen
    May 3 at 15:42










  • Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
    – sourcejedi
    May 3 at 16:28












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm trying to run the following command on the server. The site example.com is hosted on the same server.



wget --spider "https://example.com/script.php?actions=1"


Response:



Spider mode enabled. Check if remote file exists.
--2018-05-03 16:50:48-- https://example.com/script.php?actions=1
Resolving example.com (example.com)... [CORRECT_IP_ADDRESS]
Connecting to example.com (example.com)|[CORRECT_IP_ADDRES]|:443... failed: Connection timed out.
Retrying.


but it fails with a timeout. It's the same with "http".



wget resolves the domain to the correct IP-address (CORRECT_IP_ADDRESS) and pingning example.com gives the same IP.



The site is up and running and can be accessed from anywhere using any browser. I can successfully run the same command from any other server (inside or outside our own network) without problems.



The server is running a standard Debian 9 setup with Apache, PHP 7 and MySql. The server has two ethernet ports but only uses one. Static external IP.



After some comments (thank you all!) I have updated my post with the result from the suggested tests.



I have tried the following commands from the within the same server:



telnet example.com => Connection refused 
telnet example.com 443 => Connection timed out
telnet IP_ADDRESS => Connection refused
telnet IP_ADDRESS 443 => Connection timed out
telnet localhost => Connection refused
telnet localhost 443 => SUCCESS


Running the same commands from any other server gives:



telnet example.com => Resource temporarily unavailable 
telnet example.com 443 => SUCCESS
telnet IP_ADDRESS => Resource temporarily unavailable
telnet IP_ADDRESS 443 => SUCCESS


Any idea where/how to start troubleshooting?







share|improve this question













I'm trying to run the following command on the server. The site example.com is hosted on the same server.



wget --spider "https://example.com/script.php?actions=1"


Response:



Spider mode enabled. Check if remote file exists.
--2018-05-03 16:50:48-- https://example.com/script.php?actions=1
Resolving example.com (example.com)... [CORRECT_IP_ADDRESS]
Connecting to example.com (example.com)|[CORRECT_IP_ADDRES]|:443... failed: Connection timed out.
Retrying.


but it fails with a timeout. It's the same with "http".



wget resolves the domain to the correct IP-address (CORRECT_IP_ADDRESS) and pingning example.com gives the same IP.



The site is up and running and can be accessed from anywhere using any browser. I can successfully run the same command from any other server (inside or outside our own network) without problems.



The server is running a standard Debian 9 setup with Apache, PHP 7 and MySql. The server has two ethernet ports but only uses one. Static external IP.



After some comments (thank you all!) I have updated my post with the result from the suggested tests.



I have tried the following commands from the within the same server:



telnet example.com => Connection refused 
telnet example.com 443 => Connection timed out
telnet IP_ADDRESS => Connection refused
telnet IP_ADDRESS 443 => Connection timed out
telnet localhost => Connection refused
telnet localhost 443 => SUCCESS


Running the same commands from any other server gives:



telnet example.com => Resource temporarily unavailable 
telnet example.com 443 => SUCCESS
telnet IP_ADDRESS => Resource temporarily unavailable
telnet IP_ADDRESS 443 => SUCCESS


Any idea where/how to start troubleshooting?









share|improve this question












share|improve this question




share|improve this question








edited May 4 at 8:27
























asked May 3 at 15:02









Juri Salminen

63




63











  • try curl and ip address and pass hostname
    – mdeora
    May 3 at 15:04






  • 1




    Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
    – L.Ray
    May 3 at 15:20










  • @mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
    – Juri Salminen
    May 3 at 15:42










  • @L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
    – Juri Salminen
    May 3 at 15:42










  • Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
    – sourcejedi
    May 3 at 16:28
















  • try curl and ip address and pass hostname
    – mdeora
    May 3 at 15:04






  • 1




    Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
    – L.Ray
    May 3 at 15:20










  • @mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
    – Juri Salminen
    May 3 at 15:42










  • @L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
    – Juri Salminen
    May 3 at 15:42










  • Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
    – sourcejedi
    May 3 at 16:28















try curl and ip address and pass hostname
– mdeora
May 3 at 15:04




try curl and ip address and pass hostname
– mdeora
May 3 at 15:04




1




1




Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
– L.Ray
May 3 at 15:20




Are you running a firewall on your example.com server? Can you telnet to example.com 443 from the server using both the IP address and FQDN?
– L.Ray
May 3 at 15:20












@mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
– Juri Salminen
May 3 at 15:42




@mdeora curl also fails with a timeout, if run from the same server. From any other server curl works.
– Juri Salminen
May 3 at 15:42












@L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
– Juri Salminen
May 3 at 15:42




@L.Ray I have not installed/enabled any firewall on the server but when I try to telnet example.com from the same server it fails with "Connection refused". Telnet from any other server to example.com works better - "Trying IP_ADDRESS" for about 30 seconds and then it fails with "Unable to connect to remote host: Resource temporarily unavailable".
– Juri Salminen
May 3 at 15:42












Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
– sourcejedi
May 3 at 16:28




Hmm, I think telnet example.com 443 was meant. The reason I suspect you mis-interpreted is that this command should be able to connect OK in the same situations that wget https://example.com works. But you said the wget command worked and telnet didn't, if you ran them on a different computer.
– sourcejedi
May 3 at 16:28















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441573%2fwget-cant-connect-to-domain-on-same-server%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441573%2fwget-cant-connect-to-domain-on-same-server%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay