Database Issue with Mountain Lion

Questions and answers for all installation-related topics for Servoy products

Database Issue with Mountain Lion

Postby udiluca » Wed Apr 10, 2013 7:31 pm

Hello,

I upgraded to Mountain Lion due to a crash with my previous machine, and I'm having issue with my former installations in Developer.
Here's the unique error reported :

"org.postgresql.util.PSQLException: Connexion refusée. Vérifiez que le nom de machine et le port sont corrects et que postmaster accepte les connexions TCP/IP."

Connexion refused, either machine name or ports are incorrect or postmaster doesn't accept TCP/IP connexions. Any clue ?

Ports are ok, they are available, the machine name didn't changed, so what can I do to fix it ?

Thanks

Ugo
udiluca
 
Posts: 24
Joined: Wed Apr 10, 2013 7:25 pm

Re: Database Issue with Mountain Lion

Postby ROCLASI » Wed Apr 10, 2013 8:32 pm

Hi Ugo,

It means that PostgreSQL is not listening on TCP (only on UNIX sockets) which it does out-of-the-box for security reasons.
You can change this in the postgresql.conf
See http://www.postgresql.org/docs/9.2/stat ... N-SETTINGS for more info.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Database Issue with Mountain Lion

Postby udiluca » Wed Apr 10, 2013 9:47 pm

Thank you Robert,
I uncommented the 'listen_adresses' but it doesn't seem to change anything.
here's the "connexion settings" part of the .conf file I have

Thanks again

Ugo


# - Connection Settings -

listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5434 # (change requires restart)
max_connections = 20 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = '' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
udiluca
 
Posts: 24
Joined: Wed Apr 10, 2013 7:25 pm

Re: Database Issue with Mountain Lion

Postby ROCLASI » Wed Apr 10, 2013 11:11 pm

Hi Ugo,

Did you restart PostgreSQL after the change ?
Also what does your connection string (in Servoy) look like?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Database Issue with Mountain Lion

Postby udiluca » Thu Apr 11, 2013 1:09 am

Hi,

Yes, I restarted Developer and even restarted my computer.
here are the current connexion string in servoy properties :

server.0.URL=jdbc\:postgresql\://localhost\:5434/servoy_repository
server.0.catalog=<none>
server.0.driver=org.postgresql.Driver
server.0.password=encrypted\:XAFg2JKIdj0\=
server.0.schema=<none>
server.0.serverName=repository_server
server.0.userName=DBA

The postgres.log however state a FATAL with role "admin" doesn't exist and thus a FATAL: data directory "/Applications/Servoy6/application_server/database" has wrong ownership

I'm wondering what exactly are the roles set and what parameter is expected as ownership for this directory

Thanks for your help
udiluca
 
Posts: 24
Joined: Wed Apr 10, 2013 7:25 pm

Re: Database Issue with Mountain Lion

Postby cl@muc » Thu Apr 11, 2013 9:16 am

Hi Ugo,

you should be the owner of the folder /Applications/Servoy6/application_server/database and its contents. You can check this in Terminal by typing the following command:
ls -l /Applications/Servoy6/application_server

Then you should get something like this:
...
drwx------ 18 cl admin 612 27 Feb 20:26 database
...
This means, that this folder 'database' belongs to me ('cl') and to the group 'admin'. If you have moved your Servoy6 folder to your new installed machine then you perhaps do not see your user name but rather you see a number or a wrong user name. So you have to fix this by adjusting the ownership:
chown -R [your_user_name] /Applications/Servoy6/application_server/database
e.g. :
chown -R cl /Applications/Servoy6/application_server/database

Hope this helps.

Christoph
Christoph Langheld
http://www.project-print.de
cl@muc
 
Posts: 11
Joined: Thu Sep 28, 2006 9:55 pm
Location: Munich

Re: Database Issue with Mountain Lion

Postby Ugo » Thu Apr 11, 2013 10:32 am

Hi Christoph,

That's what I get :
drwxr-xr-x+ 18 ugo wheel 612 11 avr 01:00 database

ugo is the owner of the whole Servoy6 folder as it should, but then 'admin' doesn't exist in my user groups

Thanks
Ugo Di Luca

SaaS Software Development Engineer ( Paris - France )
Cegid - http://www.cegid.fr
FileMaker Developer, trainer and consultant
DL Systems- http://www.dlsystems.fr
User avatar
Ugo
 
