Automic Workload Automation

  • 1.  Agent Startup / Native Libraries Question

    Posted Sep 28, 2017 07:54 AM
    This is more of a UNIX-y question, but hoping someone out there - I know there's some UNIX guru's! - might have an idea.

    We have a JMS agent and to date had only been using Receiver jobs.  We'd like to start using Sender jobs, but we're running into problems.  In troubleshooting the issue, the version of Java we are using has come into question.  We very specifically point to a certain directory / version of Java - 1.8.0_92.  We set this in the .profile.  We have checked our scripts that start up the agent and the command to start up the agent and everything seems to be pointing to our 1.8.0_92 version.

    However, when we look in the agent log we are seeing this:

    U02000113 Path for native libraries: '.:/u02/automic/automationengine/bin:/u02/automic/utility/bin:/u02/automic/ae_servicemanager/bin:/u02/automic/agent_servicemanager/bin:/u02/app/oracle/product/12.1.0/client_1/lib:usr/lib:/usr/jdk/packages/lib/sparcv9:/lib/64:/usr/lib/64'

    The first part matches up to our LD_LIBRARY_PATH that is set in the .profile.  But we are not sure where the last part is coming from (in bold & italic).  

    We also see this in the log:

    U02000090 Java Runtime Environment version: '1.8.0_92'

    So pretty sure that 1.8.0_92 is being used here, but we're puzzled by these other libraries that are getting added on.

    Any ideas on where they are coming from?

    Thanks.



  • 2.  Agent Startup / Native Libraries Question

    Posted Sep 28, 2017 09:51 AM
    Hi.

    If the variable that "feeds" into this log entry indeed is your LD_LIBRARY_PATH, then I bet it's being expanded somewhere else by a statement like this:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/that/additional/stuff

    Check the other dot-Files (.profile, .bash_profile etc.) in the home directory of the user that your agent process starts as. You can, for example, grep them with:

    # grep -H '/usr/jdk/packages/lib/sparcv9' /home/<username>/.*   

    (yes, you need to specify the dot as part of the wildcard).

    Failing that, check the files in /etc, which apply to ALL users (those do not have a dot in front, it's just /etc/profile or somesuch):

    # grep -Hr '/usr/jdk/packages/lib/sparcv9' /etc/*

    Failing that, grab a drink, maybe a pizza if the server is old and slow, and fire off a search across all files on the server. It may take some minutes, but it won't do any harm :)

    # find / -type f -readable -exec grep -H '/usr/jdk/packages/lib/sparcv9' {} \;

    If you have no luck, you may also be able to look at the /proc file system, and there the "environ" file for the process ID of the agent (as discoverable via the ps command) to find out which environment variable the path comes from. Maybe it's not even LD_LIBRARY_PATH (but it probably is).

    # cat /proc/<process_id>/environ

    Hint: It's probably obvious, but the "#" indicates you should run these commands as "root" if possible, to be able to search the most files possible.

    Disclaimer: Some of the parameters used (such as -H for grep) may be GNU parameters and may not work on Solaris, or you may need to use the /usr/ucb version of the utilities on Solaris to make those parameters work. I don't have a Solaris system here to check against. Similarily, I don't know if your particular server has a /proc file system at all.

    Give that a try, let me know if still no dice, then we'll look further.

    Best,
    Carsten

    p.s. I'm also just assuming you're on Solaris because of the sparcv9 path, but what I said applies to most UNIX-like OS anyhow.


  • 3.  Agent Startup / Native Libraries Question

    Posted Sep 29, 2017 12:40 AM
    There's also a folder on Linux/Unix called /etc/ld.so.conf.d . Maybe one of the .conf files contains some of the path entries.