Re: [FOSSology] Db tables

2010-08-17 Thread Laser, Mary
Hi Matt,
It looks like your database was created with the wrong encoding.  By default, 
the postgres package is installed with UTF8 encoding.  However, the fossology 
database cluster must be created with SQL_ASCII encoding.  If you do not 
specify SQL_ASCII, the fossology db cluster will default to the postgres db 
encoding.  This seems the most plausible explanation for your error below.

You can check by invoking psql on the command line as user poastgres:

postg...@mysys:~$ psql
Welcome to psql 8.3.11, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help with psql commands
   \g or terminate with semicolon to execute query
   \q to quit

postgres=# \encoding
SQL_ASCII
postgres=# \c fossology
You are now connected to database fossology.
fossology=# \encoding
SQL_ASCII
fossology=#

If your installation does not match the example above, I suggest you drop the 
fossology database (drop database fossology) and recreate it by re-running 
fo-postinstall.

Mary

 -Original Message-
 From: McIntosh, Matt [mailto:matt_mcint...@mentor.com]
 Sent: Tuesday, August 17, 2010 11:31 AM
 To: Laser, Mary
 Subject: RE: Db tables
 
 Mary,
 
 This got me further.  I'm now getting the below errors in the log.
 Also, did you see my second email yesterday with the binary display on
 the web pages?
 
 Thanks,
 -Matt
 
 
 2010-08-17 10:14:43 scheduler[17680] : Child[7] 'agent=copyright
 host=localhost ' state=SPAWNED(4) @ Tue Aug 17 10:14:43 2010
 2010-08-17 10:14:44 scheduler[17680] : Child[7] 'agent=copyright
 host=localhost ' state=READY(5) @ Tue Aug 17 10:14:44 2010
 2010-08-17 10:14:44 scheduler[17680] : ERROR: In thread 7:  DB Access
 error, returned -1.
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: ERROR: DB Access
 error,
 returned -1.
 2010-08-17 10:14:44 scheduler[17680] : ERROR: In thread 7:  DB STATUS:
 PGRES_FATAL_ERROR
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: ERROR: DB STATUS:
 PGRES_FATAL_ERROR
 2010-08-17 10:14:44 scheduler[17680] : ERROR: In thread 7:  DB ERRMSG:
 invalid byte sequence for encoding UTF8: 0x00
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: ERROR: DB ERRMSG:
 invalid byte sequence for encoding UTF8: 0x00
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: HINT:  This error can
 also happen if the byte sequence does not match the encoding expected
 by
 the server, which is controlled by client_encoding.
 2010-08-17 10:14:44 scheduler[17680] : ERROR: In thread 7:  sql=INSERT
 INTO copyright (agent_fk, pfile_fk, copy_startbyte, copy_endbyte,
 content, hash, type)
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: ERROR: sql=INSERT INTO
 copyright (agent_fk, pfile_fk, copy_startbyte, copy_endbyte, content,
 hash, type)
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]:
 VALUES (24, 19421, 1235, 1276,
 E'http\:\/\/www\.w3\.org\/TR\/html4\/loose\.dtd\\\^A\000\^N',
 E'0x781313cb0a6a289b', 'url')
 2010-08-17 10:14:44 scheduler[17680] : ERROR: In thread 7:
 filename=9133AD80C7B6AC5E2880BFD86002DA81006CDB77.3FF4F6DD09C98FC3EF27C
 C
 D4531EECCD.6412
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: ERROR:
 filename=9133AD80C7B6AC5E2880BFD86002DA81006CDB77.3FF4F6DD09C98FC3EF27C
 C
 D4531EECCD.6412
 2010-08-17 10:14:44 scheduler[17680] : FATAL: In thread 7:  An error
 occurred in the main agent loop. Please consult the provided traceback.
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: FATAL: An error
 occurred in the main agent loop. Please consult the provided traceback.
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]:Traceback (most
 recent call last):
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]:  File
 /usr/lib/fossology/agents/copyright/copyright.py, line 284, in agent
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]: print 
 sys.stdout, 'ERROR: Could not process file.\n\tupload_pk = %s, pfile_pk
 = %s, pfilename = %s' % (upload_pk, jobs[i]['pfile_pk'],
 jobs[i]['pfilename'])
 2010-08-17 10:14:44 scheduler[17680] : DEBUG[7]:NameError: global
 name 'jobs' is not defined
 2010-08-17 10:14:54 scheduler[17680] : ERROR: Child[7] died prematurely
 (was state RUNNING, signal was 0)
 2010-08-17 10:14:54 scheduler[17680] :
 Thread 7:
 2010-08-17 10:14:54 scheduler[17680] :   PID:   17819
 2010-08-17 10:14:54 scheduler[17680] :   Pipes: in=7-8 / out=10-9
 2010-08-17 10:14:54 scheduler[17680] :   Attr:  'agent=copyright
 host=localhost '
 2010-08-17 10:14:54 scheduler[17680] :   Command:
 '/usr/lib/fossology/agents/copyright/run.py --model
 /usr/share/fossology/model.dat --agent'
 2010-08-17 10:14:54 scheduler[17680] :   Parm:  '5
 '
 2010-08-17 10:14:54 scheduler[17680] :   Heartbeat:  Tue Aug 17
 10:14:44
 2010
 2010-08-17 10:14:54 scheduler[17680] :   State:  Tue Aug 17
 10:14:44
 2010
 2010-08-17 10:14:54 scheduler[17680] :   Status: 6 (RUNNING)
 2010-08-17 10:14:54 scheduler[17680] :   Spawn:  1 at Tue Aug 17
 10:14:43 2010
 2010-08-17 10:14:54 

