Random header image... Refresh for more!

heli_ewII “No Menu! Just Quit.”

I’m in the process of setting up a seismometer and Winston and Earthworm for a personal seismometer station.  I’m trying to get everything set up to run on startup, so that the system can reboot and continue, without manual intervention.

I’ve got Winston working.

I’ve got my data acquisition script working.

I even have Earthworm working.

The problem is that heli_ewII (which is the only reason I have earthwrom running right now) refuses to play along.  It’ll say it’s starting, then throw a temper tantrum, scream “No Menu!  Just quit.”, and exit.  Whatever it’s doing, statmgr isn’t happy about it, and refuses to retry starting it.  It’ll say that the module needs human intervention.  Later, when I manually restart heli_ewII, everything works fine.  It looks like what’s happening is that the heli_ewII module starts too quickly and is impatient.  I don’t think Winston has had a change to start up and begin serving the menu correctly.  So, heli_ewII thinks it’s talking to a bad server, and instead of gracefully trying again or terminating in a way that statmgr will restart it 30 seconds later, it just explodes.

Clearly not what I want.

Fortunately, Earthworm is open source!  So, why not just fix the code?  This is what I did in Earthworm 7.7.  It’s untested and should probably make the options configurable and might, in fact, do very very bad things.  But hey, it’s free!

Between the lines “Build_Menu (&BStruct);” and “if(!BStruct.got_a_menu) {“, just after the “/* See what our wave servers have to offer */” comment, insert this code.  It should make heli_ewII retry several times before giving up.  Hopefully, this is enough time for Winston to get its act together.

int noMenuCount = 0;
while(noMenuCount < 10 && !BStruct.got_a_menu){
  logit("e", "%s No Menu!  Try again.\n", whoami);
  for(j=0; j<BStruct.nServer; j++)
  Build_Menu (&BStruct);


There are no comments yet...

Kick things off by filling out the form below.

Leave a Comment