Closed dbrownecu closed 2 years ago
Runs without a problem as root or a non privileged user. Fails when started with systemd. with the command
env Linux giga 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxetcd --version etcd Version: 3.5.0 Git SHA: 946a5a6f2 Go Version: go1.17 Go OS/Arch: linux/amd64
Config file: etcd.conf.yml
This is the configuration file for the etcd server.
name: 'etcdgiga1'
data-dir: /mnt/space1/etcd/data/
wal-dir: /mnt/space1/etcd/wal/
snapshot-count: 10000
heartbeat-interval: 100
election-timeout: 1000
quota-backend-bytes: 268435456
listen-peer-urls: http://localhost:2380
listen-client-urls: http://localhost:2379
max-snapshots: 5
max-wals: 5
enable-v2: true
enable-pprof: true
proxy: 'off'
client-transport-security:
cert-file:
key-file:
client-cert-auth: false
trusted-ca-file:
auto-tls: false
/etc/etcd.conf: SELF_IP=223.224.244.20
etcd.service file: [Unit] Description=etcd Documentation=https://github.com/coreos/etcd Conflicts=etcd.service Conflicts=etcd2.service
[Service] Type=notify Restart=always RestartSec=25s LimitNOFILE=40000 TimeoutStartSec=60s TimeoutStartUSec=3min TimeoutStopUsec=infinity EnvironmentFile=/etc/etcd.conf ExecStart=/bin/sh -c "/usr/bin/etcd --config-file /etc/etcd.conf.yml"
[Install] WantedBy=multi-user.target
root@giga:/etc/systemd/system# systemctl status etcd3.service ● etcd3.service - etcd Loaded: loaded (/etc/systemd/system/etcd3.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: timeout) since Wed 2021-12-08 16:26:42 MST; 9s ago Docs: https://github.com/coreos/etcd Process: 20145 ExecStart=/bin/sh -c /usr/bin/etcd --config-file /etc/etcd.conf.yml (code=killed, signal=TERM) Main PID: 20145 (code=killed, signal=TERM) CPU: 626ms root@giga:/etc/systemd/system# journalctl -xeu etcd3.service Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.486-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.487-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":300,"term":150,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.487-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":400,"term":200,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2183","msg":"applyEntryNormal","V2request":"ID:7587859056425287682 Met> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.489-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":500,"term":250,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.489-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d is starting a new electio> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became pre-candidate at t> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d received MsgPreVoteResp f> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became candidate at term > Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d received MsgVoteResp from> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became leader at term 288> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"raft.node: 8e9e05c52164694d elected leader> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.924-0700","caller":"etcdserver/server.go:2107","msg":"Applying entries","num-entries":2} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","caller":"etcdserver/server.go:2027","msg":"published local member to cluster through raft","local-mem> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","caller":"embed/serve.go:98","msg":"ready to serve client requests"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.925-0700","caller":"etcdmain/main.go:47","msg":"notifying init daemon"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.925-0700","caller":"etcdmain/main.go:53","msg":"successfully notified init daemon"} Dec 08 16:27:07 giga systemd[1]: etcd3.service: Got notification message from PID 20210, but reception only permitted for main PID 20209 Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] parsed scheme: \"\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] scheme \"\" not registered, fallback to default scheme> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] ccResolverWrapper: sending update to cc: {[{localhost:> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] ClientConn switching balancer to \"pick_first\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel switches to new LB policy \"pick_first\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel Connectivity change to CONNECTING"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"embed/serve.go:140","msg":"serving client traffic insecurely; this is strongly discouraged!"> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] pickfirstBalancer: UpdateSubConnState: 0xc0007e33b0, {> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel picks a new address \"localhost:2379\" to c> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel Connectivity change to CONNECTING"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel Connectivity change to READY"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] pickfirstBalancer: UpdateSubConnState: 0xc0007e33b0, {> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel Connectivity change to READY"}
Used example systemd service file Sorry for the inconvenicence
Runs without a problem as root or a non privileged user. Fails when started with systemd. with the command
env Linux giga 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxetcd --version etcd Version: 3.5.0 Git SHA: 946a5a6f2 Go Version: go1.17 Go OS/Arch: linux/amd64
Config file: etcd.conf.yml
This is the configuration file for the etcd server.
curl https://discovery.etcd.io/new?size=3
Human-readable name for this member.
name: 'etcdgiga1'
Path to the data directory.
data-dir: /mnt/space1/etcd/data/
Path to the dedicated wal directory.
wal-dir: /mnt/space1/etcd/wal/
Number of committed transactions to trigger a snapshot to disk.
snapshot-count: 10000
Time (in milliseconds) of a heartbeat interval.
heartbeat-interval: 100
Time (in milliseconds) for an election to timeout.
election-timeout: 1000
Raise alarms when backend size exceeds the given quota. 0 means use the
default quota.
quota-backend-bytes: 268435456
List of comma separated URLs to listen on for peer traffic.
listen-peer-urls: http://localhost:2380
List of comma separated URLs to listen on for client traffic.
listen-client-urls: http://localhost:2379
Maximum number of snapshot files to retain (0 is unlimited).
max-snapshots: 5
Maximum number of wal files to retain (0 is unlimited).
max-wals: 5
Comma-separated white list of origins for CORS (cross-origin resource sharing).
cors:
List of this member's peer URLs to advertise to the rest of the cluster.
The URLs needed to be a comma-separated list.
initial-advertise-peer-urls: http://localhost:2380
List of this member's client URLs to advertise to the public.
The URLs needed to be a comma-separated list.
advertise-client-urls: http://localhost:2379
Discovery URL used to bootstrap the cluster.
discovery: https://discovery.etcd.io/57da0e62c41b6d6e62ce6da5b17b9083
Valid values include 'exit', 'proxy'
discovery-fallback: 'exit'
HTTP proxy to use for traffic to discovery service.
discovery-proxy:
DNS domain used to bootstrap initial cluster.
discovery-srv:
Initial cluster configuration for bootstrapping.
initial-cluster:
Initial cluster token for the etcd cluster during bootstrap.
initial-cluster-token: 'etcd-cluster'
Initial cluster state ('new' or 'existing').
initial-cluster-state: 'new'
Reject reconfiguration requests that would cause quorum loss.
strict-reconfig-check: false
Accept etcd V2 client requests
enable-v2: true
Enable runtime profiling data via HTTP server
enable-pprof: true
Valid values include 'on', 'readonly', 'off'
proxy: 'off'
Time (in milliseconds) an endpoint will be held in a failed state.
proxy-failure-wait: 5000
Time (in milliseconds) of the endpoints refresh interval.
proxy-refresh-interval: 30000
Time (in milliseconds) for a dial to timeout.
proxy-dial-timeout: 1000
Time (in milliseconds) for a write to timeout.
proxy-write-timeout: 5000
Time (in milliseconds) for a read to timeout.
proxy-read-timeout: 1000
client-transport-security:
Path to the client server TLS cert file.
cert-file:
Path to the client server TLS key file.
key-file:
Enable client cert authentication.
client-cert-auth: false
Path to the client server TLS trusted CA cert file.
trusted-ca-file:
Client TLS using generated certificates
auto-tls: false
/etc/etcd.conf: SELF_IP=223.224.244.20
etcd.service file: [Unit] Description=etcd Documentation=https://github.com/coreos/etcd Conflicts=etcd.service Conflicts=etcd2.service
[Service] Type=notify Restart=always RestartSec=25s LimitNOFILE=40000 TimeoutStartSec=60s TimeoutStartUSec=3min TimeoutStopUsec=infinity EnvironmentFile=/etc/etcd.conf ExecStart=/bin/sh -c "/usr/bin/etcd --config-file /etc/etcd.conf.yml"
[Install] WantedBy=multi-user.target
root@giga:/etc/systemd/system# systemctl status etcd3.service ● etcd3.service - etcd Loaded: loaded (/etc/systemd/system/etcd3.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: timeout) since Wed 2021-12-08 16:26:42 MST; 9s ago Docs: https://github.com/coreos/etcd Process: 20145 ExecStart=/bin/sh -c /usr/bin/etcd --config-file /etc/etcd.conf.yml (code=killed, signal=TERM) Main PID: 20145 (code=killed, signal=TERM) CPU: 626ms root@giga:/etc/systemd/system# journalctl -xeu etcd3.service Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.486-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.487-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":300,"term":150,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.487-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":400,"term":200,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2183","msg":"applyEntryNormal","V2request":"ID:7587859056425287682 Met> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.488-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.489-0700","caller":"etcdserver/server.go:2110","msg":"Applying entry","index":500,"term":250,"type":"EntryNorma> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.489-0700","caller":"etcdserver/server.go:2160","msg":"apply entry normal","consistent-index":575,"entry-index":> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d is starting a new electio> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became pre-candidate at t> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.923-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d received MsgPreVoteResp f> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became candidate at term > Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d received MsgVoteResp from> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"8e9e05c52164694d became leader at term 288> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"raft.node: 8e9e05c52164694d elected leader> Dec 08 16:27:07 giga sh[20210]: {"level":"debug","ts":"2021-12-08T16:27:07.924-0700","caller":"etcdserver/server.go:2107","msg":"Applying entries","num-entries":2} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","caller":"etcdserver/server.go:2027","msg":"published local member to cluster through raft","local-mem> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.924-0700","caller":"embed/serve.go:98","msg":"ready to serve client requests"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.925-0700","caller":"etcdmain/main.go:47","msg":"notifying init daemon"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.925-0700","caller":"etcdmain/main.go:53","msg":"successfully notified init daemon"} Dec 08 16:27:07 giga systemd[1]: etcd3.service: Got notification message from PID 20210, but reception only permitted for main PID 20209 Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] parsed scheme: \"\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] scheme \"\" not registered, fallback to default scheme> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] ccResolverWrapper: sending update to cc: {[{localhost:> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] ClientConn switching balancer to \"pick_first\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel switches to new LB policy \"pick_first\""} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel Connectivity change to CONNECTING"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"embed/serve.go:140","msg":"serving client traffic insecurely; this is strongly discouraged!"> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] pickfirstBalancer: UpdateSubConnState: 0xc0007e33b0, {> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel picks a new address \"localhost:2379\" to c> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.926-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel Connectivity change to CONNECTING"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Subchannel Connectivity change to READY"} Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] pickfirstBalancer: UpdateSubConnState: 0xc0007e33b0, {> Dec 08 16:27:07 giga sh[20210]: {"level":"info","ts":"2021-12-08T16:27:07.928-0700","caller":"zapgrpc/zapgrpc.go:174","msg":"[core] Channel Connectivity change to READY"}