Databases do not connect on OS X 10.8

Hi,

The last years I have used MySQL for development and everything worked fine.

When installing my new MacBook Pro I decided to start from scratch and also make use of the standard PostgreSQL db’s.

Now, after 2 weeks I have an issue.

Without any reason or changes to the configuration, after several starts/stops of developer, the db’s won’t connect anymore but the db server is started as expected.

Yesterday I decided to do a new install of Servoy Developer and dropped the database folder on it.
It worked for a couple of hours again and this morning: (*&^%^$%&$

Any ideas?
This is what the developer log tells me:

2013-05-02 08:01:23,037 ERROR [main] com.servoy.j2db.server.Za.Zo - sql exception in load tables
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:4)
at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.datasource.Za.getConnection(Za.java:4)
at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:9)
at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1643)
at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:725)
at com.servoy.j2db.server.Za.Zo.Za(Zo.java:590)
at com.servoy.j2db.server.Za.Zo.Zk(Zo.java:49)
at com.servoy.j2db.server.Za.Zo.getTable(Zo.java:1475)
at com.servoy.j2db.server.Za.Zo.getTable(Zo.java:256)
at com.servoy.j2db.persistence.Form.getTable(Form.java:347)
at com.servoy.eclipse.ui.property.PersistPropertySource.createPropertyDescriptor(PersistPropertySource.java:848)
at com.servoy.eclipse.ui.property.PersistPropertySource.createPropertyDescriptor(PersistPropertySource.java:774)
at etc. etc.

Hi Marcel,

you probably don’t want to hear this :wink: , but… I’m running my OS X 10.8 with PG since august last year without any problem.
Anyway which version of PG do you use and what install did you do?
Is this the ‘shipped with Servoy’ PG version you use?

mboegem:
Hi Marcel,

you probably don’t want to hear this :wink: , but… I’m running my OS X 10.8 with PG since august last year without any problem.

Not really but it is nice to know :D
I know Robert (Ivens) has no issues as well but he is running the shipped version of PG (either?)…

mboegem:
Anyway which version of PG do you use and what install did you do?
Is this the ‘shipped with Servoy’ PG version you use?

It is the version shipped with Servoy 7.1.0 and I install the Developer. Nothing special, completely ‘out of the box’ in the applications folder.

Both Robert and I run a PG install from DB enterprise.
This is more convenient when having multiple install of Servoy so you don’t end up with a whole lot of DB installs as well.

It’s just 1 PG install that I use for multiple Servoy installs. (apart from MySQL, MS-SQL and Oracle XE that I need for specific customers)

I’d say give it a try to run a seperate install, which is a better choice in my opinion as you can keep up with the latest updates of PG (which is a little harder when using the bundled install)

Is a good idea for the near future.

For now it is not a solution because I need to finish stuff.

BTW I just found that it does not have anything to do with the installation(s) for 99% certain.

A fresh install gave the same issue which made me wonder what would happen when I would restart the system.

Guess what: db’s connect now.

Strange and not a long term solution but it will do for now :)

Thanks anyway!

IT2Be:
A fresh install gave the same issue which made me wonder what would happen when I would restart the system.

Guess what: db’s connect now.

I thought you mentioned you are running Mac OS? This is a Windows solution :lol:

btw I wrote ‘db enterprise’ but should be ‘enterpriseDB’ (thnkx Robert :) )

mboegem:
I thought you mentioned you are running Mac OS? This is a Windows solution :lol:

Hmm, I have a vm with Windows 7 on it. I don’t share anything but maybe Big ‘Bill’ is watching me :evil:

IT2Be:
Hmm, I have a vm with Windows 7 on it. I don’t share anything but maybe Big ‘Bill’ is watching me

Me too :(

I don’t know who’s watching who… the only thing I know this vm takes the most memory… (it could do with less but then it’s slow :o )

Back on topic: glad it works now :)

IT2Be:
Is a good idea for the near future.

I thought that for anyone with over 1,000 Servoy forum posts the Servoy installer didn’t come with a default database install option. To keep you from looking rusty… :)

Correct David.
Until 2 weeks ago, when I received my new MacBook Pro, I always used one MySQL db across all my Servoy installs.
I thought, and now stand corrected, that using a default installation with the included pg db would make life even easier…

OK, back to serious business.

I am back to where I started this post after:

  1. closed the lid of the laptop and went away;
  2. after coming back I opened up the laptop and started Servoy;
  3. PG db’s again do not connect (PG server is started though);
  4. restarted the laptop and the issue remained;
  5. also checked other installs of Servoy this time, these db’s do not connect either (PG Servers are started though);

Anybody?

Export your tables, install stand alone PG, import, repoint your database connections.

Serious business…NEVER use Servoy’s install of PG. Not even for quick and dirty stuff.

Even stranger:

  • second restart;
  • no luck
  • disabled the FireWall and released security settings of J7
  • db’s connect
  • enabled the FireWall and reset the security settings of J7
  • db’s still connect

The solution(s) feel a ‘little’ arbitrary :(

david:
Export your tables, install stand alone PG, import, repoint your database connections.

Serious business…NEVER use Servoy’s install of PG. Not even for quick and dirty stuff.

I will when I am back from my vacation…

Just take your laptop with you… vacation is always a great time to fix these things.
No pressure, time limits or whatsoever…
And even better: you can answer our support questions as a bonus :mrgreen:

Have a nice vacation!

I always install PostgreSQL using homebrew on Mac OS X…