Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building website the first time #1

Open
cmullaparthi opened this issue Mar 12, 2018 · 3 comments
Open

Error when building website the first time #1

cmullaparthi opened this issue Mar 12, 2018 · 3 comments
Assignees

Comments

@cmullaparthi
Copy link

I followed the instructions in README.md. There are these errors right at the end.

zotonic_1        | 14:36:37.196 [info] Zotonic started
zotonic_1        | 14:36:37.196 [info] ===============
zotonic_1        | 14:36:37.196 [info] Config files used:
zotonic_1        | 14:36:37.197 [info] - /etc/zotonic/erlang.config
zotonic_1        | 14:36:37.197 [info] - /etc/zotonic/zotonic.config
zotonic_1        | 14:36:37.197 [info] 
zotonic_1        | 14:36:37.197 [info] Web server listening on IPv4 any:8000, IPv6 ::8000, SSL :8443
zotonic_1        | 14:36:37.197 [info] 
zotonic_1        | 14:36:37.198 [info] http://erlangcentral.docker.test               - running
zotonic_1        | 14:36:37.202 [info] [erlangcentral] info @ z_datamodel:169  Creating new acl_user_group 'acl_user_group_managers'
zotonic_1        | 14:36:37.273 [info] [erlangcentral] info @ z_datamodel:169  Creating new category 'agenda'
zotonic_1        | 14:36:37.333 [error] Error starting module mod_ginger_base, Schema initialization error:
zotonic_1        | {'EXIT',{{case_clause,{rollback,{{badmatch,notfound},[{m_category,move_below,3,[{file,"src/models/m_category.erl"},{line,698}]},{z_datamodel,'-manage/4-lc$^0/1-0-',4,[{file,"src/support/z_datamodel.erl"},{line,65}]},{z_datamodel,manage,4,[{file,"src/support/z_datamodel.erl"},{line,65}]},{mod_ginger_base,manage_schema,2,[{file,"/opt/zotonic/user/modules/mod_ginger_base/mod_ginger_base.erl"},{line,171}]},{z_db,'-transaction1/2-fun-0-',3,[{file,"src/db/z_db.erl"},{line,135}]},{timer,tc,2,[{file,"timer.erl"},{line,181}]},{z_db,with_connection,3,[{file,"src/db/z_db.erl"},{line,210}]},{z_db,transaction1,2,[{file,"src/db/z_db.erl"},{line,126}]}]}}},[{z_module_manager,manage_schema,4,[{file,"src/support/z_module_manager.erl"},{line,871}]},{z_module_manager,'-start_child/6-fun-2-',6,[{file,"src/support/z_module_manager.erl"},{line,704}]}]}}
zotonic_1        | 14:36:37.333 [error] Module mod_ginger_base start error {error,{schema_init,{'EXIT',{{case_clause,{rollback,{{badmatch,notfound},[{m_category,move_below,3,[{file,"src/models/m_category.erl"},{line,698}]},{z_datamodel,'-manage/4-lc$^0/1-0-',4,[{file,"src/support/z_datamodel.erl"},{line,65}]},{z_datamodel,manage,4,[{file,"src/support/z_datamodel.erl"},{line,65}]},{mod_ginger_base,manage_schema,2,[{file,"/opt/zotonic/user/modules/mod_ginger_base/mod_ginger_base.erl"},{line,171}]},{z_db,'-transaction1/2-fun-0-',3,[{file,"src/db/z_db.erl"},{line,135}]},{timer,tc,2,[{file,"timer.erl"},{line,181}]},{z_db,with_connection,3,[{file,"src/db/z_db.erl"},{line,210}]},{z_db,transaction1,2,[{file,"src/db/z_db.erl"},{line,126}]}]}}},[{z_module_manager,manage_schema,4,[{file,"src/support/z_module_manager.erl"},{line,871}]},{z_module_manager,'-start_child/6-fun-2-',6,[{file,"src/support/z_module_manager.erl"},{line,704}]}]}}}}
zotonic_1        | 14:36:37.651 [info] [erlangcentral] info @ z_datamodel:169  Creating new text 'signup_tos'
zotonic_1        | 14:36:37.729 [info] [erlangcentral] info @ z_datamodel:169  Creating new text 'signup_privacy'
zotonic_1        | 14:36:37.804 [info] [erlangcentral] info @ z_datamodel:169  Creating new category 'admin_content_query'
zotonic_1        | 14:36:38.074 [info] No action enabled for "growl"
zotonic_1        | 14:36:38.074 [error] Could not start erlangcentral: Missing dependencies: [mod_ginger_base]
zotonic_1        | 14:36:57.713 [info] Category renumbering completed
@cmullaparthi
Copy link
Author

cmullaparthi commented Mar 12, 2018

Host platform

$ uname -a
Darwin bigmac 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64

Erlang/OTP 20.0

@cmullaparthi
Copy link
Author

Looks like the website is up, but it throws all these warnings in the console.

