NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #CUW-137953]: ldmadmin bug using break instead of last



Brenda,

You're absolutely right! Kudos!

I guess I have C on the brain.

Your fix will be in the next release.

> ldmadmin is a perl script.  It uses a command "break" which does not exist
> in perl.  The correct command is "last".  The "break" is on line 672 of
> ldmadmin in version 6.10.1
> 
> Here is the ldmadmin snippet:
> # Check to make sure the LDM is running
> my($loopcount) = 1;
> while(!isRunning($pid_file, $ip_addr)) {
> if($loopcount > 15) {
> errmsg("start(): ".
> "Server not started.");
> $status = 1;        # failure
> break;     # This break needs to be last
> }
> sleep($loopcount);
> $loopcount++;
> }
> 
> The symptoms are that "ldmadmin start" is stuck in a loop putting out
> "start(): Server not started." messages with sleeps between increasing at
> one second intervals.
> 
> The "break" was supposed to break out of the loop after 15 iterations and
> the "Server not started" message, but it does not do that and the loop
> continues forever.
> 
> We found this bug in at least version 6.10 and 6.11 in use.  We checked
> source for 6.12.14 and it it there as well.
> 
> This symptoms have been reported in the unidata forums, but I did not see a
> resolution.
> 
> Here are the reports:
> 
> http://www.unidata.ucar.edu/mailing_lists/archives/ldm-users/2016/msg00013.html
> https://www.unidata.ucar.edu/support/help/MailArchives/ldm/msg07508.html
> 
> The fix will not change why it would not start, but should prevent the
> infinite loop that occurs now.
> 
> This issue is also sometimes associated with the following error message
> (perhaps why the server did not start?):
> 
> ulog: Couldn't connect(2) to UNIX socket "/dev/log": No such file or
> directory
> 
> -- Brenda J. Roder
> The Weather Company


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: CUW-137953
Department: Support LDM
Priority: Normal
Status: Closed