[Spacewalk-list] spacewalk-hostname-rename failed

Robert Paschedag robert.paschedag at web.de
Thu Jul 19 05:53:47 UTC 2018


Am 19. Juli 2018 00:39:59 MESZ schrieb "Yakin, Francis" <Francis.Yakin at windriver.com>:
>>So I'd do some more checking to ensure you have the right credentials
>for postgres and you can login to it. E.g.
>
>># su - postgres
>>$ psql
>
>[root at ala-spacewalk-poc ~]# su - postgres
>Last login: Wed Jul 18 15:15:35 PDT 2018 on pts/1
>[postgres at ala-spacewalk-poc ~]$ psql -l
>                             List of databases
> Name    |  Owner   | Encoding  | Collate | Ctype |   Access privileges
>-----------+----------+-----------+---------+-------+-----------------------
> postgres  | postgres | SQL_ASCII | C       | C     |
> spacewalk | postgres | SQL_ASCII | C       | C     |
>template0 | postgres | SQL_ASCII | C       | C     | =c/postgres       
>  +
>       |          |           |         |       | postgres=CTc/postgres
>template1 | postgres | SQL_ASCII | C       | C     | =c/postgres       
>  +
>       |          |           |         |       | postgres=CTc/postgres
>(4 rows)
>
>
>The database name is "spacewalk", it seems it is exist and running
>
>[postgres at ala-spacewalk-poc ~]$ /sbin/service postgresql status
>Redirecting to /bin/systemctl status postgresql.service
>â postgresql.service - PostgreSQL database server
>Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled;
>vendor preset: disabled)
>Active: active (running) since Wed 2018-03-28 11:20:58 PDT; 3 months 20
>days ago
>Process: 2345 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p
>${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
>Process: 2339 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA}
>(code=exited, status=0/SUCCESS)
> Main PID: 2348 (postgres)
>   CGroup: /system.slice/postgresql.service
>           ââ 2348 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
>           ââ 2349 postgres: logger process
>           ââ 2351 postgres: checkpointer process
>           ââ 2352 postgres: writer process
>           ââ 2353 postgres: wal writer process
>           ââ 2354 postgres: autovacuum launcher process
>           ââ 2355 postgres: stats collector process
>        ââ10690 postgres: spacewalkuser spacewalk 127.0.0.1(36966) idle
>        ââ11704 postgres: spacewalkuser spacewalk 127.0.0.1(37080) idle
>           ââ11964 postgres: postgres postgres [local] idle
>           ââ12378 postgres: spacewalkuser spacewalk [local] idle
>           ââ12446 postgres: spacewalkuser spacewalk [local] idle
>           ââ12493 postgres: spacewalkuser spacewalk [local] idle
>           ââ12587 postgres: spacewalkuser spacewalk [local] idle
>           ââ12595 postgres: spacewalkuser spacewalk [local] idle
>        ââ13331 postgres: spacewalkuser spacewalk 127.0.0.1(37238) idle
>        ââ13701 postgres: spacewalkuser spacewalk 127.0.0.1(37280) idle
>        ââ13786 postgres: spacewalkuser spacewalk 127.0.0.1(37288) idle
>        ââ14082 postgres: spacewalkuser spacewalk 127.0.0.1(37312) idle
>        ââ14083 postgres: spacewalkuser spacewalk 127.0.0.1(37314) idle
>        ââ14084 postgres: spacewalkuser spacewalk 127.0.0.1(37316) idle
>        ââ14085 postgres: spacewalkuser spacewalk 127.0.0.1(37318) idle
>        ââ14086 postgres: spacewalkuser spacewalk 127.0.0.1(37320) idle
>           ââ15870 postgres: spacewalkuser spacewalk [local] idle
>        ââ16075 postgres: spacewalkuser spacewalk 127.0.0.1(33844) idle
>        ââ16076 postgres: spacewalkuser spacewalk 127.0.0.1(33846) idle
>        ââ16077 postgres: spacewalkuser spacewalk 127.0.0.1(33848) idle
>        ââ16078 postgres: spacewalkuser spacewalk 127.0.0.1(33850) idle
>        ââ16079 postgres: spacewalkuser spacewalk 127.0.0.1(33852) idle
>        ââ16080 postgres: spacewalkuser spacewalk 127.0.0.1(33854) idle
>        ââ16081 postgres: spacewalkuser spacewalk 127.0.0.1(33856) idle
>        ââ16082 postgres: spacewalkuser spacewalk 127.0.0.1(33858) idle
>        ââ16083 postgres: spacewalkuser spacewalk 127.0.0.1(33860) idle
>        ââ16084 postgres: spacewalkuser spacewalk 127.0.0.1(33862) idle
>        ââ16085 postgres: spacewalkuser spacewalk 127.0.0.1(33864) idle
>        ââ16086 postgres: spacewalkuser spacewalk 127.0.0.1(33866) idle
>        ââ16087 postgres: spacewalkuser spacewalk 127.0.0.1(33868) idle
>        ââ16088 postgres: spacewalkuser spacewalk 127.0.0.1(33870) idle
>        ââ16089 postgres: spacewalkuser spacewalk 127.0.0.1(33872) idle
>        ââ16090 postgres: spacewalkuser spacewalk 127.0.0.1(33874) idle
>        ââ16189 postgres: spacewalkuser spacewalk 127.0.0.1(33888) idle
>           ââ31927 postgres: spacewalkuser spacewalk [local] idle
>
>I also checked the postgres DB connection settings in postgresql.conf (
>under /var/lib/pgsql/data folder)
>
>max_connections = 400                   # (change requires restart)
>
>using port 5432
>
>Thanks
>
>Francis

