There was an error creating the database!

During the installation I get the following error message:

Operating: Ubuntu 16.04
I have already reinstalled Ubuntu.
Can anyone help me?


Ok, did you run the install as
sudo ./install -fiap ?

Try that and then try again. You should have postgresql installed and setup with a default username of airtime and default password of airtime. I just spent the day looking into the install code.

Not sure why this would have an error at this part in the process if your database exists. There is a check prior to this that should check to see if there are credentials to create the database.

Also feel free to share more details about the whether this a VPS or physical device.

I’ll try the command tomorrow.

So far I’ve done everything with ./install

Hello! I continue to receive the error message!

Some data from my root server:
Operating: Ubuntu 16.04 Xenial LTS Expert Extended (64-Bit)
Processor: Intel Core i7-2600K
RAM: 32 GB

What information do you need?

And you can tell me how to create a database. He doesn’t seem to get it.

Ok, hmm can you try to manually login to postgresql with the user airtime and password airtime and create the database.
This can be done by typing psql -h localhost -U airtime -W
and then typing in airtime for the password
once in type
and it should show you a list of databases if you get this far and you don’t see the airtime database try
create database airtime;

If there is an error somewhere in the process let me know, otherwise try
\l again and see if it is now there and you can try the install again.

root@root403:~# psql -h localhost -U airtime -W
Password for user airtime:
psql: FATAL: password authentication failed for user "airtime"
FATAL: password authentication failed for user “airtime”

Where can I find the password?

Sorry if I’m annoying. Only my old server worked. This strikes.

Password was airtime. Sorry I didn’t see that. Now comes the following:
root@root403:~# psql -h localhost -U airtime -W
Password for user airtime:
psql: FATAL: database “airtime” does not exist

Ok, this is weird. I thought that command wouldn’t require the database to exist to let you login. I’m not sure why there is this issue as the issue is with creating the database.

See if you can get in to run the \l command by going in with this command
sudo -u postgres psql

Now I was logged in and created the database airtime. Now, how do I set the user airtime to get the rights? This is where definately now stands: The database was installed with an incorrect encoding type!

Does anyone know any further? I have no idea at this point.

I’m not sure exactly. How did you determine the database was installed with incorrect encoding type ?

I don’t have all of postgresql commands memorized but looking at the installer code it runs something like CREATE DATABASE airtime WITH ENCODING 'UTF8' TEMPLATE template0 OWNER airtime

Try that and see if it works.

Hello, ive same issuem debian 9.2

Hmm I wonder if has to do with the LATIN1 encoding vs UTF8. Have you tried to manually create the database using the command above ?

Perhaps some of the suggestions on this stackoverflow post might help -

psql: FATAL: database “airtime” does not exist

postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
postgres | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 |
template0 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)

wtf! now we have end of april 2019 an this bug is still present in ubuntu 18.04. is nobody out there, who is able to release a proper installation-script for libretime? since years the same problems, this may be a way people turning off libretime instead working on or with it, but at this state it is realy unusable for me, because my lifetime is limited.

So the install script works for the vast majority of cases that we are aware of and the only way we can fix it when there is a problem is for people to provide detailed information about their setup and hints as to what went wrong.

So evidently you did not have a database created during your installation process. And this “bug” but you provide no more details or logs of what happened when you ran your installation script. So if we are going to assume this is a bug we need more details.

Are you running this on a VPS, or a bare metal server.
Have you tried running sudo ./install -fiap to avoid all of the prompts. It’s possible that the script didn’t create the database for some reason but without a log of what happened with the install script it is impossible to guess.

I’d recommend running the above command and if it works then great, and if it doesn’t and you want assistance then try and share some more information.

I understand frustration but considering this is a free software project developed mostly by volunteers the attitude is a little bit annoying, especially when most people don’t run into this issue as far as I know. We are also happy to fix it if we can figure out what went wrong but you are not providing enough information for us to troubleshoot.