Bitcoin
Your Guide to Getting Apache DolphinScheduler Running Locally (Without Breaking Stuff)

This article systematically describes the general process of setting up a local debugging environment for Apache Dolphins CHEDULER in the idea, including the preparation of the environment, the configuration of the code, the start of the service and other basic stages for reference.
1. Preparation of basic components
1. JDK: v1.8.x (currently does not support JDK 11)
2. Maven: v3.5+
3. Node.js: v18.19.1+, install pnpm
// Global installation
npm install pnpm -g
// Check registry
pnpm config get registry
// Switch to Taobao registry
pnpm config set registry
4. Zookeeper: 3.6.3 (this version is used by big data platforms, DS reuses the platform's Zookeeper). When using the latest DS, it uses curator 5.3.0
Curator 5.0 supports Zookeeper 3.6.X, no longer supports Zookeeper 3.4.X
Curator 4.X supports Zookeeper 3.5.X, with soft compatibility for 3.4.X
Curator 2.X supports Zookeeper 3.4.X
5. MySQL version check:
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.44 |
+-----------+
1 row in set (0.00 sec)
2. Initialization
2.1 Initialize the database
source /Users/xxx/IdeaProjects/dolphinscheduler/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql;
2.2 Key configurations in common.
# Local directory for storing scripts
data.basedir.path=/tmp/dolphinscheduler
# Storage medium selection (e.g., HDFS); for resource center and tenant directories
resource.storage.type=HDFS
# Root directory of resource center
resource.storage.upload.base.path=/dolphinscheduler
# User for HDFS operations (typically hdfs user)
resource.hdfs.root.user=hdfs
# HDFS defaultFS (for HA mode, place core-site.xml and hdfs-site.xml in resources folder)
resource.hdfs.fs.defaultFS=hdfs://10.253.26.85:8020
# Development mode (recommended for easier troubleshooting)
development.state=true
# YARN port
resource.manager.httpaddress.port=8088
# For YARN HA, configure multiple IPs separated by commas
yarn.resourcemanager.ha.rm.ids=
# For single YARN, replace ds1 with YARN IP; leave unchanged for HA mode
yarn.application.status.address=
2.3 Configure the application.Yaml for each service
Note: Mainly configure the Zookeeper connection address and the MySQL address (omitted details).
2.4 Configure the logback-spring.xml for each service
Together
for the outing of the console.
Here is the English translation line by line:
3. STARTUP Component
1) MasterServer:
Execute the main method of org.apache.dolphinscheduler.server.master.MasterServer in IntelliJ IDEA,
with VM Options:
-Dlogging.config=classpath:logback-spring.xml
-Ddruid.mysql.usePingMethod=false
-Dspring.profiles.active=mysql
2) WorkerServer:
Execute the main method of org.apache.dolphinscheduler.server.worker.WorkerServer in IntelliJ IDEA,
with VM Options:
-Dlogging.config=classpath:logback-spring.xml
-Ddruid.mysql.usePingMethod=false
-Dspring.profiles.active=mysql
3) ApiApplicationServer:
Execute the main method of org.apache.dolphinscheduler.api.ApiApplicationServer in IntelliJ IDEA,
with VM Options:
-Dlogging.config=classpath:logback-spring.xml
-Dspring.profiles.active=api,mysql
After startup, you can browse OpenAPI documentation at:
4) Frontend:
cd dolphinscheduler-ui
pnpm install
pnpm run dev
Error encountered:
qiaozhanwei@ dolphinscheduler-ui % pnpm run dev
> [email protected] dev /Users/qiaozhanwei/IdeaProjects/dolphinscheduler/dolphinscheduler-ui
> vite
error when starting dev server:
Error: listen EADDRNOTAVAIL: address not available 192.168.1.4:5173
at Server.setupListenHandle [as _listen2] (node:net:1313:21)
at listenInCluster (node:net:1378:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1516:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
Code modification:
On Mac, find IP address in terminal using command:
ipconfig getifaddr en0
After finding IP address, locate vite.config.ts file in project and modify as follows:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
//
export default defineConfig({
plugins: [vue()],
base:'/',
server:{
host:'192.168.x.x',
port:'5173',
https:'false',
open:'true',
hmr:{
protocol:'ws',
host:'192.168.x.x'
},
}
})
Login URL:
Use credentials admin/dolphinscheduler123 to login
4. Version 2.x Startup of components
api server:
-Dlogging.config=classpath.logback-api.xml
-Ddruid.mysql.usePingMethod=false
-Dspring.profiles.active="default,api,mysql"
master:
-Dlogging.config=classpath.logback-master.xml
-Ddruid.mysql.usePingMethod=false
-Dspring.profiles.active="default,master,mysql"
worker:
-Dlogging.config=classpath.logback-worker.xml
[Note:The worker configuration appears to be truncated in original text]