WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Node Start with Non Root user Fails.

    Posted 04/17/20 02:48 AM
    Hi Team,

    When i was doing a Patch by mistenly i started the Node with Root user , later when i realized that its running with root user, i have stopped it with same root user id and cleared profile temp, wstemp, config/temp and changed the file permissions of nodeagent.pid, SysOut SysErr etc. Then trying to start with WASADMIN user account, it fails with an error. I dont have the error for now as i again started the nodeagent using root user itself. Later, I started the servers from Admin console. 

    Can anyone faced this? If so please let me know the resolution. Cheers.


  • 2.  RE: Node Start with Non Root user Fails.
    Best Answer

    Posted 04/17/20 09:40 AM
    The most likely culprit is the OSGi cache, which is located in your profile's servers/<servername>/configuration directory. The server's OSGi runtime requires read/write access to files in this location in order to successfully start the server process.

    To get around this, you can either modify the file permissions in that directory to give permission back to your usual user, or you can delete the cache, and it will be recreated the next time the server is started with ownership by the user who started the process.

    To manually clear the cache, navigate to the directory I mentioned, back it up (in case something goes wrong), and then delete all the files in that location EXCEPT any directory called "wsBundleMetaData" (and its contents) and any file named "config.ini" - I do expect wsBundleMetaData and do not expect config.ini, but both are possible.

    After that, simply restart the server with the correct user, and you should be good to go.

    ------------------------------
    Jarid Kvale
    ------------------------------



  • 3.  RE: Node Start with Non Root user Fails.
    Best Answer

    Posted 04/20/20 02:31 AM
    Good morning Mallikarjuna,
    as Jarid mentioned before it might be the OSGi cache which is always a good candidate but also any of the logs etc. Or maybe even the JVM shared class cache. What you can do is to stop all servers (incl. nodeagent) on the node and then run:
    • cd <profile_home>
    • find . ! -user <your_was_user> -exec chown <your_was_user>:<your_was_group> {} \;
    • cd <log_root>   # in case your logs are outside your <profile_home>
    • find . ! -user <your_was_user> -exec chown <your_was_user>:<your_was_group> {} \;
    • cd <profile_home>/bin
    • ./clearClassCache.sh  # clear JVM shared class cache
    • ./osgiCfgInit.sh # clear OSGI cache
    • ls -al /tmp/javasharedresources # Verify that JVM class cache is owned by <your_was_user>

    Note: As you've started the nodeagent as root now and then the Application Servers via the AdminConsole it might be that your application servers are running as root as well (unless you've configured a runtime user in WAS). That's perhaps something you do not want.

    Hope that helps ... Hermann
    ​​​​

    ------------------------------
    Hermann Huebler

    #IBMChampion
    ------------------------------