Was able to resolve the issue. the problem was with "java" not being available to all users. Earlier installed Oracle Java using default (ubuntu) user, while the aem script was running as root.Steps to install custom Java.. not the Ubuntu default:Download the tar.gz file "https://download.oracle.com...