There was an error creating the database!

#1

Hello
During the installation I get the following error message:

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

Greetings,
Luca

#2

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.

#3

I’ll try the command tomorrow.

So far I’ve done everything with ./install

#4

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?

#5

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

#6

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
\l
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.

#7

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”

#8

Where can I find the password?

#9

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

#10

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

#11

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

#12

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!

#13

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

#14

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.

#15

Hello, ive same issuem debian 9.2

#16

#17

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 ?

#18

Perhaps some of the suggestions on this stackoverflow post might help - https://stackoverflow.com/questions/20815440/force-postgres-to-install-with-utf8-encoding-not-latin1

#19

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.

#20

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.