Zotonic
Zotonic
zotonic@conference.zotonic.com
Monday, 4 March 2013< ^ >
arjan has set the subject to: Zotonic - the Erlang Content Management Framework
Room Configuration

GMT+1
[09:04:04] Arjan joins the room
[09:11:12] Maas joins the room
[10:14:29] Arjan leaves the room
[11:34:05] <andreas.stenius> new screenshot at https://github.com/mmzeeman/zotonic/pull/2
[11:35:48] <Maas> I really like it..
[11:37:24] <Maas> Almost done setting up my work machine...
[11:39:26] Maas leaves the room
[11:40:45] <andreas.stenius> cool. I've got to focus on some other work for a while now... so progress will slow down a bit now..
[11:41:02] <andreas.stenius> but it shouldn't be too hard to pick up where I left it, I hope ;)
[11:44:43] andreas.stenius leaves the room
[11:47:05] Andreas Stenius joins the room
[11:59:36] <Marc Worrell> Cool overview - that is the kind of info I would love to know.
[11:59:59] <Marc Worrell> Did you use the hooks we placed for Zynamo?
[12:09:02] Maas joins the room
[12:10:54] <Maas> No I did it slightly different... I added the props from the request to the log info. That contains the interesting bits. (mostly the zotonic host)
[12:12:40] <Maas> uhh, the metadata from the request is transferred to the wm_log_data record
[12:13:33] <Maas> btw why is there a end_time and a finish_time in the wm_log_data record.
[12:14:57] Maas leaves the room
[12:29:37] Maas joins the room
[12:31:52] Arjan joins the room
[12:41:12] Maas76656 joins the room
[12:41:12] Maas76656 leaves the room
[12:41:12] Maas9394 joins the room
[12:41:13] Maas9394 leaves the room
[12:41:13] Maas3929 joins the room
[12:41:13] Maas3929 leaves the room
[12:41:13] Maas91561 joins the room
[12:46:10] Maas leaves the room
[13:41:42] <Andreas Stenius> end_time is the time when processing the request is done, and finish_time is when the response has been sent to the client. In other words, finish_time - end_time gives the time it took to shuffle the response over the wire..
[13:43:07] <Maas91561> aha, neat. was wondering what the difference was... fighting locale's in the minimal ubuntu setup here...
[13:43:29] <Andreas Stenius> didn't know myself, so I just looked it up :)
[13:44:08] <Maas91561> seams that this is the most foolproof way to create a database with utf8 encoding...
[13:44:14] <Marc Worrell> sounds luke something that could be nicely combined in a single graph
[13:44:19] <Maas91561> CREATE <http://linux.m2osw.com/taxonomy/term/502> DATABASE <http://linux.m2osw.com/taxonomy/term/72> mydb WITH ENCODING = 'UTF-8'
LC_CTYPE = 'en_US.utf8' LC_COLLATE = 'en_US.utf8'
TEMPLATE <http://linux.m2osw.com/taxonomy/term/439> template0;
[13:44:42] <Marc Worrell> hei, a collation - didn't know they had that one :p
[13:45:53] <Maas91561> The locale is en_US of this vm. When that is the case you can't create a database with UTF8 encoding..
[13:46:51] <Maas91561> We didn't get that one on the mailinglist yet....
[13:47:58] <Andreas Stenius> strange
[13:48:17] <Andreas Stenius> Marc Worrell: indeed. There's a lot left to graph up :p
[13:49:03] <Maas91561> I think that it has to do with the way the vm image is created.
[15:16:11] <Maas91561> Interesting, the fs on the virtualbox vm is quite slow so it seems. This leads to all kinds problems.
[16:16:22] Maas91561 leaves the room
[16:32:50] Maas joins the room
[17:42:31] Maas leaves the room
[18:06:02] Arjan leaves the room
[18:56:28] Arjan joins the room
[18:59:23] Arjan leaves the room
[19:09:12] Arjan joins the room
[19:21:23] Arjan leaves the room
[19:53:33] Arjan joins the room
[20:24:30] Maas joins the room
[20:42:51] <jeff.5nines> Hi guys. Anyone there?
[20:43:34] <Maas> Yes, Maas here.
[20:46:23] <jeff.5nines> Before I get too far into it, do you think you can help me figure out how to get the zotonic script working on my hosted webfaction site. I've added ZOTONIC_DISTRIBUTED and my site starts with a fully qualified hostname, but none of the zotonic scripts think that zotonic is running. I've been working around it in the past, but I'm trying to help a newcomer to zotonic
[20:50:16] <Maas> That is usually caused by a dns name issue. Are you sure the host has a proper dns name?
[20:50:56] <jeff.5nines> Yes. when I type hostname I get web174.webfaction.com
[20:51:14] <Maas> does nslookup YOURIP also return that?
[20:53:13] <jeff.5nines> Server: 108.59.10.217
Address: 108.59.10.217#53
Non-authoritative answer:
79.11.59.108.in-addr.arpa name = web174.webfaction.com.
Authoritative answers can be found from:
[20:57:07] <Maas> It can also be a known issue with older erlang releases. You should check you have R14B02 or older.
[20:58:18] <Andreas Stenius> Interesting, I got:
web174.webfaction.com has address 108.59.11.79
[20:58:48] <Maas> Just wan
[20:59:01] <Maas> ted to type the same :-)
[20:59:36] <jeff.5nines> hmm
[21:00:16] <jeff.5nines> load balancer or proxy of some kind
[21:00:17] <Andreas Stenius> oh, now I got it.. not too strange
[21:00:19] <Andreas Stenius> at all.
[21:00:52] <Andreas Stenius> looking at my setup in parallell.. just got a cross wire. I though the nslookup result was posted by Maas..
[21:02:00] <Maas> No my nslookup was exactly the same as yours andreas
[21:02:41] <Andreas Stenius> Maas: how do you figure that? I've not posted mine.. :p
[21:03:20] <Maas> :p
[21:03:22] <Andreas Stenius> bah, ok. The ip I posted first was from `host web174...`
[21:03:32] <Andreas Stenius> but sure enough, it's the same I get from nslookup too
[21:04:28] <Andreas Stenius> I think we need a `zotonic diagnose` that can run som hostname, ip address, dns tests for trouble shooting..
[21:05:43] <Maas> The erlang handshake is quite tricky. The erlang node names are case sensitive too.
[21:06:05] <Andreas Stenius> yeah; so all of those perks should be tested for.. ;)
[21:07:25] <jeff.5nines> Sorry, I didn't post the whole nslookup. 108.59.11.79 is the ip that I looked up as well. I only posted the output
[21:08:18] <Andreas Stenius> np. I got it from this line: 79.11.59.108.in-addr.arpa
[21:13:38] <jeff.5nines> I'm running 15B btw
[21:18:11] <Maas> k, thinking about how to quickly
[21:18:30] <Maas> debug this. usually it is a problem with the hostname.
[21:19:11] <Maas> btw why did you put zotonic in distributed mode. The scripts should also work in the default mode?
[21:19:34] <Marc Worrell> when you all have this figured out - can we then make a kind of test script? maybe in erlang, launching some nodes, checking nodenames etc
[21:21:05] <Maas> hehe, yes I think so.. we could actually make a debug version of erlangs handshake code.
[21:23:02] <Maas> Once I added print statements to the handshake code to check why two nodes would not connect. Then I found out about the case sensitive node names.
[21:24:18] <Maas> You if you try to connect to node@example.com <mailto:node@example.com> and that node actuall thinks it is node@Example.com <mailto:node@Example.com> then the handshake fails. Something which is a bit unexpected as dns names are case insensitive.
[21:25:03] <Maas> it has to be *exactly* the same.
[21:25:04] <jeff.5nines> Maas, based on not being able to connect to the short name, I assumed it was a qualified name issue. And then I was down that rabbit hole :)
[21:25:19] <Maas> k
[21:26:59] <Maas> What you can do is open two terminals and start zotonic with ./bin/zotonic debug in one and then in the other run "./bin/zotonic status'
[21:27:39] <Maas> That way you will easily see the node name chosen. You will see something like this:
[21:27:52] <Maas> 20:16:15.957 [info] Application zotonic started on node 'zotonic001@zotonic-dev'
20:16:18.481 [info]
20:16:18.498 [info] Zotonic started
20:16:18.509 [info] ===============
20:16:18.527 [info] Web server listening on IPv4 any:8000
[21:28:06] <Maas> $ ./bin/zotonic status
Running: zotonic001@zotonic-dev
Sites Status:
=============
[21:28:48] <Maas> in this case, the names should also be the same.
[21:31:23] <jeff.5nines> I've started my site with SNAME=hotseat09 ./bin/zotonic debug -> works
[21:32:39] <jeff.5nines> SNAME=hotseat09 ./bin/zotonic status
Zotonic is not running. You need to start Zotonic first to use this command.
[21:33:53] <jeff.5nines> FWIT, I can't ping two nodes although they share the same cookie.
[21:34:02] Maas leaves the room
[21:35:39] <jeff.5nines> I tried erl -name hotseat@web174.webfaction.com, then net_adm:ping('hotseat09@webfaction.com') -> pang
[21:37:39] Maas joins the room
[21:37:49] <Maas> K, never started it like that. Checking...
[21:41:14] <Maas> That works here on my local machine.
[21:44:09] <Maas> you can see the node name in the debug terminal?
[21:45:32] <jeff.5nines> Yes, (hotseat09@web174.webfaction.com)8> node().
'hotseat09@web174.webfaction.com'
(hotseat09@web174.webfaction.com)9>
[21:47:13] <Maas> what happens when you run erl_call -sname hotseat09
[21:49:17] <Maas> (assuming that you use snames right now)
[22:07:18] <jeff.5nines> ./erl_call -sname hotseat09
erl_call: failed to connect to node hotseat09@web174
[22:08:35] <Maas> interesting and this one erl_call -name hotseat09@web174.webfaction.com <mailto:hotseat09@web174.webfaction.com>
[22:08:36] <Andreas Stenius> Well, looks like erl_call tries to connect to web174, not web174.webfaction.com...
[22:08:51] <Maas> that is the short name
[22:09:10] <Andreas Stenius> ah
[22:09:30] <jeff.5nines> I changed everything back to short name. That's why it took a bit to post response
[22:11:19] <Maas> aha, so zotonic in debug mode also reports that?
[22:12:30] <Maas> It should be something like this: 20:38:09.550 [info] Application zotonic started on node 'hotseat09@web174'
[22:13:59] <jeff.5nines> I've never been able to connect to a zotonic instance after startup. That's why I've been using screen and just start it in debug mode all the time.
[22:15:34] <Maas> This is a bit of a long shot, but can you connect by using erl_call -name hotseat09@web174.webfaction.com <mailto:hotseat09@web174.webfaction.com>
[22:16:03] <Maas> if it doesn't say anything it is ok
[22:16:56] <jeff.5nines> No still failed to connect
[22:17:42] <jeff.5nines> Could this be a security setting enforced by webfaction?
[22:18:37] <Maas> maybe. thinking...
[22:19:05] <Andreas Stenius> in the mean time, just curious what `epmd -names` says...
[22:19:43] <Maas> good one
[22:21:30] <Andreas Stenius> :)
[22:21:39] <jeff.5nines> epmd -names
epmd: up and running on port 4369 with data:
name hotseat09 at port 58984
name test at port 44995
[22:24:25] <Andreas Stenius> hmm... strange
[22:25:29] <Maas> Can you tell the difference between a long name and a short name node like this?
[22:26:17] <Andreas Stenius> not sure... running some tests on my dev box...
[22:26:42] <Andreas Stenius> just caught myself before doing it on my "production" one... :p
[22:28:15] <Andreas Stenius> hmm... going to take a while... not up to date... I've been on a local nix machine for dev lately...
[22:28:36] <Maas> jeff, what you could also try to debug this is bare erlang. Start a node with "erl -sname spam"
[22:29:02] <Maas> This starts an erlang node without any zotonic scripts
[22:29:13] <Maas> and then in the other terminal
[22:29:29] <Maas> erl_call -sname spam
[22:29:51] <Maas> Curious if that works.
[22:31:56] <jeff.5nines> No, I tried it again. That is what the test port is above. Both hotseat@web174 and test@web174 have the same cookie as well.
[22:33:28] <Maas> So also no connection possible with just an erlang shell?
[22:33:40] <Maas> ha
[22:34:55] <Andreas Stenius> Maas: epmd -names does not hint at nodes with short nor long names...
[22:35:43] <Maas> puzzled
[22:36:03] <jeff.5nines> erl_call: node = hotseat09
Cookie = VXUIYSSPUEPFPGTXxxxxxx
flags = verbosep
module: name = , size = 0
apply =
erl_call: failed to connect to node hotseat09@web174
[22:36:57] <jeff.5nines> I called this ./bin/erl_call -sname hotseat09 -c 'VXUIYSSPUEPFPGTXxxxxxx
[22:37:36] <jeff.5nines> with the cookies provided from my hotseat09 node (slightly modified of course)
[22:42:43] <Andreas Stenius> erl_call works with both -name and -sname for me regardless of the target node running with short or long node name
[22:44:44] <jeff.5nines> Yeah, I don't have any problems with my local Ubuntu system
[22:45:46] <Andreas Stenius> what does `host web174` say?
[22:46:13] <Andreas Stenius> for me, that gives:
kaos@morpheus:~$ host morpheus
morpheus.astekk.local has address 10.0.1.31
[22:47:07] <Andreas Stenius> what system is this webfaction thingy running on?
[22:47:23] <jeff.5nines> web174 has address 66.152.109.60
web174 has address 198.105.251.65
web174 has address 69.16.143.60
Host web174 not found: 3(NXDOMAIN)
Host web174 not found: 3(NXDOMAIN)
[22:47:26] <Andreas Stenius> (I really got to get my zotonic hosting service running)
[22:47:53] <Andreas Stenius> ugh
[22:48:15] <Andreas Stenius> I'm not sure what to make of that :p
[22:50:08] <Andreas Stenius> I'm wondering how erl_call picks which address to try, or if it tries all in order..?
[22:50:33] <Andreas Stenius> or if epmd tells (only not to us along with the listed names)
[22:51:39] <jeff.5nines> I'm sorry guys, mother-in-law coming in town tonight and wife and kids just got home. Going to be away from keyboard for a while.
[22:52:02] <Andreas Stenius> ok. sorry we weren't of more help.
[22:52:19] <Andreas Stenius> I'll be off to bed in a few... so, talk to you later :)
[22:52:36] <jeff.5nines> No, I appreciate it. At least I know that I'm not crazy :)
[22:52:52] <Andreas Stenius> for sure :) Have a good evening
[22:53:01] <jeff.5nines> Thanks all for your help. Good night
[22:53:05] jeff.5nines leaves the room
[22:53:11] <Maas> Bye
[22:53:40] <Andreas Stenius> Maas: those are some weird issues, and a little to common at that. What do you make of it?
[22:54:03] <Andreas Stenius> or is it just ppl using webfaction?
[22:54:08] <Maas> I'm very puzzled, sname should just work
[22:54:10] <Andreas Stenius> as they seem to be a few doing that
[22:54:28] <Maas> was googling that too
[22:55:03] <Maas> it seems that the google stopped working here. :-/
[22:55:09] <Maas> no response
[22:55:23] <Andreas Stenius> I'm planning to build a zotonic hosting service.. feels more and more right to have a place to direct ppl for easy access to try it out in a controlled environment
[22:55:32] <Andreas Stenius> heh
[22:56:03] <Maas> and there it goes again. glitch on the international cable, icloud music starts playing too
[22:57:10] <Andreas Stenius> abyhow, I'm off to bed now..
[22:57:11] <Maas> that hosting idea is nice indeed. today I worked on the vm setup with vagrant
[22:57:20] <Maas> good night.
[22:57:23] <Andreas Stenius> yeah, that sounds like a nice tool :)
[22:57:30] <Andreas Stenius> see you tomorrow
[22:58:30] Andreas Stenius leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!