zotonic_1        | 14:55:51.857 [info] Unknown search query {ginger_geo,[{cat,"person"}]}
zotonic_1        | []
zotonic_1        | 14:55:51.871 [warning] Query: unknown category '<<"blog_post">>'
zotonic_1        | 14:55:51.873 [warning] Query: unknown category '<<"presentation_post">>'
zotonic_1        | 14:55:51.874 [warning] Query: unknown category '<<"video_post">>'
zotonic_1        | 14:55:51.877 [warning] Query: unknown category '<<"vacancy_post">>'
zotonic_1        | 14:55:51.878 [error] z_db error {error,error,<<"42P01">>,<<"relation \"pivot_vacancy\" does not exist">>,[{position,<<"38">>}]} in query "select rsc.id from rsc rsc left join pivot_vacancy pivot1 on (rsc.id = pivot1.id) where  false  and rsc.pivot_category_nr = -1  order by rsc.id DESC offset $1 limit $2" with [0,3]
zotonic_1        | 14:55:51.878 [error] Error in m.search[{query,[{cat,["vacancy_post"]},{custompivot,"vacancy"},{pagelen,3}]}] error: {error,{error,error,<<"42P01">>,<<"relation \"pivot_vacancy\" does not exist">>,[{position,<<"38">>}]}}
zotonic_1        | 14:55:51.893 [warning] Query: unknown category '<<"supporter">>'
zotonic_1        | 14:55:52.228 [info] Unknown search query {ginger_geo,[{cat,"person"}]}
zotonic_1        | [{erlang,send,[webmachine_logger,{'$gen_cast',{log_access,{wm_log_data,341938473,controller_file,{1520,866552,127083},'GET',{9,{"host",{'Host',"erlangcentral.docker.test"},{"cookie",{'Cookie',"z_sid=5obyG2Mt73145UFMX45zKU6YaNKPEoWN"},{"connection",{'Connection',"keep-alive"},{"accept",{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},nil,{"accept-language",{'Accept-Language',"en-gb"},{"accept-encoding",{'Accept-Encoding',"gzip, deflate"},nil,nil},nil}},nil},nil},{"upgrade-insecure-requests",{"Upgrade-Insecure-Requests","1"},{"referer",{'Referer',"http://erlangcentral.docker.test/"},nil,nil},{"user-agent",{'User-Agent',"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6"},nil,nil}}}},"172.18.0.1","/lib/images/spinner.gif",{1,1},200,3494,undefined,{1520,866552,130571},{dict,4,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[[ua_class|desktop],[ua_props,{is_user_select,false},{has_pointer,true},{is_desktop,true},{is_crawler,false},{is_wireless_device,false},{is_tablet,false},{ajax_support_javascript,true},{device_os,<<"-">>},{displayWidth,1600},{displayHeight,900},{inputDevices,<<"-">>},{parentId,<<"generic-">>},{model,<<"browser">>},{vendor,<<"desktop">>},{id,<<"desktopDevice">>}]],[[zotonic_host|erlangcentral]],[[controller_module|controller_file]],[],[],[],[],[],[],[],[],[],[]}}}}}},[noconnect]],[]},{gen_server,do_send,2,[{file,"gen_server.erl"},{line,416}]},{gen_server,do_cast,2,[{file,"gen_server.erl"},{line,232}]},{z_stats,log_access,1,[{file,"src/support/z_stats.erl"},{line,61}]},{webmachine_decision_core,do_log,1,[{file,"src/webmachine_decision_core.erl"},{line,170}]},{webmachine_mochiweb,loop,2,[{file,"src/webmachine_mochiweb.erl"},{line,105}]},{mochiweb_http,headers,5,[{file,"src/mochiweb_http.erl"},{line,104}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]
zotonic_1        | 14:55:52.230 [warning] Query: unknown category '<<"blog_post">>'
zotonic_1        | 14:55:52.231 [warning] Query: unknown category '<<"presentation_post">>'
zotonic_1        | 14:55:52.231 [warning] Query: unknown category '<<"video_post">>'
zotonic_1        | 14:55:52.234 [warning] Query: unknown category '<<"vacancy_post">>'
zotonic_1        | 14:55:52.235 [error] z_db error {error,error,<<"42P01">>,<<"relation \"pivot_vacancy\" does not exist">>,[{position,<<"38">>}]} in query "select rsc.id from rsc rsc left join pivot_vacancy pivot1 on (rsc.id = pivot1.id) where  false  and rsc.pivot_category_nr = -1  order by rsc.id DESC offset $1 limit $2" with [0,3]
zotonic_1        | 14:55:52.235 [error] Error in m.search[{query,[{cat,["vacancy_post"]},{custompivot,"vacancy"},{pagelen,3}]}] error: {error,{error,error,<<"42P01">>,<<"relation \"pivot_vacancy\" does not exist">>,[{position,<<"38">>}]}}
zotonic_1        | 14:55:52.236 [warning] Query: unknown category '<<"supporter">>'

@ddeboer
Copy link
Member

ddeboer commented Mar 12, 2018

These warnings indicate an incompletely initialised system, as data is missing. The cause seems to be a race condition in Zotonic’s site startup procedure, which I cannot reproduce locally.

@cmullaparthi Can you check whether everything was compiled correctly? Just above the Starting Zotonic zotonic001@... in the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants