Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: Upgrade to 2.42 fails (Nikolaos Milas)
   2. Re: Upgrade to 2.42 fails (Nikolaos Milas)
   3. Re: Upgrade to 2.42 fails (Christian Ramseyer)
   4. Re: Upgrade to 2.42 fails (Stuart Kendrick)
--- Begin Message ---
On 2/9/2019 2:44 μ.μ., Christian Ramseyer wrote:

You said you migrated the netdisco DB. Depending on how you did it, this
did not migrate the user from the old db

Hi Christian,

Thank you. I had already created the user netdisco but it seems I cannot manage to log in successfully. I have tried multiple times. For example:

   -bash-4.1$ psql -U postgres
   psql (11.5)
   Type "help" for help.

   postgres=# ALTER USER netdisco WITH PASSWORD 'my_usual_password';
   ALTER ROLE
   postgres=# \q

   -bash-4.1$ psql -U netdisco -W
   Password:
   psql: FATAL:  Peer authentication failed for user "netdisco"
   -bash-4.1$ psql -U netdisco -h localhost -W
   Password:
   psql: FATAL:  Ident authentication failed for user "netdisco

I am wondering if the problem is due to the postgress pg_hba configuration.

The new server has:

   # TYPE  DATABASE        USER ADDRESS                 METHOD
   local   all all                                     peer
   host    all             all 127.0.0.1/32            ident
   host    all             all ::1/128                 ident
   local   replication all                                     peer
   host    replication     all 127.0.0.1/32            ident
   host    replication     all ::1/128                 ident

whereas the initial server had:

   # TYPE  DATABASE    USER        CIDR-ADDRESS METHOD
   local   all         all                               trust
   host    all         all         127.0.0.1/32          trust
   host    all         all         ::1/128               trust

Should I change the new server to use an identical pg_hba configuration as the initial server? (Sorry I know so little about PostgreSQL, but my little life has no time for everything I am afraid...)

Please advise!

Thanks,
Nick





--- End Message ---
--- Begin Message ---
On 2/9/2019 3:19 μ.μ., Nikolaos Milas wrote:

Should I change the new server to use an identical pg_hba configuration as the initial server?

In fact I tried it, as an experiment, and everything worked fine!Netdisco upgrade completed successfully subsequently.

So, that was it! I guess I have to find out the differences between peer / ident / trust login...

In any case, any additional thoughts / suggestions regarding PostgreSQL setup will be welcome!

Big thanks to everybody!
Nick






--- End Message ---
--- Begin Message ---

On 02.09.19 15:51, Nikolaos Milas wrote:
>> Should I change the new server to use an identical pg_hba
>> configuration as the initial server?
> 
> In fact I tried it, as an experiment, and everything worked
> fine!Netdisco upgrade completed successfully subsequently.
> 
> So, that was it! I guess I have to find out the differences between peer
> / ident / trust login...
> 

Ok glad it worked. "trust" does the job, but it means that the password
is not checked at all. It might not be critical in your case since you
only allow local connections, but it means that everybody that can log
into the server can also access your data. Security reviewers might not
like it.

Personally I only ever use the md5 method, which checks a hashed version
of the password. It's save over the network (with preferably hostssl)
and for local connections. It's also the recommended netdisco setup:

https://github.com/netdisco/netdisco/wiki/Install-Tips#enable-md5-authentication-to-postgresql

# TYPE  DATABASE  USER  ADDRESS       METHOD
host    all       all   127.0.0.1/32  md5

If you wanna read up on the numerous other option you might probably
never need: <https://www.postgresql.org/docs/11/auth-pg-hba-conf.html> :)

Cheers
Christian




--- End Message ---
--- Begin Message ---
Hi Nikolaos,

I am focusing on the following:
    DBI connect('dbname=netdisco;host=localhost','netdisco',...) failed


This error message suggests the following avenues to me: 

(1) Does pg_hba.conf contain the 'netdisco' line as seen here?

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    netdisco        netdisco        127.0.0.1/32              md5
host    all                   all                   127.0.0.1/32            
ident


(2) Is postgresql running?
ps -ef | grep postgres


(3) Is it listening on localhost:5432?
/usr/bin/nmap -p 5432 localhost


(4) Are you confident that you created the database and defined the netdisco 
user?  [e.g. this section from the install guide]

root:~# su - postgres

postgres:~$ createuser -DRSP netdisco
Enter password for new role:
Enter it again:
  
postgres:~$ createdb -O netdisco netdisco


hth,

--sk

-----Original Message-----
From: Nikolaos Milas <[email protected]> 
Sent: Monday, September 2, 2019 3:33 AM
To: [email protected]
Subject: Re: [Netdisco] Upgrade to 2.42 fails

CAUTION: This email originated from outside the Allen Institute. Please do not 
click links or open attachments unless you've validated the sender and know the 
content is safe.
________________________________

Thank you all for your feedback!

I have struggled with db upgrade, but I managed to install postgresql 11 (I 
thought I would give it a try) and migrated the netdisco db to the new version.

However, after all that, I am still having a problem with netdisco-deploy:

    [netdisco@netgaze ~]$ ~/bin/localenv cpanm --notest App::Netdisco
    App::Netdisco is up to date. (2.042010)

    [netdisco@netgaze ~]$ ln -sf ~/perl5/bin/{localenv,netdisco-*} ~/bin/

    [netdisco@netgaze ~]$ ~/bin/netdisco-deploy
    This is the Netdisco II deployment script.

    Before we continue, the following prerequisites must be in place:
      * Database added to PostgreSQL for Netdisco
      * User added to PostgreSQL with rights to the Netdisco Database
      * "~/environments/deployment.yml" file configured with Database
    dsn/user/pass
      * A full backup of any existing Netdisco database data
      * Internet access (for OUIs and MIBs)

    You will be asked to confirm all changes to your system.

    So, is all of the above in place? [y/N]: y

    Would you like to deploy the database schema? [y/N]: y
    DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently
    unversioned. Please call upgrade on your schema to sync the DB. at
    /home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62
    DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:
    DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:
    DBI connect('dbname=netdisco;host=localhost','netdisco',...) failed:
    FATAL:  Ident authentication failed for user "netdisco" at
    /home/netdisco/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1517.
    at /home/netdisco/perl5/bin/netdisco-db-deploy line 110 at
    /home/netdisco/perl5/bin/netdisco-db-deploy line 110
    DB schema update complete.
    DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently
    unversioned. Please call upgrade on your schema to sync the DB. at
    /home/netdisco/perl5/lib/perl5/Dancer/Plugin/DBIC.pm line 62
    DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed:
    DBI connect('dbname=netdisco;host=localhost','netdisco',...) failed:
    FATAL:  Ident authentication failed for user "netdisco" at
    /home/netdisco/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1517.
    at /home/netdisco/perl5/lib/perl5/App/Netdisco/Util/Statistics.pm
    line 77

Can you please help me to resolve this problem? What does the message:
"Your DB is currently unversioned" mean?

Thanks,
Nick

On 26/8/2019 2:19 μ.μ., Nick Nauwelaerts wrote:

> newer versions (and 4.042010 too, but not documented) will require at least 
> pg9.4....


_______________________________________________
Netdisco mailing list
[email protected]
https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fnetdisco%2Fmailman%2Fnetdisco-users%2F&amp;data=02%7C01%7C%7Cfb197a332d0c4b8a3a1c08d72f911d4c%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C0%7C637030172630974082&amp;sdata=4pEDS8iMt068SuYn0pgXfEs%2FCAKMFL%2FIEW6gakZ22Tk%3D&amp;reserved=0

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to