Transmart 13.8 installation postgres problem

52 views
Skip to first unread message

Carolin Bruckmaier

unread,
Sep 24, 2018, 3:14:08 AM9/24/18
to transmart-discuss
I am following the step by step installation guide for transmart 16.3. At the step "setting up a new database" ( https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledata ), executing the command 'make -j4 postgres' gives me the following error message:

make -C ddl/postgres/GLOBAL createdb
make[1]: Entering directory '/usr/local/transmart/transmart-data/ddl/postgres/GLOBAL'
test `/usr/bin/psql -v ON_ERROR_STOP=1 --single-transaction -X -d template1 -c "select exists (select datname from pg_database where datname = 'transmart')" -tA` \
= 'f' || (echo -e "\e[31mERROR\e[m: Database transmart already exists or connection error"; false)
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"?
/bin/sh: line 0: test: =: unary operator expected
ERROR: Database transmart already exists or connection error
make[1]: *** [createdb] Error 1
Makefile:45: recipe for target 'createdb' failed
make[1]: Leaving directory '/usr/local/transmart/transmart-data/ddl/postgres/GLOBAL'
make: *** [postgres] Error 2
Makefile:4: recipe for target 'postgres' failed


I checked the PSQL_BIN in the vars file, it should be set correctly.
Do you have any idea how to solve this problem?

Best,
Carolin



Peter Rice

unread,
Sep 24, 2018, 4:55:32 AM9/24/18
to transmar...@googlegroups.com, Carolin Bruckmaier
Hi Carolin,

Before creating the database there is a check whether the database
already exists. The psql command failed to connect.

First thing to check is whether postgres is up and running:

sudo service postgresql status

The check, the same way the installation does, by connecting as postgres:

sudo -u postgres /usr/bin/psql -c "select datname from pg_database"

Then try to connect using your settings in vars:

/usr/bin/psql -c "select datname from pg_database"

I expect we will see the same error message 'psql: could not connect to
server: No such file or directory'

The question then is which file or directory it could be looking for.

regards,

Peter Rice
Axiomedix Inc.