[FOSSology] Db tables

2010-08-16 Thread McIntosh, Matt
What file does the database table creation?  After getting everything
installed and uploading a couple of packages I found that the copyright
job isn't running.  In looking at the log I see that it tries to do a
select from the copyright table.  I don't have this table in the db.
FYI: I did the install from the RHEL5 rpm.  Log snippet is posted below.

Thanks,
-Matt


2010-08-13 14:04:32 scheduler[8247] : Child[7] 'agent=copyright
host=localhost ' state=SPAWNED(4) @ Fri Aug 13 14:04:32 2010
2010-08-13 14:04:32 scheduler[8247] : ERROR: In thread 7:  Could not
select table copyright. Database said: relation copyright does not
exist at character 19
2010-08-13 14:04:32 scheduler[8247] : DEBUG[7]: ERROR: Could not select
table copyright. Database said: relation copyright does not exist at
character 19
2010-08-13 14:04:32 scheduler[8247] : ERROR: In thread 7:  sql=SELECT
ct_pk FROM copyright LIMIT 1
2010-08-13 14:04:32 scheduler[8247] : DEBUG[7]: ERROR: sql=SELECT ct_pk
FROM copyright LIMIT 1
2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] failed to spawn
after 70 seconds
2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] failed command
was: '/usr/lib/fossology/agents/copyright/run.py --model
/usr/share/fossology/model.dat --agent'
2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
host=localhost ' state=SPAWNED(4) @ Fri Aug 13 14:05:42 2010
2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
host=localhost ' state=FREEING(2) @ Fri Aug 13 14:05:42 2010
2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
host=localhost ' state=FREE(1) @ Fri Aug 13 14:05:42 2010
2010-08-13 14:05:42 scheduler[8247] : Child[13] 'agent=sqlagent
host=localhost ' state=FREE(1) @ Fri Aug 13 14:05:42 2010
2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] died prematurely
(was state FREE, signal was 0)
2010-08-13 14:05:42 scheduler[8247] :
Thread 7:
2010-08-13 14:05:42 scheduler[8247] :   PID:   12691
2010-08-13 14:05:42 scheduler[8247] :   Pipes: in=0-0 / out=0-0
2010-08-13 14:05:42 scheduler[8247] :   Attr:  'agent=copyright
host=localhost '
2010-08-13 14:05:42 scheduler[8247] :   Command:
'/usr/lib/fossology/agents/copyright/run.py --model
/usr/share/fossology/model.dat --agent'
2010-08-13 14:05:42 scheduler[8247] :   Parm:  ''
2010-08-13 14:05:42 scheduler[8247] :   Heartbeat:  Fri Aug 13 14:05:42
2010
2010-08-13 14:05:42 scheduler[8247] :   State:  Fri Aug 13 14:05:42
2010
2010-08-13 14:05:42 scheduler[8247] :   Status: 1 (FREE)
2010-08-13 14:05:42 scheduler[8247] :   Spawn:  3 at Fri Aug 13
14:00:50 2010
2010-08-13 14:05:42 scheduler[8247] :   DB:
2010-08-13 14:05:42 scheduler[8247] : IsDB: 0
2010-08-13 14:05:42 scheduler[8247] : DBJobKey: 0
2010-08-13 14:05:42 scheduler[8247] : DBMSQrow: 0
2010-08-13 14:05:42 scheduler[8247] : DBagent:  24
___
fossology mailing list
fossology@fossology.org
http://fossology.org/mailman/listinfo/fossology


