etcd.service: main process exited, code=exited, status=203/EXEC

简介: etcd.service: main process exited, code=exited, status=203/EXEC

部署ETCD异常解决

# 查看日志
[root@m2 pki]#  journalctl -xe
 
 
-- Subject: Unit etcd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit etcd.service has failed.
-- 
-- The result is failed.
7月 24 11:50:23 m2 systemd[1]: Unit etcd.service entered failed state.
7月 24 11:50:23 m2 systemd[1]: etcd.service failed.
7月 24 11:50:28 m2 systemd[1]: etcd.service holdoff time over, scheduling restart.
7月 24 11:50:28 m2 systemd[1]: Stopped Etcd Server.
-- Subject: Unit etcd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit etcd.service has finished shutting down.
7月 24 11:50:28 m2 systemd[1]: Starting Etcd Server...
-- Subject: Unit etcd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit etcd.service has begun starting up.
7月 24 11:50:28 m2 systemd[22353]: Failed at step CHDIR spawning /usr/local/bin/etcd: No such file or directory
-- Subject: Process /usr/local/bin/etcd could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /usr/local/bin/etcd could not be executed and failed.
-- 
-- The error number returned by this process is 2.
7月 24 11:50:28 m2 systemd[1]: etcd.service: main process exited, code=exited, status=200/CHDIR
7月 24 11:50:28 m2 systemd[1]: Failed to start Etcd Server.
-- Subject: Unit etcd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit etcd.service has failed.
-- 
-- The result is failed.
7月 24 11:50:28 m2 systemd[1]: Unit etcd.service entered failed state.
7月 24 11:50:28 m2 systemd[1]: etcd.service failed.

问题描述:

Oct 13 20:01:08 c_3.50 systemd[1]: Started etcd.

Oct 13 20:01:08 c_3.50 systemd[1]: Starting etcd...

Oct 13 20:01:08 c_3.50 systemd[1]: etcd.service: main process exited, code=exited, status=203/EXEC  //203不能执行

Oct 13 20:01:08 c_3.50 systemd[1]: Unit etcd.service entered failed state.

Oct 13 20:01:08 c_3.50 systemd[1]: etcd.service failed.

问题解决:

01、查看exe执行在配置的路径中存在不

02、脚本是否加#!/bin/bash

注意:截图中的环境变量不允许${},必须用实体替换或者写到EnvironmentFile中

Oct 13 20:15:08 c_3.50 systemd[1]: Started etcd.

Oct 13 20:15:08 c_3.50 systemd[1]: Starting etcd...

Oct 13 20:15:08 c_3.50 systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE  //环境变量设置异常

Oct 13 20:15:08 c_3.50 systemd[1]: Unit etcd.service entered failed state.

Oct 13 20:15:08 c_3.50 systemd[1]: etcd.service failed.

相关文章
|
9月前
|
监控 Linux
Linux systemd 服务启动失败Main process exited, code=exited, status=203/EXEC
通过以上步骤,可以有效解决 systemd 服务启动失败并报错 `Main process exited, code=exited, status=203/EXEC` 的问题。关键在于仔细检查单元文件配置、验证可执行文件的有效性,并通过日志分析具体错误原因。确保可执行文件路径正确、文件具有执行权限,并且可以独立运行,将有助于快速定位和解决问题。
3965 7
|
存储 数据安全/隐私保护 Docker
Kolla-ansible部署openStack
Kolla-ansible部署openStack
1382 11
|
Docker 容器
Docker 启动失败 (code=exited, status=1/FAILURE)错误解决办法
Docker 启动失败 (code=exited, status=1/FAILURE)错误解决办法
2275 1
|
机器人 Linux API
基于Ollama+AnythingLLM轻松打造本地大模型知识库
Ollama是开源工具,简化了在本地运行大型语言模型(ile优化模型运行,支持GPU使用和热加载。它轻量、易用,可在Mac和Linux上通过Docker快速部署。AnythingLLM是Mintplex Labs的文档聊天机器人,支持多用户、多种文档格式,提供对话和查询模式,内置向量数据库,可高效管理大模型和文档。它也是开源的,能与Ollama结合使用,提供安全、低成本的LLM体验。这两款工具旨在促进本地高效利用和管理LLMs。
155531 32
|
Ubuntu 网络协议 关系型数据库
|
安全 UED
麒麟的版本 V10 (Lance) V10 (Tercel) 有什么区别
【6月更文挑战第26天】麒麟的版本 V10 (Lance) V10 (Tercel) 有什么区别
10099 2
|
Kubernetes Perl 容器
在 Kubernetes 中重启 pod 的 3 种方法
【4月更文挑战第25天】
8392 1
在 Kubernetes 中重启 pod 的 3 种方法
|
安全 网络安全 数据安全/隐私保护
/etc/ssh/sshd_config line 142: Deprecated option RSAAuthentication 是什么
【5月更文挑战第6天】/etc/ssh/sshd_config line 142: Deprecated option RSAAuthentication 是什么
3233 4
|
域名解析 关系型数据库 MySQL
mysql中出现Unit mysql.service could not be found 的解决方法
mysql中出现Unit mysql.service could not be found 的解决方法
6859 1
|
Docker 容器
『Docker Compose』使用国内镜像极速安装Docker Compose
📣读完这篇文章里你能收获到 - 使用国内镜像极速安装Docker Compose
21234 0
『Docker Compose』使用国内镜像极速安装Docker Compose