madlib-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Domino Valdano <dvald...@vmware.com>
Subject Re: error when running /usr/local/madlib/bin/madpack
Date Thu, 08 Apr 2021 20:06:37 GMT
A correction to my last suggestion... try this instead:

host    all             all             127.0.0.1/32            pam

or better yet:

host    all             all             samehost                 pam

Apparently, using "peer" gives an error that it's only allowed over local Unix domain sockets.
 It looks like using pam works, but it will prompt for your UNIX password if you have one
set.
If you completely trust all local users on the system, you can just set it to "trust" and
then all authentication will be disabled for same host connections... ie, any local user can
log in as any user, including as a db admin.  (This could make sense for a test system or
a docker image, for example--don't use on a production multi-user system).

Cheers,

Domino

________________________________
From: Domino Valdano <dvaldano@vmware.com>
Sent: Thursday, April 8, 2021 12:34 PM
To: user@madlib.apache.org <user@madlib.apache.org>
Subject: Re: error when running /usr/local/madlib/bin/madpack

Nantia,

I saw a similar issue recently, with Postgres 12 on Ubuntu 20.04.  Not 100% sure this is the
same issue you're seeing.  But in my case, it was because the default
installation of Postgres on Ubuntu does not allow passwordless connections over TCP/IP.

I think this is probably something we should fix in MADlib, but it always passes a hostname
as part of the connection string when it connects to the database.
So even if you can connect locally with psql, it will fail with MADlib since MADlib will pass
-h localhost (or whatever the hostname is).

I was able to fix the problem by setting a password for user postgres.
But if you really don't want a password, it should also work if you edit pg_hba.conf to relax
the security a bit.  By default it's set up like this:

local   all             postgres                                   peer
host    all             all             127.0.0.1/32            md5

Which, as I understand, tells it to allow passworldless connections over local unix filesystem
sockets, for user postgres, but always require a password if it's using a TCP/IP connection.
I think changing the second line to this should work, as long as your username matches the
name of the database user:

host    all             all           127.0.0.1/32              peer

Cheers,

Domino

________________________________
From: Nantia Makrynioti <nantiamakr@gmail.com>
Sent: Thursday, February 18, 2021 1:22 AM
To: user@madlib.apache.org <user@madlib.apache.org>
Subject: error when running /usr/local/madlib/bin/madpack

Hello,

I'm trying to install MADlib on Ubuntu 16.04 with Postgres 11.5.
When running

/usr/local/madlib/bin/madpack -s madlib –p postgres install

with the environmental variables first exported, or

/usr/local/madlib/bin/madpack -s madlib -p postgres -c [user[/password]@][host][:port][/database]
install

with replacing the parameters for user, password, etc. with my values,

I'm getting the following error:


Traceback (most recent call last):

  File "/usr/local/madlib/Versions/1.16/bin/../madpack/madpack.py", line 1417, in <module>

    main(sys.argv[1:])

  File "/usr/local/madlib/Versions/1.16/bin/../madpack/madpack.py", line 1272, in main

    _internal_run_query("SELECT 1", False)

  File "/usr/local/madlib/Versions/1.16/bin/../madpack/madpack.py", line 99, in _internal_run_query

    return run_query(sql, con_args, show_error)

  File "/usr/local/madlib/Versions/1.16/madpack/utilities.py", line 119, in run_query

    raise Exception

Exception


I'm able to connect to psql with the particular user, password and database and I've also
checked that the port number I'm using is correct.


Could you give some hints on what is wrong?


Thank you in advance,

Nantia

Mime
View raw message