Weird 'Cannot start repository' problem (7.4.11)

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Fri Apr 09, 2021 6:59 pm

Hi all,
couldn't quite work out best section for this post, so settled on here...
I am trying to set up a Mac mini [macOS High Sierra 10.13.6] to act as a Servoy Application Server (SAS) for a client who is 'stuck' on Servoy version 7.4.11 [-releaseNumber 2050]
Their solution is running in Smart Client within the DataSutra (DS) framework.
It was running on a Windows Server with a Postgres Database Server until some Microsoft Windows update was forced upon the server causing SAS to stop working (well actually it just constantly generated loads of networking errors.
So I then set up a stand alone Windows PC to act as SAS talking to PG server on above server, which is running fine, but client is worried that some other Windows update might suddenly render that SAS unusable, hence me suggesting a Mac mini...
I did manage to get everything installed and up & running (even though I had to 'sign' everything on the Mac, but not on the PC), but when they started testing, it wouldn't send email to the cloud Office 365 mail server which used TLS & trying to look in to it, I thought was an issue with the version of Java it was running (JDK 6).
So I have been trying to set it up with Java 7 Update 80 instead as I thought that would be highest version Servoy 7.x might like.
I installed Servoy first as just the 'Application Server service' but when this wouldn't work, I thought I'd install Developer as well to try & see what might be wrong.

TL;DR, basically when SAS starts, it fails saying it can't open Repository database or Windows Postgres Server, even though PGAdmin, Postico & Servoy Developer can all connect to all DB's on that server from Mac & the other PC SAS also can.

When I try to use server 'name' in servoy.properties file, I get this error
Code: Select all
2021-04-08 16:47:16,056 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Cannot start repository:  [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
   at com.servoy.j2db.server.Za.Za.Zb(Za.java:810)
   at com.servoy.j2db.server.Za.Za.<init>(Za.java:972)
   at com.servoy.j2db.server.Za.Za.<init>(Za.java:1068)
   at com.servoy.j2db.server.Za.Zo.Za(Zo.java:516)
   at com.servoy.j2db.server.main.ApplicationServer.Za(ApplicationServer.java:226)
   at com.servoy.j2db.server.main.Zob.start(Zob.java:38)
   at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
   at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:272)
   at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
   at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215)
   at org.postgresql.Driver.makeConnection(Driver.java:404)
   at org.postgresql.Driver.connect(Driver.java:272)
   at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
   at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:2)
   at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:3)
   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:39)
   at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:24)
   at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:360)
   at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:25)
   at com.servoy.j2db.server.Za.Za.Zb(Za.java:1096)
   ... 12 more
Caused by: java.net.UnknownHostException: proconf-dc01.proconferences.local
   at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   at java.net.Socket.connect(Socket.java:579)
   at org.postgresql.core.PGStream.<init>(PGStream.java:61)
   at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
   ... 27 more
2021-04-08 16:47:16,072 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]

(same without the '.proconferences.local' bit)
If I try with it's actual IP address I get the same thing
Code: Select all
2021-04-08 18:27:33,545 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Cannot start repository:  [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
   at com.servoy.j2db.server.Za.Za.Zb(Za.java:810)
   at com.servoy.j2db.server.Za.Za.<init>(Za.java:972)
   at com.servoy.j2db.server.Za.Za.<init>(Za.java:1068)
   at com.servoy.j2db.server.Za.Zo.Za(Zo.java:516)
   at com.servoy.j2db.server.main.ApplicationServer.Za(ApplicationServer.java:226)
   at com.servoy.j2db.server.main.Zob.start(Zob.java:38)
   at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: Connection to 192.168.1.4:5437 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:262)
   at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
   at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215)
   at org.postgresql.Driver.makeConnection(Driver.java:404)
   at org.postgresql.Driver.connect(Driver.java:272)
   at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
   at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:2)
   at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:3)
   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:39)
   at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:24)
   at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:360)
   at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:25)
   at com.servoy.j2db.server.Za.Za.Zb(Za.java:1096)
   ... 12 more
Caused by: java.net.ConnectException: Network is unreachable
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
   at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
   at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   at java.net.Socket.connect(Socket.java:579)
   at org.postgresql.core.PGStream.<init>(PGStream.java:61)
   at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
   ... 27 more
2021-04-08 18:27:33,558 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]

I also tried removing Java 7 & installing latest Java 8, same problem!
(& as stated, Developer that is using same servoy.properties file launches and can access all DB's without a problem)
There is probably something in the above error messages that someone far more knowledgable about Java than myself will see and know what the issue is, but I am stumped & have been trying to 'tweak' things for days to get it to work & it is driving me mad :evil:

Any help would be greatly appreciated (& please don't suggest using another PC or upgrading to a newer version of Servoy which is not possible for them currently)

Thanks

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby swingman » Sun Apr 11, 2021 11:08 pm

Hi Rafi,

cloud Office 365 mail server which used TLS


Are you still on the old TLS?
If so, you need to specify a newer TLS version. I use

Code: Select all
var options = new Array('mail.smtp.starttls.enable=true','mail.smtp.ssl.enable=false','mail.smtp.port=587', 'mail.smtp.tls.enable=true', 'mail.smtp.ssl.protocols=TLSv1.2', 'mail.smtp.host=smtp.office365.com');
plugins.mail.sendMail(to, from, subject, body, null, null, null, options);


hope this helps,

Christian
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1374
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Mon Apr 12, 2021 10:23 am

swingman wrote:Hi Rafi,
Are you still on the old TLS?
If so, you need to specify a newer TLS version. I use
hope this helps,
Christian

Thanks Christian, I will give that a try once I can get SAS to launch & talk to repository...
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Tue Apr 13, 2021 7:51 pm

Trying to get a response on this...
I tried again after reverting to what I thought was a running previous install, but am still not managing to connect, even if I get it to try & connect to a PG server running on local Mac
I tried changing the 'wait' property in the servoyserver file to 30 then 60 seconds to see if it needed to wait for some 'resolver' or something to launch, but still no good.
Do I need to change the 'user' that server is opening under?
I just don't understand why it won't connect... :twisted:
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Mon Apr 26, 2021 3:10 pm

[^^^ BUMP ^^^ anyone???]
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby ROCLASI » Wed Apr 28, 2021 2:00 pm

Hi Rafi,

So the main issue here is that Servoy Server can't connect to the repository database, correct?
What do you see in the PostgreSQL log when this happens?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

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

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Wed Apr 28, 2021 4:08 pm

ROCLASI wrote:Hi Rafi,
So the main issue here is that Servoy Server can't connect to the repository database, correct?

Yes!
What do you see in the PostgreSQL log when this happens?

I have to admit I have not checked that as it is on a server elsewhere at client & I will have to log in later to check, but what I don't understand is why once system has booted up & I manually launch Servoy or a PG client, they all connect to that server without an issue????

Will update later (thx for replying to post though ;-) )
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby rafig » Tue May 11, 2021 6:26 pm

ROCLASI wrote:Hi Rafi,
What do you see in the PostgreSQL log when this happens?

Hi Robert,
I finally managed to try & see what was going on on the (PG) server when Mac boots & service tries to start.
And the answer is...
Nothing!
There was nothing on the PG logs on the server, but it still fails to connect on boot up , even though once system is up, I can connect with other apps, including Servoy Developer that is using the same properties file to connect...
Oh well, not sure what to do now...
Servoy Certified Developer
Image
rafig
 
Posts: 611
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Weird 'Cannot start repository' problem (7.4.11)

Postby swingman » Thu May 13, 2021 9:15 pm

OK, one thought:

Your Servoy Server is being started by launchctl. So is PostgreSQL.
So if PostgreSQL is a bit slow starting, launchctl gives up after 3 attempts.

Your startup scripts will be in one of these:

Code: Select all
~/Library/LaunchDaemons/
~/Library/LaunchAgents/
/Library/LaunchDaemons/
/Library/LaunchAgents/


In my case

Code: Select all
ls -la /Library/LaunchDaemons/


In there I see

Code: Select all
com.servoy.server.ServoyServer.plist


In my case I do the following load/reload:

Code: Select all
sudo launchctl unload -w /Library/LaunchDaemons/com.servoy.server.ServoyServer.plist
sudo launchctl load -w /Library/LaunchDaemons/com.servoy.server.ServoyServer.plist


and the Servoy server starts.

Code: Select all
sudo launchctl list | grep servoy


to confirm it has started.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1374
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 5 guests