[Spacewalk-list] Spacewalk activation error

Alexander Yegorov alex.yegorov at gmail.com
Sun Jul 31 13:48:33 UTC 2011


On 07/31/2011 04:31 PM, Alexander Yegorov wrote:
> On 07/31/2011 04:03 PM, Alexander Yegorov wrote:
>> Hi,
>>
>> I am trying to run the spacewalk-setup script, however it exits with the
>> error:
>> spacewalk-setup --disconnected --answer-file=/tmp/ansfile
>> * Loading answer file: /tmp/ansfile.
>> ** Database: Setting up database connection for PostgreSQL backend.
>> ** Database: Populating database.
>> The Database has schema.  Would you like to clear the database [Y]? N
>> ** Database: The database already has schema.  Skipping database population.
>> * Setting up users and groups.
>> ** GPG: Initializing GPG and importing key.
>> * Performing initial configuration.
>> * Activating Spacewalk.
>> ** Loading Spacewalk Certificate.
>> ** Verifying certificate locally.
>> ** Activating Spacewalk.
>> There was a problem validating the satellite certificate: 1
>>
>> I traced the issue to launching /usr/bin/rhn-satellite-activate script,
>> since /var/log/rhn/rhn-installation.log reveals:
>> Traceback (most recent call last):
>>   File "/usr/bin/rhn-satellite-activate", line 42, in <module>
>>     sys.exit(abs(mod.main() or 0))
>>   File
>> "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py",
>> line 584, in main
>>     username=db_user, password=db_password, database=database)
>>   File
>> "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py",
>> line 124, in initDB
>>     __init__DB(backend, host, port, username, password, database)
>>   File
>> "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py",
>> line 55, in __init__DB
>>     __DB.connect()
>>   File
>> "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py",
>> line 163, in connect
>>     return self.connect(reconnect=0)
>>   File
>> "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py",
>> line 167, in connect
>>     [self.database, e.pgcode, e.pgerror, "Attempting Re-Connect to the
>> database failed",])
>> spacewalk.server.rhnSQL.sql_base.SQLConnectError: (None, None,
>> 'spaceschema', 'Attempting Re-Connect to the database failed')
>>
>> My first guess was the inability of this software to connect to
>> postgresql, which runs on localhost, however upon retesting the
>> connection several times, I skipped this guess.
>>
>> Could you please help me pointing the reason out?
>>
>> OS: SL 6.1
>> Spacewalk: 1.5.45
> Printed the connection variables from
> /usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py,
> by adding ">>" marked lines into def connect func:
>     def connect(self, reconnect=1):
>         try:
>             if self.host is None:
>>>                print ("Variables %s %s %s" %
> (self.database,self.username,self.password) )
>                 self.dbh = psycopg2.connect(database=self.database,
> user=self.username,
>                                             password=self.password)
>             else:
>>>                print ("Variables %s %s %s %s %s" %
> (self.database,self.username,self.password,self.host,self.port) )
>                 self.dbh = psycopg2.connect(database=self.database,
> user=self.username,
>                                             password=self.password,
> host=self.host, port=self.port)
>
> It appeared the driver_postgresql.py did not like my password, which had
> special symbol, particularly '#' (password variable was printed with the
> contents before #, not after)
Filed the bug: https://bugzilla.redhat.com/show_bug.cgi?id=726961




More information about the Spacewalk-list mailing list