Zotonic keeps crashing

37 views
Skip to first unread message

Jan Willem Luiten

unread,
Nov 7, 2012, 3:57:44 PM11/7/12
to zotoni...@googlegroups.com
Hello,

My zotonic installation keeps crashing with the error below. Has something to do with the code trying to access a column in the rsc table that does not exist. Any hints on how to solve this?


21:51:49.664 [info] geocode of 312 set to {52.3422025,5.6367423}
21:51:49.665 [info] SQL error {error,{error,error,<<"42703">>,<<"column "pivot_geocode_qhash" of relation "rsc" does not exist">>,[{position,<<"38">>}]}} : "update rsc set  pivot_geocode = $1,  pivot_geocode_qhash = $2 where id = $3   and version = $4"
21:51:49.666 [error] Error in process <0.3640.0> on node 'zoton...@combenoire.local' with exit value: {{case_clause,{error,{error,error,<<5 bytes>>,<<61 bytes>>,[{position,<<2 bytes>>}]}}},[{z_db,'-q/4-fun-0-',4,[{file,"src/dbdrivers/postgresql/z_db.erl"},{line,275}]},{z_db,with_connection,3,[{file,"src/dbdrivers/postgresql/z_db.erl"},{line,195}]},{mod_geomap,update_geocode... 


21:51:49.669 [error] Supervisor z_site_sup had child z_pivot_rsc started with z_pivot_rsc:start_link([{enabled,true},{hostname,"site.secondmove.nl"},{dbhost,"localhost"},{dbport,5432},{dbuser,"zoto..."},...]) at <0.3176.0> exit with reason no case clause matching {error,{error,error,<<"42703">>,<<"column "pivot_geocode_qhash" of relation "rsc" does not exist">>,[{position,<<"38">>}]}} in {z_db,'-q/4-fun-0-',4,[{file,[115,114,99,47,100,98,100,114,105,118,101,114,115,47,112,111,115,116,103,114,101,115,113,108,47,122,95,100,98,46,101,114,108]},{line,275}]} in context child_terminated
21:51:49.752 [error] Supervisor received unexpected message: {'ETS-TRANSFER','observers$secondmove',<0.3159.0>,[]}

Marc Worrell

unread,
Nov 7, 2012, 4:04:36 PM11/7/12
to zotoni...@googlegroups.com
Hi Jan-Willem,

When you start Zotonic then those columns should be automatically added:
Check install_geocode/3 in z_installer.erl

They are used by mod_geomap for indexing.

Can you check if the install_geocode/3 is present in your system?
Are you using a quite new 0.9dev?

- Marc

Jan Willem Luiten

unread,
Nov 7, 2012, 4:05:10 PM11/7/12
to zotoni...@googlegroups.com
Already solved by removing a row that pointed to rsc 312 from table rsc_pivot_queue, but still no idea what caused this.

Cordially,

Jan Willem

Op woensdag 7 november 2012 21:57:44 UTC+1 schreef Jan Willem Luiten het volgende:

Marc Worrell

unread,
Nov 7, 2012, 4:10:06 PM11/7/12
to zotoni...@googlegroups.com
I found it, a discrepancy between the updater in z_installer.erl and the table definitions in z_install.erl
The latter one misses a column definition.

Fixing it on the 0.9dev

- Marc

Marc Worrell

unread,
Nov 7, 2012, 4:13:50 PM11/7/12
to zotoni...@googlegroups.com
I just pushed a fix to the 0.9dev

- Marc

Jan Willem Luiten

unread,
Nov 8, 2012, 7:08:47 AM11/8/12
to zotoni...@googlegroups.com
I picked up the changes and applied them by hand on 4 database-schema's. This reminds me of the way such changes are handled in Ruby On Rails, which has a domain specific language for database migrations. Introducing such a DSL to perform database migrations might be worth it. It would certainly take the pain out of changes like these.


Op woensdag 7 november 2012 22:10:09 UTC+1 schreef Marc Worrell het volgende:
Reply all
Reply to author
Forward
0 new messages