Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Omnis Headless Server on Ubuntu 24.04 LTS – no connection to Postgres

  • Omnis Headless Server on Ubuntu 24.04 LTS – no connection to Postgres

    Posted by Uwe Smidt on January 5, 2025 at 9:49 am

    Dear $all,
    I’m setting up a Web app on a VPS server running Ubuntu 24.04.

    I can access my app, and the OSAdmin, directly or trough Apache, BUT my app does not log in to Postgres 16.6 on the same server. I assume the problem is not Postgres and its config files.

    When remote debugging the app on the Omnis Headless server, I get error messages like:

    kPgSqlConnectionBad kPgSqlConnectionBadkDAMServerMethodFailed Postgres error code: 31897

    However, I can access this Postgres server running the library from my developer machine.

    Looking into the log files of Omnis Headless server, I find these error messages:

    {"thread":0,"when":"20250103 18:42:08","type":"headlesserror","length":167}Load error: /usr/local/omnis_software/omnis_studio_headless_app_server_11_36251/xcomp/damdb2.so: libdb2.so.1: cannot open shared object file: No such file or directory

    {"thread":0,"when":"20250103 18:42:08","type":"headlesserror","length":169}Load error: /usr/local/omnis_software/omnis_studio_headless_app_server_11_36251/xcomp/ow3.so: libldap-2.5.so.0: cannot open shared object file: No such file or directory

    {"thread":0,"when":"20250103 18:42:08","type":"headlesserror","length":165}Load error: /usr/local/omnis_software/omnis_studio_headless_app_server_11_36251/xcomp/oxml.so: libnsl.so.2: cannot open shared object file: No such file or directory

    and further down:

    {"thread":0,"when":"20250103 18:42:21","type":"tracelog","length":75}libldap-2.5.so.0: cannot open shared object file: No such file or directory

    However, I do have libldap installed, but may be not the right version:

    root@omnis-on-ubuntu:~# apt search libldap

    Sorting... Done

    Full Text Search... Done

    ...

    libldap2/noble-updates,now 2.6.7+dfsg-1~exp1ubuntu8.1 amd64 [installed]

    OpenLDAP libraries

    ...

    This seems to be version 2.xx, and it appears that OHS needs a prior version so.0 (libldap-2.5.so.0). But I can’t find a way to install it (ChatGPT has been of invaluable help, but now I’m stuck…)

    Any ideas on how to get my connection from OHS to Postgres running?

    Thanx a lot!

    Bye Uwe

    Uwe Smidt replied 6 months, 3 weeks ago 2 Members · 4 Replies
  • 4 Replies
  • Mats Olsson

    Member
    January 5, 2025 at 10:52 am

    Any ideas on how to get my connection from OHS to Postgres running?

    Is there anything in the Postgresql log that can give a hint?

    What is the settings in Postgresql.conf and hba.conf? (Postgresql)

    If you the app and pg server is on the same server ( using 127.0.0.1 ), it may be some access problem.

    • This reply was modified 6 months, 3 weeks ago by  Mats Olsson.
    • This reply was modified 6 months, 3 weeks ago by  Mats Olsson.
  • Uwe Smidt

    Member
    January 5, 2025 at 12:12 pm

    Hi Mats,
    Happy New Year to you!
    As I said, I do not suspect it to be a Postgres config problem – it seems more in the way that my Ubuntu 24.04 installation is lacking some dependencies…

    I’ve got: postgresql.conf

    listen_addresses = '*'	

    and in pg_hba.conf

    # Database administrative login by Unix domain socket

    local all postgres peer

    # TYPE DATABASE USER ADDRESS METHOD

    # "local" is for Unix domain socket connections only

    local all all peer

    # IPv4 local connections:

    host all all 127.0.0.1/32 scram-sha-256

    # IPv4 remote connections:

    host all all 0.0.0.0/0 password

    # IPv6 local connections:

    host all all ::1/128 scram-sha-256

    # Allow replication connections from localhost, by a user with the

    # replication privilege.

    local replication all peer

    host replication all 127.0.0.1/32 scram-sha-256

    host replication all ::1/128 scram-sha-256

    I can connect from my VPS Debian 12/OHS instance to postgres on the Ubuntu instance, but not from Ubuntu/OHS to Ubuntu/Postgres…

  • Mats Olsson

    Member
    January 5, 2025 at 3:15 pm

    Happy New Year to you!

    Same to you!

    it seems more in the way that my Ubuntu 24.04 installation is lacking some dependencies…

    Ubuntu is no “server OS” AFAIK. Which means that you get a lot of extra stuff you do not need (read dependencies)

    listen_addresses = '*'	

    If you only work inside a VPS you do not have to listen to outside call…

    And you pg_hba.conf seems to be OK for “internal use”.

    libnsl.so.2: cannot open shared object

    To me, it seems that the problem is inside Omnis. Check read/write rights for the mentioned files to start with…

    • This reply was modified 6 months, 3 weeks ago by  Mats Olsson.
  • Uwe Smidt

    Member
    January 6, 2025 at 6:26 pm

    Dear Mats,

    As I understand, Debian is the ‘pure’ Server OS, but Ubuntu LTS comes in server flavours as well, as lean & mean as possible. And since UpCloud offer both Debian 12 and Ubuntu 24.04 LTS as VPS images, I wanted to give it a try, because I also have web sites to host with wordpress, and I ran into many problems (e.g. an old, not updateable WordPress itself) with Debian 12 being to old.

    With Ubuntu 24.04, wordpress was up and running without any efforts, so I tried to set up Omnis on Ubuntu, too, in order not to learn and maintain to many different systems.

    Anyway, I did check permissions & ownership, but they were as all the other libs that loaded without a glitch.

    So I assume that it must be something about the version of ‘libldap’ that keeps Omnis OHS from connecting to Postgres.

    But many thanx for your input!

    Bye

    Uwe

Log in to reply.