madlib-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Domino Valdano <>
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               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
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).



From: Domino Valdano <>
Sent: Thursday, April 8, 2021 12:34 PM
To: <>
Subject: Re: error when running /usr/local/madlib/bin/madpack


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               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               peer



From: Nantia Makrynioti <>
Sent: Thursday, February 18, 2021 1:22 AM
To: <>
Subject: error when running /usr/local/madlib/bin/madpack


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]

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/", line 1417, in <module>


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

    _internal_run_query("SELECT 1", False)

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

    return run_query(sql, con_args, show_error)

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

    raise 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,


View raw message