Apache Oozie本地安装失败求助:Mac系统遇连接拒绝错误
First, let's reference the partial output you shared when running oozied.sh start:
Setting OOZIE_HOME: /Users/akirna/oozie
Setting OOZIE_CONFIG: /Users/akirna/oozie/conf
Sourcing: /Users/akirna/oozie/conf/oozie-env.sh
setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
Setting OOZIE_CONFIG_FILE: oozie-site.xml
Setting OOZIE_DATA: /Users/akirna/oozie/data
Setting OOZIE_...
A connection refused error almost always means Oozie either failed to start fully, or your client can't reach the running service. Let's walk through the most common fixes:
Check Oozie's Startup Logs
The first thing to do is dig into the logs to see why Oozie isn't starting properly. Head to$OOZIE_HOME/logsand look at files likecatalina.outoroozie.log. You'll likely find specific errors here—things like database connection failures, missing dependencies, or misconfigured properties that are stopping the service from launching.Verify the Oozie Base URL
Open$OOZIE_HOME/conf/oozie-site.xmland check theoozie.base.urlproperty. For local testing, it should point to a URL your Mac can resolve, like:<property> <name>oozie.base.url</name> <value>http://localhost:12000/oozie</value> </property>If this is set to a hostname that's not in your local hosts file or can't be resolved, it'll cause connection issues. Stick with
localhostfor local setups.Check if Port 12000 is in Use
Oozie uses port 12000 by default. If another process is hogging this port, Oozie can't bind to it. Run this command to check:lsof -i :12000If you get output, kill the conflicting process with
kill -9 <PID>(replace<PID>with the process ID from thelsofresult). Alternatively, change Oozie's port by modifying theoozie.http.portproperty inoozie-site.xml.Ensure Java 8 is Properly Configured
Oozie requires Java 8 (which is compatible with High Sierra). First, confirm your Java version:java -versionThen, make sure
OOZIE_JAVA_HOMEis set correctly in$OOZIE_HOME/conf/oozie-env.sh. For example:export OOZIE_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/HomeReplace the path with your actual Java 8 installation directory.
Initialize the Oozie Database
If you skipped this step during setup, Oozie won't start. Run this command to set up the default embedded Derby database:ooziedb create -runThis creates all necessary tables and initializes the database for Oozie.
Check Mac Firewall Settings
The built-in Mac firewall might be blocking incoming connections to port 12000. Temporarily disable it (System Preferences > Security & Privacy > Firewall) to test. If that fixes the issue, add an exception for Oozie or allow incoming connections to port 12000.
After trying these steps, restart Oozie with oozied.sh start and test the connection with oozie admin -status.
内容的提问来源于stack exchange,提问作者Andrew Kirna

