I’m setting up a new Servoy install on a headless Ubuntu 10.04.2 LTS server. Before I can “Add Database Server” in :8080/servoy-admin I need to create the new database in PostgreSQL. I am using the instance of PostgreSQL which comes bundled in the Servoy .jar installation. However, I am encountering problems because Ubuntu does not seem to recognise a PostgreSQL user. For example, if I type:
createuser: could not connect to database postgres: FATAL: role "root" does not exist
What is the default ‘role’ for the database postgres when using the bundled installation of PostgreSQL? Is there some config file I’ve overlooked somewhere?
Hi Phil, I suggest you to install Postgres on your Ubuntu server separately from servoy. It’s a lot easier to keep it up to date and start it and stop it at will.
You can do that the Ubuntu way but you first have to add an extra repository to your apt sources.list:
deb http://archive.canonical.com/ lucid partner
deb http://ppa.launchpad.net/pitti/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/pitti/ppa/ubuntu lucid main
After that you can install postgres-9 with the usual commands:
Thanks ngervasi. I’ve now installed Postgresql separately (version 9.0 package could not be found so I ran sudo apt-get install postgresql which installed version 8.4). I then reinstalled Servoy.
When I try to run servoy_server.sh I get the following error in the log file:
0 [main] ERROR com.servoy.j2db.util.Debug - Configuration file is missing (you might have choosen to not install a database from installer), place a valid config file in the application_server directory (from your developer environment, for example)
I guess this is correct because I set the .xml install helper file not to install the database. What file do I now need to add into the application_server directory?
I guess it’s the servoy.properties file but it should have been created by the installer, try to copy that file from your developer installation but it sounds strange to me.
How did you install exactly?
You were absolutely right, it was servoy.properties which was missing. I’ve now copied that into the /application_server directory and tried to restart. I am now seeing some output into servoy_log.txt:
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "DBA"
I think these lines are now incorrect in servoy.properties as they refer to the bundled PostgreSQL instance:
I managed to connect to PostgreSQL using pgAdmin III on my Mac in the end then set up the required databases. After that, I had to modify the settings in servoy.properties in order for Servoy to connect to the relevant databases.