If I do echo $JAVA_HOME I get /usr/lib/jvm/java-8-openjdk-amd64 as a response, yet I cannot get nifi to see it when it starts, always gives this:
nifi.sh: JAVA_HOME not set; results may vary
NiFi home: /opt/nifi-1.12.0
This is on a clean Ubuntu 18.04 installation, having followed these instructions: https://techexpert.tips/apache-nifi/apache-nifi-installation-ubuntu-linux/
At this point really not sure what to do.
If you define JAVA_HOME in your environment, then you must use the command:
And then the script will pick it up from your environment. Also please check if nifi bootstrap.conf file is configured properly.
@Tokolosk JAVA_HOME is not required for nifi to operate.
[root@c7401 nifi-1.12.0]# ./bin/nifi.sh start nifi.sh: JAVA_HOME not set; results may vary Java home: NiFi home: /root/nifi-1.12.0 Bootstrap Config File: /root/nifi-1.12.0/conf/bootstrap.conf
The only commands in my node are (not ubuntu but should be similar):
yum install java java-devel
tail -f logs/nifi-app.log
2020-09-25 12:15:14,828 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs: 2020-09-25 12:15:14,828 INFO [main] org.apache.nifi.web.server.JettyServer http://192.168.74.101:8080/nifi 2020-09-25 12:15:14,828 INFO [main] org.apache.nifi.web.server.JettyServer http://10.0.2.15:8080/nifi 2020-09-25 12:15:14,828 INFO [main] org.apache.nifi.web.server.JettyServer http://127.0.0.1:8080/nifi
If you are having problems, be sure to tail logs/nifi-app.log and look for errors.
If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.
I used @bingo 's solution to get Nifi to find my JAVA_HOME.
But you mention that Nifi does not need this to run. Do you know what is the impact for running nifi without it knowing where Java is installed?