On 24/09/2018 08:14, Carolin Bruckmaier wrote:
> I am following the step by step installation guide for transmart 16.3.
> At the step "setting up a new database" (
> https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledat
> <https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledata>a
> --
> For more ways to get in contact with the tranSMART community visit
> https://wiki.transmartfoundation.org/display/transmartwiki/Getting+Support
> ---
> You received this message because you are subscribed to the Google
> Groups "transmart-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to transmart-disc...@googlegroups.com
> <mailto:transmart-disc...@googlegroups.com>.
> To post to this group, send email to transmar...@googlegroups.com
> <mailto:transmar...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/transmart-discuss/80534834-22f9-4803-a8e6-7f2cddf1440e%40googlegroups.com
> <https://groups.google.com/d/msgid/transmart-discuss/80534834-22f9-4803-a8e6-7f2cddf1440e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

---
This email has been checked for viruses by AVG.
https://www.avg.com

ssm...@txbiomed.org

unread,
Sep 25, 2018, 10:09:27 AM9/25/18
to transmart-discuss
I am seeing the same problem.   I honestly don't have any experience with databases.   I did check to see if the postgres was running, and it was.   

Thanks, 

Sandy

Peter Rice

unread,
Sep 25, 2018, 10:26:18 AM9/25/18
to transmar...@googlegroups.com, ssm...@txbiomed.org
Hi Sandy,

One possibility is "No such file or directory" means there is a problem
with the tablespaces (we have to guess which file or directory it was
looking for)

Source the transmart-data/vars file then:

printenv TABLESPACES

ls -al $TABLESPACES

sudo -u postgres ls -al $TABLESPACES

The tablespace should include transmart and indx directories, be owned
by postgres, and be accessible by user postgres (sometimes there is a
higher level directory user postgres cannot read, that could cause the
problem you see).



On 25/09/2018 15:09, ssm...@txbiomed.org wrote:
> I am seeing the same problem.   I honestly don't have any experience
> with databases.   I did check to see if the postgres was running, and it
> was.
>
> Thanks,
>
> Sandy
>
>
> On Monday, September 24, 2018 at 2:14:08 AM UTC-5, Carolin Bruckmaier wrote:
>
> I am following the step by step installation guide for transmart
> 16.3. At the step "setting up a new database" (
> https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledat
> <https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledata>a
> --
> For more ways to get in contact with the tranSMART community visit
> https://wiki.transmartfoundation.org/display/transmartwiki/Getting+Support
> ---
> You received this message because you are subscribed to the Google
> Groups "transmart-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to transmart-disc...@googlegroups.com
> <mailto:transmart-disc...@googlegroups.com>.
> To post to this group, send email to transmar...@googlegroups.com
> <mailto:transmar...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/transmart-discuss/2b2e7cad-3f8d-466c-9998-fc30eead0347%40googlegroups.com
> <https://groups.google.com/d/msgid/transmart-discuss/2b2e7cad-3f8d-466c-9998-fc30eead0347%40googlegroups.com?utm_medium=email&utm_source=footer>.

ssm...@txbiomed.org

unread,
Sep 25, 2018, 10:30:25 AM9/25/18
to transmart-discuss
Hi Peter, 

Here is my output.  

transmart@ubuntu-test:~/transmart/transmart-data/ddl/postgres/GLOBAL$ cd ~/transmart/transmart-data

transmart@ubuntu-test:~/transmart/transmart-data$ . ./vars

transmart@ubuntu-test:~/transmart/transmart-data$ printenv TABLESPACES

/var/lib/postgresql/tablespaces/

transmart@ubuntu-test:~/transmart/transmart-data$ ls -al $TABLESPACES

total 28

drwxr-xr-x 7 postgres postgres 4096 Sep 25 07:25 .

drwxr-xr-x 4 postgres postgres 4096 Sep 25 07:25 ..

drwx------ 2 postgres postgres 4096 Sep 25 07:25 biomart

drwx------ 2 postgres postgres 4096 Sep 25 07:25 deapp

drwx------ 2 postgres postgres 4096 Sep 25 07:25 indx

drwx------ 2 postgres postgres 4096 Sep 25 07:25 search_app

drwx------ 2 postgres postgres 4096 Sep 25 07:25 transmart

transmart@ubuntu-test:~/transmart/transmart-data$ 

transmart@ubuntu-test:~/transmart/transmart-data$ 

transmart@ubuntu-test:~/transmart/transmart-data$ sudo -u postgres ls -al $TABLESPACES

[sudo] password for transmart: 

total 28

drwxr-xr-x 7 postgres postgres 4096 Sep 25 07:25 .

drwxr-xr-x 4 postgres postgres 4096 Sep 25 07:25 ..

drwx------ 2 postgres postgres 4096 Sep 25 07:25 biomart

drwx------ 2 postgres postgres 4096 Sep 25 07:25 deapp

drwx------ 2 postgres postgres 4096 Sep 25 07:25 indx

drwx------ 2 postgres postgres 4096 Sep 25 07:25 search_app

drwx------ 2 postgres postgres 4096 Sep 25 07:25 transmart

transmart@ubuntu-test:~/transmart/transmart-data$ 



On Monday, September 24, 2018 at 2:14:08 AM UTC-5, Carolin Bruckmaier wrote:

Peter Rice

unread,
Sep 25, 2018, 11:23:05 AM9/25/18
to transmar...@googlegroups.com, ssm...@txbiomed.org
Hi Sandy,

So let's check that postgres query as reported in the output.

Source the transmart-data/vars file then (all one line):

/usr/bin/psql -v ON_ERROR_STOP=1 --single-transaction -X -d template1
-c "select exists (select datname from pg_database)"

This should give a list of database names, including 'transmart' but
when run from the Makefile (make postgres) it was giving an error

regards,

Peter Rice
Axiomedix Inc.

On 25/09/2018 15:09, ssm...@txbiomed.org wrote:
> I am seeing the same problem.   I honestly don't have any experience
> with databases.   I did check to see if the postgres was running, and it
> was.
>
> Thanks,
>
> Sandy
>
>
> On Monday, September 24, 2018 at 2:14:08 AM UTC-5, Carolin Bruckmaier wrote:
>
> I am following the step by step installation guide for transmart
> 16.3. At the step "setting up a new database" (
> https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledat
> <https://wiki.transmartfoundation.org/display/transmartwiki/Install+the+current+official+release#Installthecurrentofficialrelease-Settingupanewdatabaseandsampledata>a

Sandra Smith

unread,
Sep 25, 2018, 11:27:11 AM9/25/18
to Peter Rice, transmar...@googlegroups.com
Peter,

Really appreciate all your help! Here is the output below. Should I create the posgres user in sql? Should I also create the databases?

Thanks,

sandy

transmart@ubuntu-test:~/transmart/transmart-data$ /usr/bin/psql -v ON_ERROR_STOP=1 --single-transaction -X -d template1 -c "select exists (select datname from pg_database)"
psql: FATAL: Peer authentication failed for user "postgres"


On 9/25/18, 10:23 AM, "Peter Rice" <peter...@axiomedix.com> wrote:

-c "select exists (select datname from pg_database)"

CONFIDENTIALITY NOTICE: This e-mail and any files and/or attachments transmitted, may contain privileged and confidential information and is intended solely for the exclusive use of the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this e-mail and/or attachments is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender stating that this transmission was misdirected; return the e-mail to sender; destroy all paper copies and delete all electronic copies from your system without disclosing its contents.

Peter Rice

unread,
Sep 25, 2018, 1:20:18 PM9/25/18
to Sandra Smith, transmar...@googlegroups.com
Hi Sandy,

Did you source the vars file?

printenv | grep PG

Something is amiss with the postgres settings. I can reproduce the
message by defining PGUSER=postgres but not defining the others.

Certainly something is suggesting postgres as the username. You may also
have settings in ~/.pgpass that it will try to use if the variables are
not defined.

Hope that helps

Peter Rice
Axiomedix Inc.
Reply all
Reply to author
Forward
0 new messages