Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to start up universal-cp with systemd #10217

Closed
Icarus9913 opened this issue May 13, 2024 · 2 comments
Closed

failed to start up universal-cp with systemd #10217

Icarus9913 opened this issue May 13, 2024 · 2 comments
Labels
kind/bug A bug triage/needs-information Reviewed and some extra information was asked to the reporter

Comments

@Icarus9913
Copy link
Contributor

What happened?

version: 2.7.1
deploy-mode: universal

Steps:

kuma-universal.service

[Unit]
Description=Kuma universal zone
Documentation=nothing
Wants=network-online.target
After=network-online.target

[Service]
EnvironmentFile=/usr/lib/systemd/kuma-universal.conf
ExecStart=/root/install-kuma/kuma-2.7.1/bin/kuma-cp run
Restart=no
RestartSec=10

[Install]
WantedBy=multi-user.target

kuma-universal.conf

KUMA_MODE=zone
KUMA_MULTIZONE_ZONE_NAME=zone-universal
KUMA_ENVIRONMENT=universal
KUMA_STORE_TYPE=postgres
KUMA_STORE_POSTGRES_HOST=localhost
KUMA_STORE_POSTGRES_PORT=???
KUMA_STORE_POSTGRES_USER=????
KUMA_STORE_POSTGRES_PASSWORD=????
KUMA_STORE_POSTGRES_DB_NAME=kuma_zone_universal
KUMA_MULTIZONE_ZONE_GLOBAL_ADDRESS=????
KUMA_MULTIZONE_ZONE_KDS_TLS_SKIP_VERIFY=true

Error

× kuma-universal.service - Kuma universal zone
     Loaded: loaded (/etc/systemd/system/kuma-universal.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-05-13 03:18:25 UTC; 28s ago
   Duration: 101ms
    Process: 2232 ExecStart=/root/install-kuma/kuma-2.7.1/bin/kuma-cp run (code=exited, status=1/FAILURE)
   Main PID: 2232 (code=exited, status=1/FAILURE)
        CPU: 78ms

May 13 03:18:25 icarus-zone-universal systemd[1]: kuma-universal.service: Deactivated successfully.
May 13 03:18:25 icarus-zone-universal systemd[1]: Stopped kuma-universal.service - Kuma universal zone.
May 13 03:18:25 icarus-zone-universal systemd[1]: Started kuma-universal.service - Kuma universal zone.
May 13 03:18:25 icarus-zone-universal kuma-cp[2232]: 2024-05-13T03:18:25.934Z        INFO        config        skipping reading config from file
May 13 03:18:25 icarus-zone-universal kuma-cp[2232]: 2024-05-13T03:18:25.936Z        ERROR        kuma-cp.run        unable to set up Control Plane runtime        {"error": "failed to create a working directory inside $HOME: $HOME is not defined, please pick a working directory by setting KUMA_GENERAL_WORK_DIR manually", "errorVerbose": "failed to create a working directory i>
May 13 03:18:25 icarus-zone-universal kuma-cp[2232]: Error: failed to create a working directory inside $HOME: $HOME is not defined, please pick a working directory by setting KUMA_GENERAL_WORK_DIR manually
May 13 03:18:25 icarus-zone-universal systemd[1]: kuma-universal.service: Main process exited, code=exited, status=1/FAILURE
May 13 03:18:25 icarus-zone-universal systemd[1]: kuma-universal.service: Failed with result 'exit-code'.

Once I add the ENV HOME=/root, it ran well.
I think we shouldn't rely on HOME for this.

@Icarus9913 Icarus9913 added kind/bug A bug triage/pending This issue will be looked at on the next triage meeting labels May 13, 2024
@jakubdyszkiewicz
Copy link
Contributor

Did you try using systemd definition from docs https://kuma.io/docs/2.7.x/production/cp-deployment/systemd/#systemd ? Is it the same problem?

@jakubdyszkiewicz jakubdyszkiewicz added triage/needs-information Reviewed and some extra information was asked to the reporter and removed triage/pending This issue will be looked at on the next triage meeting labels May 13, 2024
@Icarus9913
Copy link
Contributor Author

https://kuma.io/docs/2.7.x/production/cp-deployment/systemd/#systemd

With this document instruction, it works.
Thank you Jackub :)

@lahabana lahabana closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/needs-information Reviewed and some extra information was asked to the reporter
Projects
None yet
Development

No branches or pull requests

3 participants