zotonic stop

107 views
Skip to first unread message

Jeff Bell

unread,
Apr 18, 2011, 10:37:54 PM4/18/11
to Zotonic users
I'm having a problem with the new zotonic scripts.

When I try to run ./bin/zotonic stop I get 

There is no node with this name"

I've tried to connect to the node from another node, but I guess I don't have the right cookie settings.
Even worse I don't know how to kill the process without it starting up again.  I've tried kill -9 on the epmd and zotonic instance but they start right back up again.

Any guidance would be appreciated.

Jeff 

Dmitrii Dimandt

unread,
Apr 19, 2011, 2:02:50 AM4/19/11
to zotoni...@googlegroups.com
Heh, I'm having the same problem on zforum.dmitriid.com :) Don't know what to do myself

Marc Worrell

unread,
Apr 19, 2011, 4:18:46 AM4/19/11
to zotoni...@googlegroups.com
When beam.smp is started with -heart you need to kill the heart process before you can kill the beam.smp process.  You  don't need to kill the epmd process, that one just handles the inter node communication of Erlang.

That there is no node with that name is probably due to differences in sname and name handling.  Also make sure that the domain name used can be resolved (ie has a DNS entry or is added to your hosts file).

I didn't use the new scripts yet (most of my projects are still on 0.6, though soon we will switch to 0.7dev for MaxClass).

Did anyone else see this problem?

Best, Marc

Andreas Stenius

unread,
Apr 19, 2011, 4:31:14 AM4/19/11
to zotonic-users
Hi,

I've seen this on a CentOS system, where I called zotonic.sh start
during boot (when entering run level 3, if I remember correctly).
I guess that I should've postponed the start a bit, since using
zotonic.sh later when booting is complete works fine. My guess was
that it had to do with some hostname inconsitency (i.e. I started
zotonic before hostname was properly configured). Not sure about that
though.

For killing erlang. If nothing else works (I've had sessions where I
were unable to kill it of properly) I simply renamed the zotonic.sh
file used to restart the node temporarily; that way the heart command
fails and I could kill off the other processes before restoring the
zotonic.sh file again.

//Andreas

2011/4/19 Marc Worrell <mwor...@mac.com>:

Alain O'Dea

unread,
Apr 19, 2011, 7:22:10 AM4/19/11
to zotoni...@googlegroups.com, zotoni...@googlegroups.com
I introduced the use of hostname in the start an stop to support remote debugging.  I'm beginning to regret that since SSH X Tunneling and running EShell would likely work just as well.

Here is the problem as I see it:

zotonic start starts a node named $SNAME@$HOSTNAME and runs SASL and zotonic:start().

zotonic stop starts a node named $SNAME_stop@$HOSTNAME and runs zotonic:stop($SNAME@$HOSTNAME)

This uses an RPC call to $SNAME@$HOSTNAME to shut ot down.  The fact that this fails indicates an EPMD issue.  EPMD works correctly but may not be reachable at $HOSTNAME due to DNS or firewall configuration.

I am on the fence at this point.  Fully qualified valid node names are good generally, but they have some unforeseen annoyances.

Alain O'Dea

unread,
Apr 19, 2011, 7:25:51 AM4/19/11
to Andreas Stenius, zotonic-users
Hi Andreas:

You can use kill -STOP on heart and beam and then straight-up kill to solve this. The trouble is the cycle of regen.

Cheers,
Alain

ll...@writersglen.com

unread,
Apr 19, 2011, 11:47:40 AM4/19/11
to zotoni...@googlegroups.com
Hi,

Have the new scripts been documented anywhere?

I must have missed the post that introduced them since it was only through communication with Alain that I found out that they even existed.

I had a problem awhile back with multiple instances of Zotonic running on my system which Marc helped me straighten out. This suggested to me two functions that might help prevent such problems:

- zotonic status
- in zotonic start, check to see if the server is already started. If so, give notification.

Best,

LRP

Arjan Scherpenisse

unread,
Apr 19, 2011, 2:12:32 PM4/19/11
to zotoni...@googlegroups.com
docs for the commands still live in the same place:
http://code.google.com/p/zotonic/source/browse/doc/ZotonicCommands.txt

ll...@writersglen.com

unread,
Apr 19, 2011, 2:17:50 PM4/19/11
to zotoni...@googlegroups.com
Thank you, Arjan.

I never knew about this. Perhaps a link on the Zotonic site would be useful. Or did I miss that too.

Best wishes,

LRP

colinf

unread,
Apr 19, 2011, 2:19:11 PM4/19/11
to Zotonic users
Hi all,

I'm having the same problem with the zotonic stop (and zotonic restart
scripts). My rather brutal solution is to use the kill -9 -1 command.
This kills all processes for the current user and since I have a
specific zotonic user for running zotonic this works well for me in
stopping all processes and allowing me to then start zotonic again.

Cheers,
Colin

On Apr 19, 12:25 pm, Alain O'Dea <alain.o...@gmail.com> wrote:
> Hi Andreas:
>
> You can use kill -STOP on heart and beam and then straight-up kill to solve this.  The trouble is the cycle of regen.
>
> Cheers,
> Alain
>
> On 2011-04-19, at 6:01, Andreas Stenius <andreas.sten...@astekk.se> wrote:
>
>
>
> > Hi,
>
> > I've seen this on a CentOS system, where I called zotonic.sh start
> > during boot (when entering run level 3, if I remember correctly).
> > I guess that I should've postponed the start a bit, since using
> > zotonic.sh later when booting is complete works fine. My guess was
> > that it had to do with some hostname inconsitency (i.e. I started
> > zotonic before hostname was properly configured). Not sure about that
> > though.
>
> > For killing erlang. If nothing else works (I've had sessions where I
> > were unable to kill it of properly) I simply renamed the zotonic.sh
> > file used to restart the node temporarily; that way the heart command
> > fails and I could kill off the other processes before restoring the
> > zotonic.sh file again.
>
> > //Andreas
>
> > 2011/4/19 Marc Worrell <mworr...@mac.com>:
> >> When beam.smp is started with -heart you need to kill the heart process
> >> before you can kill the beam.smp process.  You  don't need to kill the epmd
> >> process, that one just handles the inter node communication of Erlang.
> >> That there is no node with that name is probably due to differences in sname
> >> and name handling.  Also make sure that the domain name used can be resolved
> >> (ie has a DNS entry or is added to your hosts file).
> >> I didn't use the new scripts yet (most of my projects are still on 0.6,
> >> though soon we will switch to 0.7dev for MaxClass).
> >> Did anyone else see this problem?
> >> Best, Marc
>
> >> On Apr 19, 2011, at 08:02 , Dmitrii Dimandt wrote:
>
> >> Heh, I'm having the same problem on zforum.dmitriid.com :) Don't know what
> >> to do myself
>
> >> On Tue, Apr 19, 2011 at 5:37 AM, Jeff Bell <jeff.5ni...@gmail.com> wrote:
>
> >>> I'm having a problem with the new zotonic scripts.
> >>> When I try to run ./bin/zotonic stop I get
> >>> "Stop:'zotonic...@webXX.webfaction.com'

ll...@writersglen.com

unread,
Apr 19, 2011, 2:40:16 PM4/19/11
to zotoni...@googlegroups.com
Well, it's biting me again.

I've just added to lines to the content of a page that has been running fine forever. I click save this page below the Content field, see the "Saved Writers Glen" notice. but it doesn't save. I click in the Publish the page box, but it doesn't save. I click save & view in the Publish this page box, I see the page... unchanged. I return to admin and the changes in the Content field are gone.

I've tried click and all variations above. Still can't get it to save.

If past experience holds true, at some point the save will take.

Here is another case where I wish I had a diagnostic procedure to follow.

LRP

ll...@writersglen.com

unread,
Apr 19, 2011, 3:01:27 PM4/19/11
to zotoni...@googlegroups.com
Very strange.

I reconnected to Zotonic admin through a different tab on my browser and was able to save my changes with no problem.

I'm sure there's a rational reason for this, but for now I'll chalk it up to one more gremlin living in my system.

Best,

LRP

Alain O'Dea

unread,
Apr 19, 2011, 5:17:33 PM4/19/11
to ll...@writersglen.com, zotoni...@googlegroups.com
Are you using Firefox, Chrome or Safari? Otherwise you are in magic land. Even making things work on all of those browsers is a trial.

I seriously suggest using a mainstream browser for Zotonic admin.

ll...@writersglen.com

unread,
Apr 19, 2011, 5:53:17 PM4/19/11
to zotoni...@googlegroups.com
Hi,

I'm using Debian's rebranded version of Firefox: Iceweasel 3.0.6.

Best wishes,

Lloyd

Alain O'Dea

unread,
Apr 19, 2011, 6:07:24 PM4/19/11
to ll...@writersglen.com, zotoni...@googlegroups.com
Now it's a true mysery :S

ll...@writersglen.com

unread,
Apr 19, 2011, 6:25:38 PM4/19/11
to zotoni...@googlegroups.com
Hi Alain,

Yes. But it's not the only mystery that I'm experiencing. I've been focusing more time than I can really afford on trying to get Writers Glen to a point where I can go public or, at least, beta. Even things I thought I understand don't seem to be working. And this is taking valuable time away from learning about things I know I don't understand.

For instance, I had chat working but commented out a dispatch rule to test and confirm my understanding of what was going on. But chat no longer worked when I uncommented the rule. And I haven't been able to make it work since. Commenting and uncommenting the rule was the only thing I did.

Unfortunately, given that I'm headed out of the country on Thursday, I don't have time now to explore and probe them in depth.

But when I return next month I plan to spend the month really boring in. Among other things, I'll be comparing experience across the system on Discovery and my local system. I'm sure I'll have a ton of Mickey-the-dunce questions.

Many thanks,

LRP

ll...@writersglen.com

unread,
Apr 19, 2011, 7:50:32 PM4/19/11
to zotoni...@googlegroups.com
Here's another example of the nutsy stuff I'm encountering:

I have a home page with category text, unique name page_home, and title Writers Glen.

Here is the dispatch rule:

{home, [], resource_page, [ {template, "home.tpl"}, {id, page_home} ]},

It works just fine when I call <mysite>/.

I've created another page with category text, unique name page_test, and title Test.

I copied home.tpl to test.tpl.

Here's the dispatch rule:

{test, ["test"], resource_page [ {template, "test.tpl"} ]}, {id, page_test} ]},

I get a 404 error when I call <mysite>/test

By my reasoning, the pages are the same but for title, the dispatch rules are the same but for substitution of the word test for home. The templates are the same.

But one works and the other doesn't.

I've tried rescanning modules.

I'll need to drink an extra bottle of Tequila to recover from my overpowering frustration.

All the best,

Lloyd

Alain O'Dea

unread,
Apr 19, 2011, 8:40:09 PM4/19/11
to ll...@writersglen.com, zotoni...@googlegroups.com
Here's the dispatch rule:

  {test,          ["test"],                   resource_page           [ {template, "test.tpl"}  =>] <=},     {id, page_test} ]},

I am guessing the closing square bracket is breaking the dispatch parser, so it falls back on your old dispatch rules.

I would really like if rescan modules detected syntax and type errors.  It's a serious frustration having to run code to see if it is written correctly.

ll...@writersglen.com

unread,
Apr 19, 2011, 8:57:10 PM4/19/11
to zotoni...@googlegroups.com
Bless your young eyes. That and a missing comma after resource_page seemed to solve the problem. I did have to clear cache and rescan modules to make it work.

Now you know why I don't proof-read my own books.

Thanks many and multi,

Alain O'Dea

unread,
Apr 20, 2011, 6:26:11 AM4/20/11
to ll...@writersglen.com, zotoni...@googlegroups.com
My pleasure Lloyd :)

I think file:consult("zotonic/priv/sites/mysite/dispatch/dispatch") would detect this error.

It would be pretty straight-forward, but tedious to write a module that tests a site's modules and config for basic correctness. It would be better to bake more verbose error reporting into the compile and config loading code in Zotonic. I don't time unfortunately :(

Cheers,
Alain

Michael Connors

unread,
Apr 20, 2011, 8:51:34 AM4/20/11
to zotoni...@googlegroups.com
On 19 April 2011 21:01, <ll...@writersglen.com> wrote:
Very strange.

I reconnected to Zotonic admin through a different tab on my browser and was able to save my changes with no problem.

I'm sure there's a rational reason for this, but for now I'll chalk it up to one more gremlin living in my system.


Maybe a silly question, but were you logged in at the time? Perhaps you had inadvertently  logged out in another browser window, or had stopped and started the server which would have logged you out. 

ll...@writersglen.com

unread,
Apr 20, 2011, 12:46:45 PM4/20/11
to zotoni...@googlegroups.com
Hi Michael,

Since I've been known to do silly things, your question couldn't possibly be silly.

Anyway, anything is possible. But several times when I've experienced this problem I would get a successful save after several clicks on the save button.

My current theory is that it had to do with one or more bugs in my dispatch rules. Just a wild-eyed guess, but maybe a dispatch bug killed a supervisor in the Zotonic code that was trying to recover while I was trying to save.

I say this because once I fixed the dispatch code last night, I had no more problems saving pages.

It is comforting to know, though, that good folks like you are willing to take time to help me through my silly fumbles.

Thank you.

LRP

-----Original Message-----
From: "Michael Connors" <conn...@gmail.com>
Sent: Wednesday, April 20, 2011 8:51am
To: zotoni...@googlegroups.com
Subject: Re: [Zotonic-Usr] Page save problem

Michael Connors

unread,
Jun 5, 2011, 10:01:25 AM6/5/11
to zotoni...@googlegroups.com
Hi Alain,


On 19 April 2011 13:22, Alain O'Dea <alain...@gmail.com> wrote:
I introduced the use of hostname in the start an stop to support remote debugging.  I'm beginning to regret that since SSH X Tunneling and running EShell would likely work just as well.


 
I was wondering what is the plan for this? I got a 0.7 up and running to play around with and I see this is still an issue. For now I just do: kill -9 heart_pid zotonic_pid. But if I was running in production I would like to be able to use zotonic restart and zotonic update.

Alain O'Dea

unread,
Jun 5, 2011, 10:20:55 AM6/5/11
to zotoni...@googlegroups.com
Hi Michael:

I believe this is fixed by setting your hostname to an FQDN.  I haven't been able to reproduce it on R14B02 on my laptop or on R13B3 on my servers with an FQDN as the hostname.

My laptop has hostname alain-laptop.local and one of my servers has hostname verafin.com.  Both work for the zotonic start|stop|shell|update etc.

I can help resolve this if you like.  Just send me the crash you get and the hostname.

Cheers,
Alain

M-MZ

unread,
Jun 5, 2011, 1:47:45 PM6/5/11
to zotoni...@googlegroups.com
Hi,

Bit of a side issue, but... Be aware that erlang node name's are case sensitive, while fqdn's are not. They should be the same, otherwise the handshake between nodes will fail.

Maas


Alain O'Dea

unread,
Jun 5, 2011, 2:41:36 PM6/5/11
to zotoni...@googlegroups.com
Maas is right about EPMD's case sensitivity. Make sure your hostname
is all lowercase. DNS stores and reports them in lowecase so it makes
things far less confusing.

Michael Connors

unread,
Jun 5, 2011, 3:09:11 PM6/5/11
to zotoni...@googlegroups.com
On 5 June 2011 20:41, Alain O'Dea <alain...@gmail.com> wrote:
Maas is right about EPMD's case sensitivity.  Make sure your hostname
is all lowercase.  DNS stores and reports them in lowecase so it makes
things far less confusing.

It is shared hosting, but the hostname appears to be in lower case.

This is what I get. I have not looked any further into it yet. I know Zotonic is running, the site is up.

Alain O'Dea

unread,
Jun 5, 2011, 4:08:21 PM6/5/11
to Michael Connors, zotoni...@googlegroups.com
Hi Michael:

This is what I get. I have not looked any further into it yet. I know Zotonic is running, the site is up.

There is no node with this name

Okay your hostname is web123.webfaction.com already.  That's a good thing.

Try running this command to get all beam nodes with -name (long names):

    ps x | grep beam | grep -name

Does the command return any processes?

If not I suspect that Zotonic was started with a node name that is incompatible with the other scripts for
some reason.

Try getting all registered nodes from
EPMD with this command:

    epmd -names

Does it list zotonic001?

Try this command to get all named beam nodes whether -sname or -name:

    ps x | grep beam | grep name


Reply all
Reply to author
Forward
0 new messages