Hi Seth,

Le 13/11/2015 18:47, Seth Galitzer a écrit :
For the last couple of weeks, my nightly cronjobs have been failing with various database errors. I'm currently running 5.2 and plan to upgrade to 6.0 as soon as possible. In the meantime, I'd like to make sure my DB is healthy and my users don't lose functionality. Here are the errors I've been getting, reported by cron:

forge_run_job stats_projects_logparse.pl
Cron job /usr/share/gforge/cronjobs/stats_projects_logparse.pl not found or not executable.
sh: 1: /usr/share/gforge/cronjobs/stats_projects_logparse.pl: not found

forge_run_job db_trove_maint.php
SQL: INSERT INTO trove_agg
(SELECT tgl.trove_cat_id, g.group_id, g.group_name, g.unix_group_name, g.status, g.register_time, g.short_description, project_weekly_metric.percentile, project_weekly_metric.ranking
FROM groups g
LEFT JOIN project_weekly_metric USING (group_id), trove_group_link tgl, pfo_role_setting prs
WHERE tgl.group_id=g.group_id
AND g.type_id = 1
AND g.status = $1
AND g.group_id = prs.ref_id
AND prs.section_name = $2
AND prs.role_id = 1
ORDER BY trove_cat_id ASC, ranking ASC)
SQL> ERROR:  value too long for type character varying(255)

forge_run_job gather_scm_stats.php
SQL: INSERT INTO user_session (session_hash,ip_addr,time,user_id) VALUES ($1,$2,$3,$4) SQL> ERROR: duplicate key value violates unique constraint "session_pkey" DETAIL: Key (session_hash)=(3765e56341b1472bf16801f67da57de7) already exists.
[... repeated multiple times with different hash values ...]

forge_run_job create_scm_repos.php
SQL: INSERT INTO user_session (session_hash,ip_addr,time,user_id) VALUES ($1,$2,$3,$4) SQL> ERROR: duplicate key value violates unique constraint "session_pkey" DETAIL: Key (session_hash)=(a53b8c3b82a8d33ab6cb16697210fbf0) already exists.
[... repeated multiple times with different hash values ...]

forge_run_job create_scm_repos.php
SQL: INSERT INTO user_session (session_hash,ip_addr,time,user_id) VALUES ($1,$2,$3,$4) SQL> ERROR: duplicate key value violates unique constraint "session_pkey" DETAIL: Key (session_hash)=(2ae3833c4039c703a9a8c88d7c53b070) already exists.
[... repeated multiple times with different hash values ...]

forge_run_job generate_scm_snapshots.php
SQL: INSERT INTO user_session (session_hash,ip_addr,time,user_id) VALUES ($1,$2,$3,$4) SQL> ERROR: duplicate key value violates unique constraint "session_pkey" DETAIL: Key (session_hash)=(9af6c59f8775d1b7b06658e0ea9674ff) already exists.
[... repeated multiple times with different hash values ...]
[... followed by errors tar'ing CVS repos ...]

I haven't done any updates around this time, so I don't know what would have caused the first problem with the missing file. Since the 5.2 debian packages don't exist anymore, can somebody tell me where I can pull that file to restore it?

https://scm.fusionforge.org/anonscm/gitweb?p=deb-packaging/deb-packaging.git;a=blob;f=src/deb-specific/stats_projects_logparse.pl;h=f5e26ba12bf40a51ed7f66c8c6fd1c8197a089ab;hb=HEAD


The second error should be easily fixable, but I don't know where to start looking. We don't do a whole lot with trove characterization, so it shouldn't be too much trouble.

the short_description column fro trove_agg is too small. In 5.3, the column type has been changed to text.
https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge/fusionforge.git;a=blob;f=src/db/20140616-sync-trove_agg-type.sql;h=4fd9f9b7743944983ec7515894fca49c28155744;hb=refs/heads/Branch_5_3


The SCM errors are probably all related, but again, I don't know where to look to correct the problem and remove the offending duplicated keys without destroying important data.

There is a known bug in session generation. Take a look at session.php from Branch_5_3:
https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge/fusionforge.git;a=blob;f=src/common/include/session.php;h=3d193bed8966c9ff6e8e1d5615bbdce1e06b6096;hb=refs/heads/Branch_5_3

The session_build_session_cookie function is the one you need to look at.




My database resides on an external postgres server, not on the forge server.

Any advice on resolving these errors would be appreciated. Then I can start working on my upgrade migration.

Thanks.
Seth


Hope it help.

Regards,
Franck

--
TrivialDev Founder
http://trivialdev.com

<<attachment: franck_villaume.vcf>>

_______________________________________________
Fusionforge-general mailing list
Fusionforge-general@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-general

Reply via email to