Unable to complete installation of the database

Ask your questions regarding TimeTrex installation here.
Post Reply
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Unable to complete installation of the database

Post by cerber98 »

Hello!
I am trying to install the Community Version on my server running Ubuntu v16. I go through most of the process, but get stuck on installing the database. I don't know if it didn't install correctly the first time, but if I try installing the .deb package, it says the following:

timetrex-community-edition is already the newest version (15.2.1).

If I try installing using the .zip package, everything goes fine until I get to psql command. When I run it, it says:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Sorry, this has probably been covered somewhere in the Forum, but I couldn't find it, so what do I do?

Thanks,
Alex.
shaunw
Posts: 7813
Joined: Tue Sep 19, 2006 2:22 pm

Re: Unable to complete installation of the database

Post by shaunw »

I am trying to install the Community Version on my server running Ubuntu v16.
Ubuntu 16.04 is past its end-of-life and TimeTrex does not support it as all its packages are severely out-of-date.
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Sorry, I meant Ubuntu v18, not 16. Please help!

Thanks,
Alex.
shaunw
Posts: 7813
Joined: Tue Sep 19, 2006 2:22 pm

Re: Unable to complete installation of the database

Post by shaunw »

Sounds like your PostgreSQL installation has unix sockets turned off in its config file, or there is a problem with the installation of PostgreSQL itself (is it actually running?). What version of PostgreSQL do you have installed?
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

PostgreSQL got installed with the TimeTrex .deb package. When I check, it says 10.19.
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Or I guess it was already pre-installed with Ubuntu 18...
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Here's what I get when I run service postgresql status:

postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
Active: active (exited) since Sun 2022-05-08 02:16:10 UTC; 1 day 19h ago
Process: 10958 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 10958 (code=exited, status=0/SUCCESS)

What do I do now?

Thanks,
Alex.
shaunw
Posts: 7813
Joined: Tue Sep 19, 2006 2:22 pm

Re: Unable to complete installation of the database

Post by shaunw »

Try running this instead and see if it connects:

Code: Select all

psql -h localhost
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Here's what it did:

psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
shaunw
Posts: 7813
Joined: Tue Sep 19, 2006 2:22 pm

Re: Unable to complete installation of the database

Post by shaunw »

So your PostgreSQL service is either not actually running, or its severely restricted to the point of not being accessible. Our installation guide is based on a fresh installation of Ubuntu based on default settings and has been confirmed to work in that situation.

Fixing PostgreSQL itself is outside the scope of TimeTrex and therefore this forum. However there are many other great forums and resources to assist with it.
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Ok, got it figured out (at least running postgresql). I even upgraded it to version 14. It connects and when I type in psql -h localhost, it asks for password for ubuntu.
Anyway, I've created a database timetrex with a password, but when I go to <<myip>>/timetrex/interface/install/install.php and run it, it gets to Database Configuration screen, it asks for Database name, user name, and password, as well as privileged DB username and password. The database name is timetrex and I assume I use the user name (timetrex) and password that I created when I executed CREATE USER timetrex WITH CREATEDB CREATEROLE LOGIN PASSWORD 'password_here';
When I use those and click on Test Connection, it says: Connection test to your database as a non-privileged user has Failed!

What do I do next?

Thank you very much!
Alex.
cerber98
Posts: 14
Joined: Sat May 07, 2022 7:59 pm

Re: Unable to complete installation of the database

Post by cerber98 »

Ok, never mind. That was silly of me. I just had to add a Privileged database user name. I got it now and it's working!
Thanks for steering me in the right direction!

Alex.
Post Reply