Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script with application and prostgres on different servers not taking PGPASSWORD #5644

Closed
joseagaleanoc opened this issue Mar 14, 2019 · 4 comments
Assignees

Comments

@joseagaleanoc
Copy link

Trying to install Dataverse on AWS services and have one server for the application and another for the Databsae. Both the ADMIN and the Dataverse Postgres User have different passwords.
I get the following error executing ./install:

(Tried executing: PGPASSWORD=################; export PGPASSWORD; /bin/psql -h dataverse.was.link -p 5432 -U root -d postgres -c 'SELECT * FROM pg_roles' > /dev/null 2>&1)

Haven't been able to connect to the remote Postgres server as the admin user.
(Or you simply don't have psql installed on this server)
It IS possible to configure a database for your Dataverse on a remote server,
without having admin access to that remote Postgres installation.

In order to do that, please copy the installer (the entire package) to the server
where PostgresQL is running and run the installer with the "--pg_only" option:

   ./install --pg_only

Press any key to continue the installation process once that has been
done. Or press ctrl-C to exit the installer.

I understand its a connection error. I modified install and included on the command to include -W

# 3d. CHECK IF WE CAN TALK TO POSTGRES AS THE ADMIN:
    if ($psql_exec_path eq "" || system( $psql_admin_exec . "/psql -h " . $CONFIG_DEFAULTS{'POSTGRES_SERVER'} . " -p " . $CONFIG_DEFAULTS{'POSTGRES_PORT'} . " -U " . $POSTGRES_ADMIN_USER . " -W -d postgres -c 'SELECT * FROM pg_roles' > /dev/null 2>&1" ) )

This works but it prompts for the ADMIN password, but the rest of the queries fail. Again if I set the -W parameter on the following queries it works but I have input the ADMIN password (which is like 5 times)

@pdurbin
Copy link
Member

pdurbin commented Mar 14, 2019

@joseagaleano thanks for reporting this issue! I just assigned it to you since you mentioned you're going to work on it at https://groups.google.com/d/msg/dataverse-community/o91IaORh2V0/7Pc1DP6sBAAJ

As I mentioned in that thread, Harvard Dataverse used to have PostgreSQL on a separate server. The architecture looked something like this:

3webservers

(That image is from http://guides.dataverse.org/en/4.11/installation/prep.html#advanced-installation )

These days Harvard Dataverse uses Amazon RDS for PostgreSQL instead.

I'm not sure how many other installations of Dataverse run PostgreSQL on a separate server but hopefully some of them are out there and can offer some advice.

@pdurbin
Copy link
Member

pdurbin commented Mar 28, 2019

@joseagaleano hi! I just thought I'd check if you're blocked. Do you need any help with this?

@pdurbin
Copy link
Member

pdurbin commented Dec 4, 2019

@joseagaleanoc hi! Are you still working on this issue? I wanted to let you know that there is a plan to rewrite that install script from Perl to Python in #3937.

@pdurbin
Copy link
Member

pdurbin commented Oct 9, 2022

Are you still working on this issue? I wanted to let you know that there is a plan to rewrite that install script from Perl to Python in #3937.

The rewrite was done in this PR:

@joseagaleanoc are you still interested in this issue you opened? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants