Page 1 of 1

Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 2:43 pm
by afonsodev
Hi,

I just installed Vesta Panel and everything seems fine. Great software!

I need support for PostgreSQL so I followed the instructions in here:
https://vestacp.com/docs/#how-to-setup- ... ian-ubuntu

Everything went fine. Just had to logout and login to see psgql option in the combobox when creating a new db.

This was the error that came up after clicking "ADD":
"ERROR: pgsql host localhost doesn't exist"

Attached screenshot (wait to load):
Image

What can I do?

Thank you

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 4:45 pm
by mehargags
I guess VestaCP is not able to sense and configure the PostgreSQL that you installed separately. Maybe someone has an idea to make them talk with each other.

You should have done and Advanced install with PostgreSQL checked. (--postgresql yes)

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 5:41 pm
by afonsodev
Ok I dig a little bit...

This validation fails:
https://github.com/serghey-rodin/vesta/ ... in.sh#L223

So... even after following:
https://vestacp.com/docs/#how-to-setup- ... ian-ubuntu

Still, this file does not exists:

Code: Select all

/usr/local/vesta/conf/pgsql.conf
Can I just copy /usr/local/vesta/conf/mysql.conf to /usr/local/vesta/conf/pgsql.conf ?

Cheers

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 6:26 pm
by afonsodev
Ok, I copy mysql.conf to pgsql.conf (also .mysql.localhost to .pgsql.localhost) and edit to this:

Code: Select all

HOST='localhost' USER='postgres' PASSWORD='xxxxxxxx' TPL='template1' CHARSETS='UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8' MAX_DB='500' U_SYS_USERS='admin,xxxxxx' U_DB_BASES='4' SUSPENDED='no' TIME='16:34:32' DATE='2017-10-02'
Now I got success:
Database xxxxxxxxx has been created successfully. / open phpPgAdmin
I hope this can help other...

Cheers

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 8:11 pm
by mehargags
Great if it works for you.
I don't have hands-on experience with Postgres but I would suggest you to use & watch your system for a few days. Also check if the VestaCP backup scripts can successfully backup your DBs fine or not.

If VestaCP is able to manage PGSQL DBs fine, please mark the topic solved

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 10:18 pm
by afonsodev
OK I tried a backup and It is giving error:
Can't dump database afonsodev_map1
/usr/lib/postgresql/9.5/bin/pg_dump: invalid option -- 'i'
Try "pg_dump --help" for more information.
Now I have to dig more... Any ideas? Thanks.

Re: Error creating PostgreSQL database

Posted: Sun Oct 08, 2017 10:33 pm
by afonsodev
Following the v-backup-user command, I found the pgsql_dump in db.sh:
https://github.com/serghey-rodin/vesta/ ... /db.sh#L91

I'm using version 9.5 in Ubuntu 16.04 and there is no -i option.

EDIT: after removing this option, the user backup completed.