Mesos Agent持续处于Deactivated状态问题求助
Hey there, let's work through why your Mesos Slave is stuck in the Deactivated state. Based on the cluster setup you described (VMware WorkStation with heron01 as Master/Zookeeper and heron02 as Slave), here are the most common troubleshooting steps to start with:
1. Verify Network Connectivity Between Nodes
First, make sure the two VMs can communicate properly:
- On
heron02, runping 192.168.201.131to check basic connectivity. If this fails, you'll need to fix VMware's network settings first (confirm they're on the same subnet, check firewall rules, etc.). - Test if Mesos ports are reachable:
- Master's default HTTP port is
5050; runtelnet 192.168.201.131 5050ornc -zv 192.168.201.131 5050fromheron02to confirm. - Slave needs to communicate with Master on port
5051too, so test that port as well.
- Master's default HTTP port is
2. Check Zookeeper Configuration Consistency
Mesos relies on Zookeeper for service discovery—any mismatch here will break slave registration:
- Open
mesos-master-env.shonheron01and look for theMESOS_ZKparameter. It should look something likezk://192.168.201.131:2181/mesos. - Now check
mesos-slave-env.shandmesos-agent-env.shonheron02: theirMESOS_ZKvalue must be exactly the same as the master's. Even a typo in the IP or port will prevent the slave from finding the master.
3. Validate Slave Resource Configuration
Sometimes slaves get deactivated if their declared resources don't match the actual system capacity:
- Check the
MESOS_CPUS,MESOS_MEM,MESOS_DISKparameters in your slave config files. Make sure these values don't exceed the actual CPU cores, memory, or disk space available onheron02. - Run
free -handlscpuonheron02to verify the real system resources.
4. Ensure Correct File Permissions
Mesos processes (usually running as the mesos user) need read access to their config files:
- Run these commands on each node to check permissions:
ls -l /etc/mesos/mesos-master-env.sh # On heron01 ls -l /etc/mesos/mesos-slave-env.sh # On heron02 ls -l /etc/mesos/mesos-agent-env.sh # On heron02
If the owner isn't mesos:mesos, fix it with chown mesos:mesos /path/to/config/file.
5. Analyze Logs (Critical Next Step)
Since you mentioned the Master error logs and Slave warning logs are pending, once you have those, look for these key messages:
- Master logs: Search for lines like
Failed to register slaveor errors related to authentication/authorization if you have that enabled. - Slave logs: Look for warnings like
Could not connect to masterorFailed to connect to Zookeeper—these will point directly to connectivity or config issues.
Once you run through these checks and share the full log snippets or relevant config parts, we can narrow down the exact cause.
内容的提问来源于stack exchange,提问作者Yitian Zhang

