Could Not Translate Hostname Localhost To Address Unknown Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or could not translate host name to address name or service not known posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User
Could Not Translate Host Name To Address Unknown Host
is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: could not translate host name rds Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Posgres Could not translate hostname up vote -1 down vote favorite I am attempting to start a Postgresql server, but get the "pg::connectionbad (could not translate host name" following error when I run the command: pg_ctl start Error: LOG: could not translate host name "146.232.222.*", service "5432" to address: Name or service not known WARNING: could not create listen socket for "146.232.222.*" FATAL: could not create any TCP/IP sockets When I run pg_ctl status It tells me that no server is currently running. What could be the problem here? I am running Postgresql 9.2 postgresql share|improve this question asked Oct 6 '15 at 6:50 Cornel Verster 1113 You
Psql: Could Not Translate Host Name Rds
seem to have configured Posgresql to listen on a network inteface "146.232.222.*" which is not a valid interface address. Check your config, you should be able to find the explanation of the options by a web search rather easily. –zagrimsan Oct 6 '15 at 9:59 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted Basically you have to provide an interface where to listen, and 146.232.222.* is not one. You have to edit your PostgreSQL configuration file (probably something like /var/lib/pgsql/data/postgresql.conf) and add this directive: listen_addresses='*' That should make it, because you're saying you're listening to all interfaces. If you just intend listening to localhost (i.e., you're not planning to connect to the database beyond the same machine), setting the listen_address to localhost would be enough. share|improve this answer answered Oct 6 '15 at 6:56 nKn 3,14921425 See the postgres docs for a list of different things you can set listen_addresses to. –rakslice Oct 6 '15 at 7:00 Thanks! It now says "server starting", but never starts a server when I run pg_ctl start. Is there something else I need to do here? Or should the command pg_ctl start or pg_ctl start -D /var/lib/pgsql/data be sufficient? –Cornel Verster Oct 6 '15 at 7:06 Have you run netstat -atpn | grep 5432? If there's something listening on that port, the server is started. –nKn Oct 6 '15 at 7:07 Hey, I che
pgsql-announce pgsql-bugs pgsql-docs pgsql-general pgsql-interfaces pgsql-jobs pgsql-novice pgsql-performance pgsql-php pgsql-sql pgsql-students Developer lists Regional lists Associations User groups Project lists Inactive lists IRC Local User Groups Featured Users International Sites Propaganda Resources Weekly News Re: Questions: How to configure PostgreSQL at the beginning .... could not translate host name aws From: Adrian Klaver
Psql Could Not Translate Host Name Aws
address: Name or service not known LOG: could not translate host name "localhost", service "5432" to address: Name or service not known alex September 17, 2009 Errors 8 Comments Tweet https://www.question-defense.com/2009/09/17/log-could-not-translate-host-name-localhost-service-5432-to-address-name-or-service-not-known I recently installed PostgreSQL on an Amazon Web Services CentOS instance however http://stackoverflow.com/questions/12165076/occasional-postgres-error-on-heroku-could-not-translate-host-name-pg-url-to when I first attempted to start Postgres I received an error that I had never seen before. The pgstartup.log file located in /var/lib/pgsql contained the below data. Error Contents Of pgstartup.log File: bash LOG: could not translate host name "localhost", service "5432" to address: Name or service not could not known WARNING: could not create listen socket for "localhost" FATAL: could not create any TCP/IP sockets To view the pgstartup.log file use the below command. bash less /var/lib/pgsql/pgstartup.log After viewing the error file I realized that for some reason there was no localhost configured by default on the AWS instance that was using a CentOS 5.3 base image. So to could not translate resolve the issue all I needed to do was add a hosts file to the /etc directory with the below contents. Contents of /etc/hosts: bash 127.0.0.1 localhost localhost.localdomain After adding the above to /etc/hosts I attempted to start Postgres again using the below command. Start Postgres: bash /etc/init.d/postgresql start This time PostgreSQL started without an issue on the Amazon Web Services instance. See larger image PostgreSQL 8.4 Official Documentation - Volume I. The SQL Language (Paperback) List Price: $34.99 USD New From: $3.24 USD In Stock Used from: $3.25 USD In Stock
See larger image Cloud Application Architectures: Building Applications and Infrastructure in the Cloud (Theory in Practice (O'Reilly)) (Paperback) List Price: $29.99 USD New From: $2.98 USD In Stock Used from: $0.01 USD In Stock TOPICS 5432amazon web servicesAWSCentOSec2errorfatalimageLinuxlocalhostpgstartup.logpostgresPostgreSQLstartwarning Share Previous ./lib/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) NextAttach Any Type of File to The Premium Evernote Windows Desktop Version Related Posts TokuDB Google Cloud Install: Starting MySQL… ERROR! The server quit without updating PID file CentOS Remove Old Kernels Ubuhere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Occasional Postgres error on Heroku: could not translate host name “