FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 11-05-2010, 03:52 PM
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

Hey there.

I'm trying to build my own koji build server and following along with the
instructions here: http://fedoraproject.org/wiki/Koji/ServerHowTo

I got past the postgres authentication stuff and the SSL cert stuff, and
now I'm trying to get basic functionality working with koji-hub and
running into a bit of a sticky issue that I can't resolve on my own.

The 'list-hosts' command seems to work ok:

[kojiadmin@bpkojipoc001 ~]$ koji list-hosts
Hostname Enb Rdy Load/Cap Arches Last Update

But the "add-user" command gives me a:

File "/usr/share/koji-hub/kojixmlrpc.py", line 191, in _marshaled_dispatch
response = self._dispatch(method, params)
File "/usr/share/koji-hub/kojixmlrpc.py", line 253, in _dispatch
ret = func(*params,**opts)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 649, in sslLogin
return context.session.sslLogin(*args, **opts)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 394, in sslLogin
sinfo = self.createSession(user_id, hostip, koji.AUTHTYPE_SSL)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 480, in createSession
c.execute(q, {})
File "/usr/lib/python2.6/site-packages/koji/db.py", line 95, in execute
ret = self.cursor.execute(operation, parameters)
File "/usr/lib64/python2.6/site-packages/pgdb.py", line 174, in execute
self.executemany(operation, (params,))
File "/usr/lib64/python2.6/site-packages/pgdb.py", line 195, in executemany
raise DatabaseError, "error '%s' in '%s'" % ( msg, sql )
DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
LINE 1: SELECT nextval('sessions_id_seq')
^
' in 'SELECT nextval('sessions_id_seq')'

I checked out the DB schema and didn't see a 'sessions_id_seq' anywhere,
and the only place that I could find it was in auth.py in the koji python
utilities scripts (which is where it's failing, I believe).

Can someone explain to me how this is being used and/or how to fix this
issue?

Thanks in advance.

- Steve Webb

--
Steve Webb | System Administrator
Beatport | Music for DJ's
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-05-2010, 04:06 PM
Mike Bonnet
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
> Hey there.
>
> I'm trying to build my own koji build server and following along with the
> instructions here: http://fedoraproject.org/wiki/Koji/ServerHowTo
>
> I got past the postgres authentication stuff and the SSL cert stuff, and
> now I'm trying to get basic functionality working with koji-hub and
> running into a bit of a sticky issue that I can't resolve on my own.
>
> The 'list-hosts' command seems to work ok:
>
> [kojiadmin@bpkojipoc001 ~]$ koji list-hosts
> Hostname Enb Rdy Load/Cap Arches Last Update
>
> But the "add-user" command gives me a:
>
> File "/usr/share/koji-hub/kojixmlrpc.py", line 191, in _marshaled_dispatch
> response = self._dispatch(method, params)
> File "/usr/share/koji-hub/kojixmlrpc.py", line 253, in _dispatch
> ret = func(*params,**opts)
> File "/usr/lib/python2.6/site-packages/koji/auth.py", line 649, in sslLogin
> return context.session.sslLogin(*args, **opts)
> File "/usr/lib/python2.6/site-packages/koji/auth.py", line 394, in sslLogin
> sinfo = self.createSession(user_id, hostip, koji.AUTHTYPE_SSL)
> File "/usr/lib/python2.6/site-packages/koji/auth.py", line 480, in createSession
> c.execute(q, {})
> File "/usr/lib/python2.6/site-packages/koji/db.py", line 95, in execute
> ret = self.cursor.execute(operation, parameters)
> File "/usr/lib64/python2.6/site-packages/pgdb.py", line 174, in execute
> self.executemany(operation, (params,))
> File "/usr/lib64/python2.6/site-packages/pgdb.py", line 195, in executemany
> raise DatabaseError, "error '%s' in '%s'" % ( msg, sql )
> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
> LINE 1: SELECT nextval('sessions_id_seq')
> ^
> ' in 'SELECT nextval('sessions_id_seq')'
>
> I checked out the DB schema and didn't see a 'sessions_id_seq' anywhere,
> and the only place that I could find it was in auth.py in the koji python
> utilities scripts (which is where it's failing, I believe).
>
> Can someone explain to me how this is being used and/or how to fix this
> issue?

What version of Postgres are you using? That sequence should be getting
created implicitly by virtue of the sessions.id column having the SERIAL
datatype.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-05-2010, 04:06 PM
Mike McLean
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
> LINE 1: SELECT nextval('sessions_id_seq')
> ^
> ' in 'SELECT nextval('sessions_id_seq')'
>
> I checked out the DB schema and didn't see a 'sessions_id_seq' anywhere,
> and the only place that I could find it was in auth.py in the koji python
> utilities scripts (which is where it's failing, I believe).

Such sequences are automatically created when the serial type is used in
a column definition. Koji's schema uses the serial type for most primary
key fields.

The possibilities I can think of are:
1. your postgres has chosen the sequence name differently for some reason
2. something went horribly wrong when you initialized the db
3. the schema was altered

You can check for (1) at least by looking at the sequences in your db.
The ds command in psql will do this.

> Can someone explain to me how this is being used and/or how to fix this
> issue?
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-05-2010, 04:44 PM
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

On Fri, 5 Nov 2010, Mike Bonnet wrote:
> On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
>> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
> What version of Postgres are you using? That sequence should be getting
> created implicitly by virtue of the sessions.id column having the SERIAL
> datatype.

[kojiadmin@bpkojipoc001 ~]$ rpm -qa | grep post
postgresql-libs-8.4.5-1.fc13.x86_64
postgresql-8.4.5-1.fc13.x86_64
postgresql-server-8.4.5-1.fc13.x86_64
kacst-poster-fonts-2.0-7.fc13.noarch

- Steve

--
Steve Webb | System Administrator
Beatport | Music for DJ's
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-05-2010, 04:45 PM
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

On Fri, 5 Nov 2010, Mike McLean wrote:
> On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
>> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
> The ds command in psql will do this.

koji=> ds
List of relations
Schema | Name | Type | Owner
--------+----------------------+----------+-------
public | archiveinfo_id_seq | sequence | koji
public | archivetypes_id_seq | sequence | koji
public | build_id_seq | sequence | koji
public | buildroot_id_seq | sequence | koji
public | channels_id_seq | sequence | koji
public | events_id_seq | sequence | koji
public | external_repo_id_seq | sequence | koji
public | host_id_seq | sequence | koji
public | package_id_seq | sequence | koji
public | repo_id_seq | sequence | koji
public | rpminfo_id_seq | sequence | koji
public | tag_id_seq | sequence | koji
public | task_id_seq | sequence | koji
public | users_id_seq | sequence | koji
(14 rows)

- Steve

--
Steve Webb | System Administrator
Beatport | Music for DJ's
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-05-2010, 06:32 PM
Mike McLean
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

On 11/05/2010 01:45 PM, steve.webb@beatport.com wrote:
> On Fri, 5 Nov 2010, Mike McLean wrote:
>> On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
>>> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
>> The ds command in psql will do this.
>
> koji=> ds
> List of relations
> Schema | Name | Type | Owner
> --------+----------------------+----------+-------
> public | archiveinfo_id_seq | sequence | koji
> public | archivetypes_id_seq | sequence | koji
> public | build_id_seq | sequence | koji
> public | buildroot_id_seq | sequence | koji
> public | channels_id_seq | sequence | koji
> public | events_id_seq | sequence | koji
> public | external_repo_id_seq | sequence | koji
> public | host_id_seq | sequence | koji
> public | package_id_seq | sequence | koji
> public | repo_id_seq | sequence | koji
> public | rpminfo_id_seq | sequence | koji
> public | tag_id_seq | sequence | koji
> public | task_id_seq | sequence | koji
> public | users_id_seq | sequence | koji
> (14 rows)

Yep, something must have gone wrong during db initialization. I suggest
you drop the db and re-initialize it (and keep the output for reference).

Also missing: build_notifications_id_seq, buildroot_id_seq,
groups_id_seq, imageinfo_id_seq, log_messages_id_seq,
permissions_id_seq, rpmdeps_pkey_seq.

Based on the missing sequences, it looks like an error occurred
somewhere between the creation of the external_repo table and the
buildroot table. This is odd because schema.sql wraps all those
definitions in a transaction to prevent /exactly/ this sort of partial
initialization. Did you manually cut and paste the sql commands into
psql or something? Generally you want to run schema.sql through psql
directly from the command line (I believe the ServerHowTo doc covers this).

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 11-08-2010, 03:25 PM
 
Default koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist

Re-creating the DB seems to have worked better than the first time. Now
I've got the following relations:

koji=> ds
List of relations
Schema | Name | Type | Owner
--------+----------------------------+----------+-------
public | archiveinfo_id_seq | sequence | koji
public | archivetypes_id_seq | sequence | koji
public | build_id_seq | sequence | koji
public | build_notifications_id_seq | sequence | koji
public | build_target_id_seq | sequence | koji
public | buildroot_id_seq | sequence | koji
public | channels_id_seq | sequence | koji
public | events_id_seq | sequence | koji
public | external_repo_id_seq | sequence | koji
public | groups_id_seq | sequence | koji
public | host_id_seq | sequence | koji
public | imageinfo_id_seq | sequence | koji
public | log_messages_id_seq | sequence | koji
public | package_id_seq | sequence | koji
public | permissions_id_seq | sequence | koji
public | repo_id_seq | sequence | koji
public | rpminfo_id_seq | sequence | koji
public | sessions_id_seq | sequence | koji
public | tag_id_seq | sequence | koji
public | task_id_seq | sequence | koji
public | users_id_seq | sequence | koji
(21 rows)

Thanks for all of the help guys! I'll move forward with this and see what
happens.

- Steve

On Fri, 5 Nov 2010, Mike McLean wrote:

> On 11/05/2010 01:45 PM, steve.webb@beatport.com wrote:
>> On Fri, 5 Nov 2010, Mike McLean wrote:
>>> On 11/05/2010 12:52 PM, steve.webb@beatport.com wrote:
>>>> DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
>>> The ds command in psql will do this.
>>
>> koji=> ds
>> List of relations
>> Schema | Name | Type | Owner
>> --------+----------------------+----------+-------
>> public | archiveinfo_id_seq | sequence | koji
>> public | archivetypes_id_seq | sequence | koji
>> public | build_id_seq | sequence | koji
>> public | buildroot_id_seq | sequence | koji
>> public | channels_id_seq | sequence | koji
>> public | events_id_seq | sequence | koji
>> public | external_repo_id_seq | sequence | koji
>> public | host_id_seq | sequence | koji
>> public | package_id_seq | sequence | koji
>> public | repo_id_seq | sequence | koji
>> public | rpminfo_id_seq | sequence | koji
>> public | tag_id_seq | sequence | koji
>> public | task_id_seq | sequence | koji
>> public | users_id_seq | sequence | koji
>> (14 rows)
>
> Yep, something must have gone wrong during db initialization. I suggest
> you drop the db and re-initialize it (and keep the output for reference).
>
> Also missing: build_notifications_id_seq, buildroot_id_seq,
> groups_id_seq, imageinfo_id_seq, log_messages_id_seq,
> permissions_id_seq, rpmdeps_pkey_seq.
>
> Based on the missing sequences, it looks like an error occurred
> somewhere between the creation of the external_repo table and the
> buildroot table. This is odd because schema.sql wraps all those
> definitions in a transaction to prevent /exactly/ this sort of partial
> initialization. Did you manually cut and paste the sql commands into
> psql or something? Generally you want to run schema.sql through psql
> directly from the command line (I believe the ServerHowTo doc covers this).
>
> --
> buildsys mailing list
> buildsys@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/buildsys
>

--
Steve Webb | System Administrator
Beatport | Music for DJ's
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 10:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org