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

[LDM #ADA-874007]: This is driving me nuts!



Tom,

Wow!

> Hi Gilbert and Steve,
> 
> Here is a bit more information on the EXEC problem that Gilbert is
> experiencing on weather3.admin.niu.edu:
> 
> I modified /usr/local/bin/make_index to:
> 
> - not modify PATH
> 
> This was done because of a recommendation I read in:
> 
> http://askubuntu.com/questions/604406/g-error-trying-to-exec-as-execvp-no-such-file-or-directory
> 
> "You should not overwrite $PATH in your script."
> 
> - echo the PATH in-scope to a log file for review
> 
> 
> Here is the value of PATH that the script is seeing on weather3:
> 
> /home/ldm/ldm-6.12.14/bin:/usr/bin:/bin
> 
> Here is the PATH in the environment in which the LDM is started:
> 
> /usr/local/bin:/usr/local/bin/wxp6:/bin:/usr/bin:/usr/games:/usr/lib/mh:/usr/bin/mh:/home/ldm/bin:/home/ldm/wxpscripts:/home/ldm/decoders:/home/ldm/decoders/bin:/home/ldm/wxpscripts:/home/ldm:/usr/lib64:/lib64:/usr/lib:/sbin:/usr/sbin:.:/home/gempak/NAWIPS/os/linux64/bin:/home/gempak/NAWIPS/bin:/home/gempak/NAWIPS/os/linux64/bin
> 
> 
> For comparison, here is the same information on weather.admin.niu.edu:
> 
> PATH in-scope in /usr/local/bin/make_index:
> 
> /home/ldm/ldm-6.12.14/bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/usr/lib/mh:/usr/bin/mh:/home/ldm/bin:/home/ldm/wxpscripts:/home/ldm/gempakscripts:/home/ldm/decoders:/home/ldm/decoders/bin:/home/ldm/util:/usr/local/etc:/usr/lib64:/sbin:/usr/sbin:.
> 
> PATH in environment in which the LDM is started:
> 
> /usr/local/bin:/bin:/usr/bin:/usr/games:/usr/lib/mh:/usr/bin/mh:/home/ldm/bin:/home/ldm/wxpscripts:/home/ldm/gempakscripts:/home/ldm/decoders:/home/ldm/decoders/bin:/home/ldm/util:/usr/local/etc:/usr/lib64:/sbin:/usr/sbin:.
> 
> Comment:
> 
> - apparently, PATH is being modified on weather3 in a different way than
> on weather
> 
> The only candidate for modifying PATH is 'ldmadmin', and since this code is
> the same on weather and weather3, the likely culprit is 'perl' 
> (/usr/bin/perl).
> I say this because of the code in 'ldmadmin' that modifies the PATH to put
> the LDM bin directory first:
> 
> # Ensure that the utilities of this version are favored
> $ENV{'PATH'} = "$ldmhome/ldm-6.12.14/bin:$ENV{'PATH'}";
> 
> As a test, I commented out this PATH twiddling in 'ldmamdin' on weather3 and
> removed the fully qualified invocation of 'make_index' in ~ldm/etc/pqact.conf.
> After restarting the LDM, the EXEC problem disappeared:
> 
> PATH in-scope in 'make_index' with PATH twiddling in 'ldmadmin':
> 
> /home/ldm/ldm-6.12.14/bin:/usr/bin:/bin
> 
> PATH in-scope in 'make_index' after removal of PATH twiddling in 'ldmadmin':
> 
> /usr/local/bin:/usr/local/bin/wxp6:/bin:/usr/bin:/usr/games:/usr/lib/mh:/usr/bin/mh:/home/ldm/bin:/home/ldm/wxpscripts:/home/ldm/decoders:/home/ldm/decoders/bin:/home/ldm/wxpscripts:/home/ldm:/usr/lib64:/lib64:/usr/lib:/sbin:/usr/sbin:.:/home/gempak/NAWIPS/os/linux64/bin:/home/gempak/NAWIPS/bin:/home/gempak/NAWIPS/os/linux64/bin
> 
> Tentative Conclusion:
> 
> - Perl is incorrectly changing the PATH in 'ldmadmin' on weather3
> 
> What may this be?
> 
> I think that the likely answer is that the length of PATH in the environment
> in which the LDM is started on weather3 is too long for Perl. I am now 
> Googling
> to see if anyone has reported this kind of problem anywhere else.
> 
> Solution?
> 
> - the easiest thing to do would be to trim down the PATH on weather3 so that 
> it
> is about the same length of PATH on weather (the PATH for 'ldm' on weather is
> measurably shorter than it is on weather3)
> 
> If this test is made, the mod I made to ~ldm/bin/ldmadmin will need to be
> undone to see the effect.
> 
> More later...
> 
> 
> Cheers,
> 
> Tom

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: ADA-874007
Department: Support LDM
Priority: Normal
Status: Closed