Nuxeo Server Cannot Connect to PostgreSQL database

First installation failed to install JDK 7. I downloaded/installed the latest version manually from the Java.com website. Second install returned an error while configuring the PostgreSQL database, but the error message popped up and out too quickly for me to read during installation.

When starting the server, it returns an error (copy/pasted the text that was red in the log):

2013-03-12 14:20:01,527 ERROR [org.nuxeo.launcher.config.ConfigurationGenerator] org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. 2013-03-12 14:20:01,528 ERROR [org.nuxeo.launcher.NuxeoLauncher] Could not run configuration: Failed to connect on database: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

This software could potentially solve a lot of things for my business. Any help would be appreciated.

0 votes

1 answers

4828 views

ANSWER

Would be helpful to know your OS, version of Nuxeo, and in all likelihood the content of nuxeo.conf related to postgresql.

Can you connect to your database using pgAdminIII?

03/12/2013

OS: Windows 7 Ultimate x64 Nuxeo Version: 5.6

Couldn't find a nuxeo.conf, but I did find a postgresql.conf in the Nuxeo install directory, just not enough room here to C&P that.

I'm fairly new to databasing, so I'm not very familiar with pgAdminIII, but I can follow directions quite well if you are inclined to explain how to connect using pgAdminIII.

03/12/2013

First check to make sure that Postgresql is running as a service. If not then try and start it.

BTW: if you used the Windows installer for Nuxeo then the location of your nuxeo.conf file should be held in the registry key HKEY_LOCAL_MACHINE\SOFTWARE{PRODNAME}\ConfigFile, where {PRODNAME} will be "Nuxeo CAP" or similar

03/12/2013

Strange. No service by the name of PostgreSQL is listed. Even stranger: in the registry path provided, I found no Nuxeo hives, but I did find one named PostgreSQL and another called PostgreSQL Global Development Group. Neither contain a value ConfigFile however. Should I try uninstalling/reinstalling?
03/12/2013

It's been a while since I installed a Windows copy using the installer, but I recall there was a question to install Postgresql as part of the process (it may have been experimental at the time). Did you see this question and try to install Postgresql?

If you want to avoid uninstall then you can download and install Postgresql separately using the current 9.2.x Windows installer. Of course if there was a problem with the nuxeo install then this will not fix the issue.

Even on Windows platforms I avoid the installer and use the multi-platform package - avoids registry nastiness, allows more easily for multiple installs on a single box (good for development and testing) and makes more portable.

The advantage of the installer (when it works correctly :-) is that it install Nuxeo and a number of dependencies.

03/12/2013

  1. Yes, there was an option to also install PostgreSQL and I opted in.

  2. On my own, I did exactly that. I went to the PostgreSQL website and downloaded/installed the standalone version without a problem, attempted to start the Nuxeo server, and still the same error in the log – connection refused, etc. etc.

Maybe I should just delete/uninstall everything, reboot and install each component from its standalone installation package obtained from their respective vendor along with the multi-platform package of Nuxeo?

Also, thanks a lot for your attention to my issue. I do appreciate it.

03/12/2013

Probably a good idea since it's clear that there was some hiccup in the original install.
03/12/2013



Thanks to Bruce for his assistance in helping me identify the issue. Upon reinstalling each package individually, I was able to pinpoint the location of my problem: the default Windows PostgreSQL installation database location.

The PostgreSQL one-click installation pre-packaged with Nuxeo is actually problematic for Windows installs. On the PostgreSQL site I learned that when prompted to point the installation to a database location, you cannot use the default location provided. The default subdirectory name “9.6” within the installation directory (C:\Program Files\PostgreSQL\9.6) causes a conflict with the rest of the installation because of the “.” in the subdirectory name. Instead, point the PostgreSQL install when it asks for a database directory location to C:\Data, or something within the proper Windows directory naming conventions for it to work.

When installing on a Windows system for users like me that aren't adept to development, download the JDK7 (Java Development Kit 7) from Java.com, then download the PostgreSQL from PostgreSQL.org and then install Nuxeo. It will already identify the existence of the other two components and will only install the core Nuxeo files.

1 votes



Good to hear it's resolved!
03/12/2013

Thanks for the feedback.
03/14/2013