Posts: 28
Joined: Mon Dec 25, 2006 2:26 pm
Location: Paris, France

Re: Database Issue with Mountain Lion

Postby ROCLASI » Thu Apr 11, 2013 10:46 am

Hi Ugo,

You said you crashed. How did you reinstall Servoy/PostgreSQL ?
From a backup? Or you reinstalled it and imported the databases again ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Database Issue with Mountain Lion

Postby Ugo » Thu Apr 11, 2013 11:02 am

Hi,

Getting the datas back from my old HD was not possible, and the Time Machine recover from a Snow Leopard OS didn't lead to a satisfactory situation.
I uninstallled Servoy and re-installed it yesterday, this is a fresh install of a 6.0.9 version downloaded yesterday.
At the moment, I haven't recovered my previous workspaces and databases, I'm starting it up with the new installation.

Ugo
Ugo Di Luca

SaaS Software Development Engineer ( Paris - France )
Cegid - http://www.cegid.fr
FileMaker Developer, trainer and consultant
DL Systems- http://www.dlsystems.fr
User avatar
Ugo
 
Posts: 28
Joined: Mon Dec 25, 2006 2:26 pm
Location: Paris, France

Re: Database Issue with Mountain Lion

Postby ROCLASI » Thu Apr 11, 2013 11:13 am

Hi Ugo,

Can you copy/paste the error messages from the postgres.log ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Database Issue with Mountain Lion

Postby Ugo » Thu Apr 11, 2013 11:33 am

Sure,

Here it is

FATAL: data directory "/Applications/Servoy6/application_server/database" has group or world access
DETAIL: Permissions should be u=rwx (0700)."

Previously, the message was :
FATAL: data directory "/Applications/Servoy6/application_server/database" has wrong ownership

Thanks
Ugo Di Luca

SaaS Software Development Engineer ( Paris - France )
Cegid - http://www.cegid.fr
FileMaker Developer, trainer and consultant
DL Systems- http://www.dlsystems.fr
User avatar
Ugo
 
Posts: 28
Joined: Mon Dec 25, 2006 2:26 pm
Location: Paris, France

Re: Database Issue with Mountain Lion

Postby cl@muc » Thu Apr 11, 2013 11:41 am

Hi,

you could correct the ownership with the terminal:
e.g.:
chmod -R o-rwx /Applications/Servoy6/application_server/database
Christoph Langheld
http://www.project-print.de
cl@muc
 
Posts: 11
Joined: Thu Sep 28, 2006 9:55 pm
Location: Munich

Re: Database Issue with Mountain Lion

Postby ROCLASI » Thu Apr 11, 2013 11:44 am

Hi Ugo,

This is PostgreSQL being very secure and enforcing it.
Only the owner is allowed access to the data directory.
You can execute the following in the terminal to fix this:
Code: Select all
chmod -R 700 /Applications/Servoy6/application_server/database


And if it still complains about ownerships then there might be some files/directories in the data directory that have the wrong owner. The following command should fix that.
Code: Select all
chown -R ugo:wheel /Applications/Servoy6/application_server/database


Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Database Issue with Mountain Lion

Postby Ugo » Thu Apr 11, 2013 11:46 am

Thank you both of you, I will post the results

Ugo
Ugo Di Luca

SaaS Software Development Engineer ( Paris - France )
Cegid - http://www.cegid.fr
FileMaker Developer, trainer and consultant
DL Systems- http://www.dlsystems.fr
User avatar
Ugo
 
Posts: 28
Joined: Mon Dec 25, 2006 2:26 pm
Location: Paris, France

Re: Database Issue with Mountain Lion[solved]

Postby Ugo » Thu Apr 11, 2013 11:50 am

Bingo !

Code: Select all
chmod -R 700 /Applications/Servoy6/application_server/database


solved this issue, thank you BOTH very much for your time

Ugo
Ugo Di Luca

SaaS Software Development Engineer ( Paris - France )
Cegid - http://www.cegid.fr
FileMaker Developer, trainer and consultant
DL Systems- http://www.dlsystems.fr
User avatar
Ugo
 
Posts: 28
Joined: Mon Dec 25, 2006 2:26 pm
Location: Paris, France


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests