KB Article #180563

Start ADI as non-root user on restricted port (under 1024, such as 443)

Problem

Unable to start ADI as a non-root user on port 443

Resolution

Non-root user does not have access to the respective port. Follow below steps to achieve the requirement:

1. Stop ADI
2. Give the non-root user rights to read, write and execute contents of DecisionInsight directory.
3. Set the desired port conf/platform.properties file. Example:

org.apache.felix.https.enable=true
org.osgi.service.http.port.secure=443
org.apache.felix.https.keystore=
org.apache.felix.https.keystore.password=
org.apache.felix.http.enable=false


4. Create a file java.conf in /etc/ld.so.conf.d as a root user, vi /etc/ld.so.conf.d/java.conf
5. In java.conf insert path to the jli folder of for the jre used by Decision Insight


Example: /opt/axway/product/DecisionInsight_20190805-01/lib/jre/lib/jli/


6. Save java.conf and reboot the server.
7. After the server is up execute setcap as a root user for the java executable used by Decision Insight


Example: setcap cap_net_bind_service+ep /opt/axway/product/DecisionInsight_20190805-01/lib/jre/bin/java

Depending the Linux distribution used , you need to take in account he use of /bin/sh and not /bin/bash: setcap was required to be done using /bin/sh which is being used to start not /bin/bash


8. Execute getcap command to verify.


Example getcap /opt/axway/product/DecisionInsight_20190805-01/lib/jre/bin/java


9. Execute command ldconfig as root user.

$ ldconfig


10. Now start ADI as non-root user. Example: ./tnd-start.sh