Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Unanswered: " localhost" to address: Unknown host

    Hi All,

    When I try to execute any postgres command I get this error.

    I have stated the ips-daemon2, initialised the database (initdb), stated the postmaster, and when I try to createdb I get a error msg

    could not translate host name " localhost" to address: Unknown host

    I am running postgres on windows 2000.

    Any help will be much appreciated.

    thanks
    Pathy

  2. #2
    Join Date
    Mar 2004
    Posts
    110
    what syntax are you using in the cygwin shell?

    from what i understand, you have succesfully initialised the db with initdb and ur having problems connecting to it.

    Are you trying to connect to it locally or from another workstation?

    The error msg your getting sounds like DNS is trying to resolve localhost as a hostname and isnt able to resolve it.
    Perhaps ur host file is missing the entry: 127.0.0.1 localhost

    -Ed

  3. #3
    Join Date
    Mar 2004
    Posts
    4
    Ed,

    Thanks for your response.

    I am trying to connect to the database from the same workstation and when I do a ping on local host the ip address i get is 127.0.0.1

    Do I have to update any of the config files for local host address.



    thanks
    Pathy

  4. #4
    Join Date
    Mar 2004
    Posts
    110
    Do you have cygwin installed on your server? You need it on a windows server.

    http://www.sitepoint.com/article/1233 is a good walkthrough how to install postgresql/cygwin and ipc-daemon on windows.

    Can you plz post the syntax you are using to connect to the db?


    -Ed

  5. #5
    Join Date
    Mar 2004
    Posts
    4
    Ed,

    I have installed cgywin.

    I use cgywin and go to usr/local/postgres/bin

    then type in

    ipc-daemon2 & (there is no ipc-daemon so I am using ipc-daemon2)

    initdb -D /usr/local/postgres/data

    postmaster -D /usr/local/postgres/data


    I do not get any error message, everything looks fine. I will have a look at the link you suggested and test it again.

    P K

  6. #6
    Join Date
    Mar 2004
    Posts
    110
    So i take it it is all functioning now and you can connect to the db template1?

    Isnt your IPC-Daemon running as a service?
    You can set it up as as service and have it automaticly starten... so you dont have to manually start it in the cygwin shell. (how to... is in the link of my previous post).

    -Ed

Posting Permissions

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