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

"systemctl --user" doesn't work #38421

Closed
andreadna opened this issue Mar 6, 2025 · 4 comments
Closed

"systemctl --user" doesn't work #38421

andreadna opened this issue Mar 6, 2025 · 4 comments

Comments

@andreadna
Copy link

Component(s)

No response

Describe the issue you're reporting

Trying to install and configure systectl --user (without root permission) on Linux server, even if we have followed the instruction on Otel documentation, it doesn't work.
Here the otel.service file:

  [Unit]
  Description=OpenTelemetry Collector Contrib
  After=network.target
  
  [Service]
  EnvironmentFile=/opt/SP/home/otel/config/otel-dc.conf
  ExecStart=/opt/SP/home/otel/otelcol-contrib $OTELCOL_OPTIONS
  KillMode=mixed
  Restart=on-failure
  Type=simple
  
  [Install]
  WantedBy=multi-user.target

Starting the process via systemctl: "systemctl --user start otel", we receive a generic error without any information:
● otel.service - OpenTelemetry Collector Contrib
Loaded: loaded (/opt/SP/home/.config/systemd/user/otel.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-03-06 11:15:02 UTC; 16min ago
Process: 293494 ExecStart=/opt/SP/home/otel/otelcol-contrib $OTELCOL_OPTIONS (code=exited, status=1/FAILURE)
Main PID: 293494 (code=exited, status=1/FAILURE)

Mar 06 11:15:01 systemd[1678]: otel.service: Failed with result 'exit-code'.
Mar 06 11:15:02 systemd[1678]: otel.service: Service RestartSec=100ms expired, scheduling restart.
Mar 06 11:15:02 systemd[1678]: otel.service: Scheduled restart job, restart counter is at 5.
Mar 06 11:15:02 systemd[1678]: Stopped OpenTelemetry Collector Contrib.
Mar 06 11:15:02 systemd[1678]: otel.service: Start request repeated too quickly.
Mar 06 11:15:02 systemd[1678]: otel.service: Failed with result 'exit-code'.
Mar 06 11:15:02 systemd[1678]: Failed to start OpenTelemetry Collector Contrib.

@andreadna andreadna added the needs triage New item requiring triage label Mar 6, 2025
@atoulme
Copy link
Contributor

atoulme commented Mar 8, 2025

Please give us more information to reproduce. A good way to debug this type of issue is to try and run the process outside systemd. Also check journalctl for logs.

@atoulme atoulme added waiting for author and removed needs triage New item requiring triage labels Mar 8, 2025
@andreadna
Copy link
Author

Please give us more information to reproduce. A good way to debug this type of issue is to try and run the process outside systemd. Also check journalctl for logs.

outside systemd it works fine.
from the journal i get the same lines i wrote above

@atoulme
Copy link
Contributor

atoulme commented Mar 11, 2025

That's still not enough to debug, sorry. Please provide a reproducible case.

@andreadna
Copy link
Author

We resolved, even if we put in bash_profile some variables, the process started via systemd doesn't load the environment variables.
we set these variables inside service file and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants