pg_ctl: not found on ubuntu

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

pg_ctl: not found on ubuntu

Postby IT2Be » Fri Nov 25, 2016 8:18 pm

Hi,

I have installed servoy application server (S7.4.8) on a vagrant vm with ubuntu 14.04 running under parallels.

Everything with that box is running as expected except that I can not start up the application server, reporting the following error message:
[email protected]:/home/servoy/application_server$ ./servoy_server.sh: 7: ./servoy_server.sh: postgres_db/bin/pg_ctl: not found
Is there something I miss or have to do?

The complete postgres_db folder is available including the mentioned file.
Files are all executable.
I even changed user rights to 0777 to make sure.

This is the shell file:
Code: Select all
#!/bin/sh

if [ -z "$CMD_LINE_START" ]; then
        CMD_LINE_START="java"
fi

postgres_db/bin/pg_ctl start -D database -l postgres_db/postgres_log.txt

# add package names to the rmi.whitelist.config -D property if you use 3th party plugins that have th$
while true
do
        $CMD_LINE_START -Djava.awt.headless=true -Drmi.whitelist.config=com.servoy.:com.sebster. -Xmx$
        EXITCODE=$?
        if [ "$EXITCODE" != 99 ] && [ "x$EXITCODE" != "x$ADDITIONAL_RESTART_CODE" ]; then exit $EXITC$
done


Anybody any ideas?

Thanks,

Marcel
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: pg_ctl: not found on ubuntu

Postby ROCLASI » Sat Nov 26, 2016 5:26 pm

Hi Marcel,

Not a direct answer to your question but the bundled PostgreSQL is not really designed for deploying into production with Servoy server. For one it's setup to be limited to 20 connections or so and security-wise it's not safe (directory is not protected and such).
This version is only really there for an quick and easy deployment with Developer. Even though, in my view, using a single instance run as a service might still be more convenient in the long run.

Anyway, I suggest you install PostgreSQL using one of the packages for your platform and run that as a separate service next to Servoy server.

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5205
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: pg_ctl: not found on ubuntu

Postby rgansevles » Sat Nov 26, 2016 5:59 pm

Marcel,

maybe it is a 32/64 bit binary difference.

What is the os exactly that is running in vagrant and what is the output of

Code: Select all
uname -a

file postgres_db/bin/pg_ctl


Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1838
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: pg_ctl: not found on ubuntu

Postby IT2Be » Sat Nov 26, 2016 6:14 pm

Thank you guys for trying to help me out here!

@Robert, I know and understand what you say.
The reason I do this with Vagrant is to give me a sandboxed and easy setup to test the deployment of my plugins and beans running in an application server.
Nothing more.

@Rob, the answer to your question is this:
Code: Select all
[email protected]:/home/servoy/application_server$ uname -a
Linux ubuntu-14 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[email protected]:/home/servoy/application_server$ file postgres_db/bin/pg_ctl
postgres_db/bin/pg_ctl: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
[email protected]:/home/servoy/application_server$


So, this looks like a 32/64 bit issue?
But I used the installer...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: pg_ctl: not found on ubuntu

Postby rgansevles » Sun Nov 27, 2016 1:39 pm

Hi Marcel,

In versions before release 8, Servoy only bundled the 32 bit version of postgres.
You need some special libaries in linux to run these from a 64 bit OS.
The later versions of Linux no longer support these.

You can try to install these packages, I think it is described here: http://askubuntu.com/questions/454253/h ... ntu-64-bit

Alternatively, if you need to test using servoy 7, you can copy the postges_db and database directories from a servoy 8 install.
Note that the database files are also cpu architecture dependent, a db from a 32-bit postgres won't work with 64-bit postgres.

Servoy 8+ comes with 64 bit postgres if you install on a 64 bit OS.

And, as Robert said, you can also separately install 32 bit postgres in your vm and connect to that one.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1838
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: pg_ctl: not found on ubuntu

Postby IT2Be » Sun Nov 27, 2016 4:58 pm

Hi Rob,

Thanks, this will get me going :)

I will use the directories of a fresh Servoy 8 folder.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: pg_ctl: not found on ubuntu

Postby IT2Be » Sun Nov 27, 2016 5:34 pm

Hmm, funny.

This is what happens when I install:
Code: Select all
[ Starting to unpack ]
[ Processing package: Application Server (1/13) ]
[ Processing package: Clustering support (2/13) ]
[ Processing package: Developer (3/13) ]
[ Processing package: JDBC Drivers (5/13) ]
[ Processing package: Application Server Service (6/13) ]
[ Processing package: Application Server Service component (7/13) ]
[ Processing package: Samples (8/13) ]
[ Processing package: Example Solutions (9/13) ]
[ Processing package: Documentation (10/13) ]
[ Processing package: Beans (11/13) ]
[ Processing package: Plugins (12/13) ]
[ Processing package: PDF support package (13/13) ]
[ Processing package: Processing files (13/13) ]
[ Unpacking finished ]
Install was successful
application installed on /vagrant/servoy_81
[ Console installation done ]
[email protected]:/vagrant$

And the application_server really has no database or postgres_db folders :(
Code: Select all
[email protected]:/vagrant/servoy_81/application_server$ ls
beans  drivers  lib      server   servoy.properties  solutions
docs   lafs     plugins  service  servoy_server.sh   terracotta
[email protected]:/vagrant/servoy_81/application_server$
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: pg_ctl: not found on ubuntu

Postby IT2Be » Wed Nov 30, 2016 12:38 am

I solved this by installing Postgres separately, as per suggestion of Robert.

It works like a charm now :)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest