Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, i think this is networking related issue so im adding it here. In short: script fails to connect server even proper credentials entered, it should be block on server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    304

    Script says: couldn't connect to host , how to discover cause


    Hi, i think this is networking related issue so im adding it here.

    In short:

    script fails to connect server even proper credentials entered, it should be block on server side (Linux Centos 5.x). Please which error logs or files should i examine or how to log the cause of failed conection?


    In long:

    I want to ask for help with solving this connection problem. My whmcs billing system tries to create account at external server using MYSERVERIP:8887/someaddressandparametters

    But although proper login credentials are provided and this script is used successfully by many people, it fails and in whmcs logs it says: "Curl Error: 7 - couldn't connect to host".

    I have been told by whmcs, that issue is on my hypervm server (linux centos 5.x) side.

    By hypervm i have been told, its a linux issue.

    So i want to ask now which logs should i examine, or how to log the information what is the cause of failed connection?

    I will paste you results on relevant commands you request.

    Thank you if you have idea and share.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    Try to ping the serverip and/ or connect to that server via telnet.
    I suspect, that telnet will not be able to connect also.
    In this case, check your routes and gateway.
    Code:
    ping MYSERVERIP
    telnet MYSERVERIP 8887
    traceroute MYSERVERIP
    Is the server in the same or different network?
    If it is in a different network, then some setup and network knowledge is needed.
    As this linux is apparently a vm, the hyperv NICs and network also may play a role.
    You must always face the curtain with a bow.

  3. #3
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    304
    Thx, server is in different network.
    - Ping works
    - tellnet dont works
    - traceroute to * (*), 30 hops max, 40 byte packets send: Operation not permitted
    - port appears to be open according to Open Ports Scanner | Test Port Forwarding on Your Machine | Internet Protocol Tools

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    If ping works, then the routing should be ok.
    If the port is open, but telnet from this script machine to the server doesnt work, then there could be some firewall or access control list blocking your connection.

    First verify, that the port is really open:
    Try the telnet again from another machine in the same network as the script machine is in.

    If that works, then look at the fw of the scriptmachine
    Code:
    iptables -L -n
    If not, look at the MYSERVER and check the firewall and application logs.
    You must always face the curtain with a bow.

  5. #5
    Linux User postcd's Avatar
    Join Date
    Apr 2011
    Posts
    304
    Thank You,

    chain input and chain output has no rules, only forward (policy ACCEPT) has some rules.
    But after i contacted my hosting provider, one where i have installed WHMCS billing software (one which trying to connect my dedi server) they maybe did something with ports on their side so whmcs now connects successfully to my dedi via 8887, 8888 port...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •