pg_ctl: not found on ubuntu

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:
vagrant@ubuntu-14:/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:

#!/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

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.

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

uname -a

file postgres_db/bin/pg_ctl

Rob

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:

vagrant@ubuntu-14:/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
vagrant@ubuntu-14:/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
vagrant@ubuntu-14:/home/servoy/application_server$

So, this looks like a 32/64 bit issue?
But I used the installer…

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

Hi Rob,

Thanks, this will get me going :)

I will use the directories of a fresh Servoy 8 folder.

Hmm, funny.

This is what happens when I install:

[ 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 ]
vagrant@ubuntu-14:/vagrant$

And the application_server really has no database or postgres_db folders :(

vagrant@ubuntu-14:/vagrant/servoy_81/application_server$ ls
beans  drivers  lib      server   servoy.properties  solutions
docs   lafs     plugins  service  servoy_server.sh   terracotta
vagrant@ubuntu-14:/vagrant/servoy_81/application_server$

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

It works like a charm now :)