Re: [FOSSology] Db tables

2010-08-16 Thread Laser, Mary
Hi Matt,
Matt Taggart discovered shortly after we released.  We've checked in a (1 line) 
fix: 
http://fossology.svn.sourceforge.net/viewvc/fossology?view=revisionrevision=3348

Sorry for the inconvenience.

Mary



 -Original Message-
 From: fossology-boun...@fossology.org [mailto:fossology-
 boun...@fossology.org] On Behalf Of McIntosh, Matt
 Sent: Monday, August 16, 2010 10:49 AM
 To: fossology@fossology.org
 Subject: [FOSSology] Db tables
 
 What file does the database table creation?  After getting everything
 installed and uploading a couple of packages I found that the copyright
 job isn't running.  In looking at the log I see that it tries to do a
 select from the copyright table.  I don't have this table in the db.
 FYI: I did the install from the RHEL5 rpm.  Log snippet is posted
 below.
 
 Thanks,
 -Matt
 
 
 2010-08-13 14:04:32 scheduler[8247] : Child[7] 'agent=copyright
 host=localhost ' state=SPAWNED(4) @ Fri Aug 13 14:04:32 2010
 2010-08-13 14:04:32 scheduler[8247] : ERROR: In thread 7:  Could not
 select table copyright. Database said: relation copyright does not
 exist at character 19
 2010-08-13 14:04:32 scheduler[8247] : DEBUG[7]: ERROR: Could not select
 table copyright. Database said: relation copyright does not exist at
 character 19
 2010-08-13 14:04:32 scheduler[8247] : ERROR: In thread 7:  sql=SELECT
 ct_pk FROM copyright LIMIT 1
 2010-08-13 14:04:32 scheduler[8247] : DEBUG[7]: ERROR: sql=SELECT ct_pk
 FROM copyright LIMIT 1
 2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] failed to spawn
 after 70 seconds
 2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] failed command
 was: '/usr/lib/fossology/agents/copyright/run.py --model
 /usr/share/fossology/model.dat --agent'
 2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
 host=localhost ' state=SPAWNED(4) @ Fri Aug 13 14:05:42 2010
 2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
 host=localhost ' state=FREEING(2) @ Fri Aug 13 14:05:42 2010
 2010-08-13 14:05:42 scheduler[8247] : Child[7] 'agent=copyright
 host=localhost ' state=FREE(1) @ Fri Aug 13 14:05:42 2010
 2010-08-13 14:05:42 scheduler[8247] : Child[13] 'agent=sqlagent
 host=localhost ' state=FREE(1) @ Fri Aug 13 14:05:42 2010
 2010-08-13 14:05:42 scheduler[8247] : ERROR: Child[7] died prematurely
 (was state FREE, signal was 0)
 2010-08-13 14:05:42 scheduler[8247] :
 Thread 7:
 2010-08-13 14:05:42 scheduler[8247] :   PID:   12691
 2010-08-13 14:05:42 scheduler[8247] :   Pipes: in=0-0 / out=0-0
 2010-08-13 14:05:42 scheduler[8247] :   Attr:  'agent=copyright
 host=localhost '
 2010-08-13 14:05:42 scheduler[8247] :   Command:
 '/usr/lib/fossology/agents/copyright/run.py --model
 /usr/share/fossology/model.dat --agent'
 2010-08-13 14:05:42 scheduler[8247] :   Parm:  ''
 2010-08-13 14:05:42 scheduler[8247] :   Heartbeat:  Fri Aug 13 14:05:42
 2010
 2010-08-13 14:05:42 scheduler[8247] :   State:  Fri Aug 13 14:05:42
 2010
 2010-08-13 14:05:42 scheduler[8247] :   Status: 1 (FREE)
 2010-08-13 14:05:42 scheduler[8247] :   Spawn:  3 at Fri Aug 13
 14:00:50 2010
 2010-08-13 14:05:42 scheduler[8247] :   DB:
 2010-08-13 14:05:42 scheduler[8247] : IsDB: 0
 2010-08-13 14:05:42 scheduler[8247] : DBJobKey: 0
 2010-08-13 14:05:42 scheduler[8247] : DBMSQrow: 0
 2010-08-13 14:05:42 scheduler[8247] : DBagent:  24
 ___
 fossology mailing list
 fossology@fossology.org
 http://fossology.org/mailman/listinfo/fossology

___
fossology mailing list
fossology@fossology.org
http://fossology.org/mailman/listinfo/fossology