3
Error happens after entering login and password:
"Deuorg.postgresql.util.Psqlexception: Connection refused. Check that the hostname and port are correct and that the postmaster is Accepting TCP/IP Connections."
I’m making the connection that way and I need it to stay that way for now:
<%
String url = "jdbc:postgresql://postgres-postgresconection.jelastic/siscosi";
String usuario = "xxxx";
String senha = "xxxx";
try {
Class.forName("org.postgresql.Driver");
Connection conexao = DriverManager.getConnection(url, usuario, senha);
The postgres server is on a different machine than yours?
– rray
As the error already says: Yours
hostname
and/orporta
is wrong, see if everything is typed correctly or if the information is true in relation to the address of your server.– LeoFelipe
fix I put this url first : String url = "jdbc:postgresql://localhost:5432/database name"; , and my postgres look like this: Postgresql 8.4.18 running on localhost:5432 -- You are logged in as a "webadmin" user. now do not know if the postgres of Jestastic
– Roque
Enter your cloud control panel and take your server settings and [Edit] and the question, then it’s easier to tell what the connection string will be for you
– Caputo
personnel informed me that is error in connection socket the service of postgre must be off. But how do I turn on this service?
– Roque
Go to Windows services and see if it’s running. Open run, type in services.Msc and enter. Search for postgresql and see if it’s running.
– Ascension
@Roque, where are you running your Web application server? I also use the Jelastic platform, your problem should be the same as I’ve had before.
– Luídne