Can't you just try to debug the tool? I'm pretty sure, it's just a bash, Perl or python script.

You could search for "Testing DB" and look at the commands and try to run them manually.

Should not be that hard to find out, what's going on.

Robert


>
>-----Original Message-----
>From: spacewalk-list-bounces at redhat.com
>[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Wilkinson,
>Matthew
>Sent: Wednesday, July 18, 2018 9:23 AM
>To: spacewalk-list at redhat.com; Robert Paschedag
>Subject: Re: [Spacewalk-list] spacewalk-hostname-rename failed
>
>if you manually installed postgres, then it will not be part of the
>spacewalk-service script. 
>
>So I'd do some more checking to ensure you have the right credentials
>for postgres and you can login to it. E.g.
>
># su - postgres
>$ psql
>
>to make sure you can connect. You also might have to check your
>postgres DB connection settings to ensure it's configured properly. 
>
>--Matthew Wilkinson
>
>
>-----Original Message-----
>From: spacewalk-list-bounces at redhat.com
>[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Yakin, Francis
>Sent: Wednesday, July 18, 2018 10:56
>To: Robert Paschedag; spacewalk-list at redhat.com;
>spacewalk-list at redhat.com
>Subject: Re: [Spacewalk-list] spacewalk-hostname-rename failed
>
>[This is an external email. Be cautious with links, attachments and
>responses.]
>
>**********************************************************************
>Robert and Mathew,
>
>>>Postgres IS bundled with spacewalk-service... At least in every
>installation I know of if it uses the "internal" postgres DB.
>
>But, why when I restart the spacewalk-service restart, it doesn’t show
>"postgresql" stop and start it, it seems the script doesn't do
>postgres.
>
>[root at ala-spacewalk-poc ~]# spacewalk-service restart
>Shutting down spacewalk services...
>Redirecting to /bin/systemctl stop taskomatic.service
>Stopping cobblerd (via systemctl):                         [  OK  ]
>Redirecting to /bin/systemctl stop rhn-search.service
>Redirecting to /bin/systemctl stop osa-dispatcher.service
>Redirecting to /bin/systemctl stop httpd.service
>Redirecting to /bin/systemctl stop tomcat.service
>Redirecting to /bin/systemctl stop jabberd.service
>Done.
>Starting spacewalk services...
>Redirecting to /bin/systemctl start jabberd.service
>Redirecting to /bin/systemctl start tomcat.service
>Waiting for tomcat to be ready ...
>Redirecting to /bin/systemctl start httpd.service
>Redirecting to /bin/systemctl start osa-dispatcher.service
>Redirecting to /bin/systemctl start rhn-search.service
>Starting cobblerd (via systemctl):                         [  OK  ]
>Redirecting to /bin/systemctl start taskomatic.service
>Done.
>
>
>And Postgres never stop and still running when I ran
>"spacewalk-hostname-rename"
>But, the error still mention database connection is not available
>
>[root at ala-spacewalk-prod ~]# spacewalk-hostname-rename
>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>Validating IP ... OK
>=============================================
>hostname:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__ala-2Dspacewalk-2Dprod.wrs.com&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=5wIAgET0zO4gOE_1EQEpihqSj2DmZNqeRJ9er5gi524&e=
>ip:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>=============================================
>Stopping spacewalk services ... OK
>Testing DB connection ... FAILED
>Your database isn't running.
>Fix the problem and run /bin/spacewalk-hostname-rename again
>
>
>Is there any bugs with spacewalk-hostname-rename script??
>
>Does anyone have any recommendation to make it to work?
>
>Thanks
>
>Francis
>-----Original Message-----
>From: Robert Paschedag [mailto:robert.paschedag at web.de] 
>Sent: Tuesday, July 17, 2018 8:55 PM
>To: spacewalk-list at redhat.com; Yakin, Francis;
>spacewalk-list at redhat.com
>Subject: Re: [Spacewalk-list] spacewalk-hostname-rename failed
>
>Am 18. Juli 2018 03:32:02 MESZ schrieb "Yakin, Francis"
><Francis.Yakin at windriver.com>:
>>Another thing, postgres is not bundled with spacewalk-service. So,
>it's
>>not restart when I run "spacewalk-service restart"
>>Should I stop the postgres manually before I run
>>"spacewalk-hostname-rename"? And then restart it before "Starting
>>spacewalk services...?
>
>Postgres IS bundled with spacewalk-service... At least in every
>installation I know of if it uses the "internal" postgres DB.
>
>And no... You have to explicitly start postgres, before you call
>spacewalk-hostname-rename so it can connect to the database.
>
>Like Matthew said.
>
>Robert
>
>>
>>Francis
>>
>>From: Yakin, Francis
>>Sent: Tuesday, July 17, 2018 2:14 PM
>>To: spacewalk-list at redhat.com
>>Subject: RE: spacewalk-hostname-rename failed
>>
>>Postgres
>>
>>
>>I did that, I use spacewalk-service  restart before I ran
>>"spacewalk-hostname-rename" script
>>
>>[root at ala-spacewalk-prod ~]# spacewalk-service restart
>>Shutting down spacewalk services...
>>Redirecting to /bin/systemctl stop taskomatic.service
>>Stopping cobblerd (via systemctl):                         [  OK  ]
>>Redirecting to /bin/systemctl stop rhn-search.service
>>Redirecting to /bin/systemctl stop osa-dispatcher.service
>>Redirecting to /bin/systemctl stop httpd.service
>>Redirecting to /bin/systemctl stop tomcat.service
>>Redirecting to /bin/systemctl stop jabberd.service
>>Done.
>>Starting spacewalk services...
>>Redirecting to /bin/systemctl start jabberd.service
>>Redirecting to /bin/systemctl start tomcat.service
>>Waiting for tomcat to be ready ...
>>Redirecting to /bin/systemctl start httpd.service
>>Redirecting to /bin/systemctl start osa-dispatcher.service
>>Redirecting to /bin/systemctl start rhn-search.service
>>Starting cobblerd (via systemctl):                         [  OK  ]
>>Redirecting to /bin/systemctl start taskomatic.service
>>Done.
>>
>>[root at ala-spacewalk-prod ~]# spacewalk-hostname-rename
>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>>Validating IP ... OK
>>=============================================
>>hostname:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__ala-2Dspacewalk-2Dprod.wrs.com&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=5wIAgET0zO4gOE_1EQEpihqSj2DmZNqeRJ9er5gi524&e=
>>ip:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>>=============================================
>>Stopping spacewalk services ... OK
>>Testing DB connection ... FAILED
>>Your database isn't running.
>>Fix the problem and run /bin/spacewalk-hostname-rename again
>>
>>
>>Francis
>>
>>
>>From: spacewalk-list-bounces at redhat.com
>>[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Wilkinson,
>>Matthew
>>Sent: Tuesday, July 17, 2018 1:55 PM
>>To: spacewalk-list at redhat.com
>>Subject: Re: [Spacewalk-list] spacewalk-hostname-rename failed
>>
>>which DB are you using postgres or oracle? If you used the
>>spacewalk-service command to stop with the bundled DB, it will stop
>>postgres and you'll have to start it up before you run the command.
>>
>>--Matthew Wilkinson
>>
>>From: spacewalk-list-bounces at redhat.com
>>[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Yakin, Francis
>>Sent: Tuesday, July 17, 2018 15:39
>>To: spacewalk-list at redhat.com
>>Subject: [Spacewalk-list] spacewalk-hostname-rename failed
>>
>>[This is an external email. Be cautious with links, attachments and
>>responses.]
>>________________________________
>>
>>Hi All,
>>
>>I encountered this issue when I try to run "spacewalk-hostname-rename"
>>script
>>
>>
>>[root at ala-spacewalk-prod init.d]# /bin/spacewalk-hostname-rename
>>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>>Validating IP ... OK
>>=============================================
>>hostname:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__ala-2Dspacewalk-2Dprod.wrs.com&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=5wIAgET0zO4gOE_1EQEpihqSj2DmZNqeRJ9er5gi524&e=
>>ip:
>https://urldefense.proofpoint.com/v2/url?u=http-3A__147.11.147.159&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=kqt35gvvp7wKOsQ-qgLb6OyqyeTgOBxCTk6UkDPwpqg&s=OgGbJE6WIs4G4g1084iAAjzSYC8qcq29G9Ug1LMJwsw&e=
>>=============================================
>>Stopping spacewalk services ... OK
>>Testing DB connection ... FAILED
>>Your database isn't running.
>>Fix the problem and run /bin/spacewalk-hostname-rename again
>>
>>Francis Yakin | IT System Admin |  direct: 510-749-2027
>>500 Wind River Way, Alameda, CA  94501
>>[cid:image001.png at 01D12D0C.E17713F0]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.windriver.com_&d=DwMFAg&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yyn0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-Tq1kdA&m=5gxv-oyYguavxooD6KV1W941gpXl9o3gebqrkNukZrw&s=vJ6SRJMhwHwyi1fM62NUzpQqpcyeyLzJbAF0xYoCFsk&e=>
>>AN INTEL COMPANY


-- 
sent from my mobile device




More information about the Spacewalk-list mailing list