Zotonic
Zotonic
zotonic@conference.zotonic.com
Friday, 24 February 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

GMT+1
[04:25:22] juanjo joins the room
[04:25:25] juanjo leaves the room
[06:14:02] simon.smithies joins the room
[07:29:42] maas.maarten.zeeman joins the room
[09:13:49] maas.maarten.zeeman leaves the room
[09:15:31] kaos joins the room
[09:22:17] maas.maarten.zeeman joins the room
[09:31:58] simon.smithies leaves the room
[10:08:50] simon.smithies joins the room
[10:13:09] arjan joins the room
[10:16:02] arjan leaves the room
[10:17:12] arjan joins the room
[10:18:56] arjan leaves the room
[10:22:06] arjan joins the room
[10:22:48] arjan leaves the room
[10:25:16] <kaos> simon.smithies: you said you could start erl without the public_key.app error, right?
[10:25:34] <kaos> let's try starting the crypto app from there, to see if that is the culprit...
[10:26:52] <simon.smithies> Hi Kaos ... yep erl starts ok
[10:27:35] <simon.smithies> oddly ... when I ruy erl, it reports v5.8.5
[10:28:05] <simon.smithies> but when I try and run zotonic it's under erts 5.6.3 or something
[10:28:49] <simon.smithies> but I like your crypto idea :)
[10:29:00] <simon.smithies> more than reinstalling erlang
[10:35:26] <kaos> :)
[10:35:27] <simon.smithies> how do I start crypto from the erl shell?
[10:35:41] <kaos> sounds like a path issue if you get different erlang versions depending on who runs erl...
[10:35:49] <kaos> application:start(crypto).
[10:36:23] <simon.smithies> ok
[10:36:31] <kaos> look at the start fun in https://github.com/zotonic/zotonic/blob/master/src/zotonic.erl
[10:36:49] <kaos> those should all be startable without errors...
[10:37:08] <simon.smithies> so I should try 'em all?
[10:37:36] <simon.smithies> 2> application:start(webzmachine).
{error,{"no such file or directory","webzmachine.app"}}
[10:38:26] <simon.smithies> ditto for lager
[10:38:39] <simon.smithies> mnesia gives 'ok'
[10:38:43] <kaos> you'd need to start your erl with same -pa args as the zotonic script does, or add them afterwads
[10:38:46] <kaos> afterwards*
[10:38:59] <kaos> code:add_path(...)
[10:39:55] <kaos> if you have zotonic/ebin on your path, you can run zotonic_deps:ensure() to load all deps, and see if any of those break...
[10:40:06] <kaos> ( https://github.com/zotonic/zotonic/blob/master/src/zotonic_deps.erl )
[10:40:51] <kaos> I think I would first focus on making sure you run the same version of erlang regardless of boot method...
[10:41:20] <simon.smithies> yep, that makes sense
[10:41:47] <simon.smithies> I can't see how I've ended up with 2 versions of erlang on 1 box
[10:42:57] <simon.smithies> sorry - have to shoot out for 10mins - brb :(
[10:52:31] <simon.smithies> back again
[10:53:23] maas.maarten.zeeman leaves the room
[10:58:31] <simon.smithies> so I've added zotonic/ebin to my path (well to the path in /etc/profile)
[11:00:10] <simon.smithies> I get
[11:00:13] <simon.smithies> ** exception error: undefined function zotonic_deps:ensure/0
[11:00:41] <simon.smithies> but I guess that because my profile changes aren't loaded
[11:09:57] <simon.smithies> what controls where zotonic gets its erl instance from?
[11:20:14] <simon.smithies> kaos: I've done some digging
[11:20:30] <kaos> ok
[11:20:44] <simon.smithies> I've one erlang install in /usr/lib/erlang
[11:20:56] <simon.smithies> that has erts 5.6.3
[11:21:15] <simon.smithies> and another in /usr/local/lib/erlang
[11:21:40] <simon.smithies> that one has erts 5.7.5 and erts 5.8.5
[11:21:51] <simon.smithies> what a shambles :(
[11:22:05] <kaos> could it be that one is installed using rpm/apt or similar, and the other if you have compiled one yourself?
[11:22:29] <simon.smithies> yes, I compiled r14b04 myself
[11:22:41] <kaos> about the path... the zotonic/ebin needs to be in erlang code path... not the PATH env....
[11:23:03] <simon.smithies> oops
[11:23:05] <simon.smithies> I see
[11:23:27] <kaos> $ erl -pa zotonic/ebin
[11:23:30] <kaos> is one way to do it...
[11:23:47] <simon.smithies> that seems easy enough
[11:24:09] <simon.smithies> and code:add_path(..) is another?
[11:24:28] <kaos> there is a ERL_LIBS env path you can set... but the zotonic scripts sets up the path for you, so for testing/fault finding, adding the extra -pa when invoking erl seems more apropriate...
[11:24:56] <kaos> it's the same thing. one invoked from cmd line, the other from the shell (or other erlang code)...
[11:25:07] arjan joins the room
[11:25:30] <kaos> there are version of them if you want to add to beginning or end of the path list... (search order)
[11:26:17] <kaos> http://www.erlang.org/doc/man/code.html#add_path-1
[11:27:31] <simon.smithies> now it's going a little better
[11:27:35] <simon.smithies> Eshell V5.8.5 (abort with ^G)
1> zotonic_deps:ensure().
** Found 0 name clashes in code paths
ok
[11:27:44] <kaos> ok
[11:28:07] <kaos> next step, try to get zotonic to start the 5.8.5 version...
[11:28:17] <simon.smithies> makes sense
[11:28:34] <kaos> do you invoke the zotonic script as the same user as when you try erl from cmd line?
[11:29:58] <kaos> ah, there's a ERL env you can set to point to the erl you want to use...
[11:30:46] <kaos> so ERL=/usr/local/bin/erl ./bin/zotonic debug
[11:30:55] <kaos> might do the trick (as a first step)...
[11:33:26] <simon.smithies> that has started the right erl version
[11:33:59] <simon.smithies> and all the apps seem to have started too - incl public_key
[11:34:24] <simon.smithies> then it gives me 23:32:17.290 [info] listening on {0,0,0,0}:2525 via tcp
{"init terminating in do_boot",{{badmatch,{error,{shutdown,{zotonic_app,start,[normal,[]]}}}},[{zotonic,start,1},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
[11:39:45] <simon.smithies> will having 2 versions of erlang have an effect on the make process for zotonic?
[11:40:04] <simon.smithies> like ... do I need to make again, against the correct version?
[11:42:35] <kaos> Nah... don't think so...
[11:42:51] <kaos> is this your first run on this db?
[11:42:58] <simon.smithies> no
[11:43:04] <kaos> hmm, ok...
[11:43:14] <simon.smithies> first run since adding authbind
[11:43:15] <kaos> so the site is fully initialized in the db...
[11:44:27] <simon.smithies> it /was/ fully initialized, then I tried installing authbind, and did manage to get it to run to the point where the config got recreated
[11:44:36] <kaos> well, then. Perhaps shouldn't rule out your idea about the need to recompile with the new beam version...
[11:45:24] <simon.smithies> Is the easiest way to get rid of the old version?
[11:46:12] <kaos> since that was installed with some package manager, I'd say use it to remove it again... if that's easy, I don't know ;)
[11:46:53] <kaos> a less sensitive way is to simple yank it off with a bunch of rm's, but that may leave some unwanted traces of it in some package meta files that may cause later headaches....
[11:47:10] <simon.smithies> this is a plesk vps ... it was ages ago but from memory I put the first one there via the plesk package manager gui
[11:47:43] <simon.smithies> only concern about using plesk to remove it is it may remove the one i want to keep
[11:47:57] <simon.smithies> but I think that's unlikely
[11:48:17] <kaos> I'd go ahead and remove the plesk verison, whichever that turns out to be
[11:48:35] <kaos> if you're left with the wrong version, yank it out, and recompile and install from sources
[11:48:50] <simon.smithies> sounds like a plan
[11:48:58] <kaos> :)
[11:52:49] <simon.smithies> too easy
[11:53:12] <simon.smithies> it's left behind the version I wanted
[11:53:21] <simon.smithies> in /usr/local
[11:54:15] <simon.smithies> so make clean first?
[11:57:42] <simon.smithies> looking good now
[11:57:53] <simon.smithies> still failing but light at end of tunnel
[11:58:11] <simon.smithies> $ sudo /etc/init.d/zotonic start
Starting Zotonic...:Reading config from /home/zotonic/.zotonic_defaults
ZOTONIC_PORT=80
ZOTONIC_PORT_SSL=443
ZOTONIC_IP=210.5.53.206
Starting zotonic zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>
/usr/bin/erl: No such file or directory
make: *** [erl] Error 255
/usr/bin/erl: No such file or directory
[11:58:35] <simon.smithies> zotonic's now looking in the wrong place for ERL
[12:02:06] <simon.smithies> aargh
[12:02:41] <simon.smithies> fixed that, now I get:
[12:02:45] <simon.smithies> $ sudo /etc/init.d/zotonic debug
Calling zotonic debug:Reading config from /home/zotonic/.zotonic_defaults
ZOTONIC_PORT=80
ZOTONIC_PORT_SSL=443
ZOTONIC_IP=210.5.53.206
Erlang R14B04 (erts-5.8.5) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:true]
Eshell V5.8.5 (abort with ^G)
(zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>)1> ** Found 0 name clashes in code paths
** Found 0 name clashes in code paths
00:01:44.200 [info] Application lager started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:01:44.462 [info] Application mnesia started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:01:44.476 [info] Application public_key started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:01:44.506 [info] Application ssl started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:01:44.566 [info] Application inets started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
** Found 0 name clashes in code paths
opening log file: "/home/zotonic/zotonic-0.8/zotonic/priv/log/access.log.2012_02_24_11"
00:01:44.846 [info] gen_smtp_server starting at 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:01:44.847 [info] listening on {0,0,0,0}:2525 via tcp
Terminating due to shutdown
00:01:45.147 [error] CRASH REPORT Process <0.186.0> with 0 neighbours crashed with reason: {eaddrinuse,[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}
{"init terminating in do_boot",{{badmatch,{error,{shutdown,{zotonic_app,start,[normal,[]]}}}},[{zotonic,start,1},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
[12:03:14] <arjan> it seems zotonic is already running
[12:03:19] <arjan> "eaddrinuse"
[12:03:34] <simon.smithies> hmm
[12:04:54] <simon.smithies> $ sudo /etc/init.d/zotonic stop
Stopping Zotonic...:Reading config from /home/zotonic/.zotonic_defaults
ZOTONIC_PORT=80
ZOTONIC_PORT_SSL=443
ZOTONIC_IP=210.5.53.206
Stopping zotonic zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>
Stop:'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
There is no node with this name
[12:05:42] <simon.smithies> $ sudo /etc/init.d/zotonic debug
Calling zotonic debug:Reading config from /home/zotonic/.zotonic_defaults
ZOTONIC_PORT=80
ZOTONIC_PORT_SSL=443
ZOTONIC_IP=210.5.53.206
Erlang R14B04 (erts-5.8.5) [source] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:true]
Eshell V5.8.5 (abort with ^G)
(zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>)1> ** Found 0 name clashes in code paths
** Found 0 name clashes in code paths
00:03:48.259 [info] Application lager started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:03:48.508 [info] Application mnesia started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:03:48.521 [info] Application public_key started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:03:48.560 [info] Application ssl started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:03:48.637 [info] Application inets started on node 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
** Found 0 name clashes in code paths
opening log file: "/home/zotonic/zotonic-0.8/zotonic/priv/log/access.log.2012_02_24_11"
00:03:48.830 [info] gen_smtp_server starting at 'zotonic001@vps200.lnx.vps.isx.net.nz <mailto:zotonic001@vps200.lnx.vps.isx.net.nz>'
00:03:48.831 [info] listening on {0,0,0,0}:2525 via tcp
Terminating due to shutdown
{"init terminating in do_boot",{{badmatch,{error,{shutdown,{zotonic_app,start,[normal,[]]}}}},[{zotonic,start,1},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
[12:08:10] <simon.smithies> is this maybe time to delete zotonic/priv/config and have it recreate it?
[12:10:46] maas.maarten.zeeman joins the room
[12:15:44] <kaos> not unless you have some real funky stuff in priv/config...
[12:15:57] <kaos> that it complains that there is no node with this name is a little nagging...
[12:16:21] <kaos> see https://github.com/zotonic/zotonic/issues/246
[12:16:23] <simon.smithies> that was on a "stop"
[12:16:50] <simon.smithies> it's always (at least I think so) said that to me when I issue a stop command
[12:17:13] <kaos> ah... either there was no instance running, and all is fine...
[12:17:17] <kaos> or, it wasn't stopped
[12:17:33] <kaos> and that will cause you the crash you see when you try to start (another one)
[12:17:46] <kaos> ps ax | grep beam
[12:18:03] <kaos> to see if you have any running instances...
[12:18:06] <simon.smithies> from erl?
[12:18:14] <kaos> oh, no std cmd prompt
[12:18:35] <simon.smithies> 10173 pts/0 S+ 0:00 grep beam
[12:18:50] <kaos> good.
[12:18:56] maas.maarten.zeeman23099 joins the room
[12:18:56] maas.maarten.zeeman23099 leaves the room
[12:18:56] maas.maarten.zeeman345 joins the room
[12:18:56] maas.maarten.zeeman345 is now known as maas.maarten.zeeman19355
[12:18:56] maas.maarten.zeeman19355 leaves the room
[12:18:57] maas.maarten.zeeman21371 joins the room
[12:19:00] <simon.smithies> means nothing runngin?
[12:19:03] <kaos> yep
[12:19:39] <kaos> maas.maarten.zeeman21371: funky names... ?
[12:21:09] <kaos> simon.smithies: just to make sure. There's no apache or such running that's bound to port 80 (or 443)...
[12:22:03] <simon.smithies> ah geez there might be
[12:22:22] <simon.smithies> that's not going to help is it
[12:22:23] maas.maarten.zeeman21371 leaves the room
[12:22:43] <kaos> haha... no, not by much :P
[12:23:24] <simon.smithies> amateurs eh?
[12:23:31] <kaos> been there, done that ;)
[12:26:58] <simon.smithies> that's (almost) fixed it
[12:27:14] <simon.smithies> the site is running on port 80
[12:27:17] <simon.smithies> phew
[12:27:39] <simon.smithies> so I guess zotonic is happy now
[12:27:47] <simon.smithies> http://coolairrefrigeration.co.nz/
[12:28:18] <simon.smithies> but the zotonic site admin doesn't appear
[12:28:37] <simon.smithies> must be a problem with the zotonic config?
[12:31:05] <arjan> here you are: http://210.5.53.206/
[12:31:20] <arjan> the site admin only shows up on domains that are not configured to host any zotonic sites
[12:32:16] <simon.smithies> that's the right address ... am confused
[12:33:08] <simon.smithies> I see a plesk page at that address
[12:33:19] <simon.smithies> ah - will be my host file
[12:36:06] <simon.smithies> and it was :)
[12:37:03] <simon.smithies> thanks heaps for your help with this guys
[12:37:55] <simon.smithies> team effort on this one ... Scott Finnie sent me a bunch of good stuff on authbind earlier too
[12:38:43] <kaos> nice looking site :)
[12:38:59] <simon.smithies> well thanks
[12:39:22] <simon.smithies> credit goes to the graphic designer
[12:40:00] <simon.smithies> hope to do some more now I have the whole process worked out
[12:40:24] <kaos> :) glad it worked out
[12:40:50] <simon.smithies> me too ... it wouldn't have without such a great community
[12:41:03] <simon.smithies> appreciate the help
[12:42:55] <simon.smithies> I think you guys are building something pretty special with zotonic - it's a bit difficult to learn for non-techies like me, but very rewarding and I can see it's a very powerful platform
[12:43:31] <simon.smithies> I'm looking forward to getting some more time to play with it
[12:44:33] <arjan> :D
[12:45:01] <simon.smithies> Next step for me is to migrate some of our old sites across to it ... a bunch of templates to create and data/images to move
[12:45:23] <simon.smithies> but that has to wait for a couple of weeks while I go to Melbourne for my day job :(
[12:46:40] <simon.smithies> Now it's time for bed.
[12:46:55] <simon.smithies> thanks again for all your help. :)
[12:46:59] <simon.smithies> cu
[12:47:08] simon.smithies leaves the room
[13:14:23] <maas.maarten.zeeman> Have been using some new stuff internally. Want to check if it something useful for core or opensource zotonic module
[13:14:59] <maas.maarten.zeeman> I have made the mochiweb html parser available via a filter :-)
[13:15:37] <maas.maarten.zeeman> and have some (sort of) xpath filtters for selecting nodes from the parse tree
[13:16:39] <maas.maarten.zeeman> Could be useful to handle xml document.
[13:17:19] <maas.maarten.zeeman> You can do stuff like this: {{ tree | select_nodes:"/html/head/*" | to_html }}
[13:20:35] <maas.maarten.zeeman> Other filters too. Sounds useful? Could also be used for handling html body content made with the rich text editor.
[13:20:53] <maas.maarten.zeeman> Or handling media.
[13:48:51] <kaos> sounds cool... not sure if I'll need it any time soon, though... ;)
[13:49:24] kaos leaves the room
[14:33:46] Juan Jose Comellas joins the room
[14:33:57] Juan Jose Comellas leaves the room
[15:17:38] arjan leaves the room
[15:31:03] arjan joins the room
[17:29:24] maas.maarten.zeeman leaves the room
[18:04:11] arjan leaves the room
[19:43:57] andreas.stenius joins the room
[19:44:18] andreas.stenius leaves the room
[22:08:48] simon.smithies joins the room
[22:13:29] arjan joins the room
[22:18:57] arjan leaves the room
[23:06:18] simon.smithies leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!