Systemd User services not startingWhere is / why is there no log for normal user systemd...
Do any aircraft carry boats?
Does the word “uzi” need to be capitalized?
How can I protect myself in case of a human attack like the murders of the hikers Jespersen and Ueland in Morocco?
Has any object launched from Earth gone into the Sun?
Job offer without any details but asking me to withdraw other applications - is it normal?
What is the use of FullForm in Mathematica?
Sol Ⅲ = Earth: What is the origin of this planetary naming scheme?
Does the mana ability restriction of Pithing Needle refer to the cost or the effect of an activated ability?
What is Japanese Language Stack Exchange called in Japanese?
Is it appropriate for a professor to require students to sign a non-disclosure agreement before being taught?
Why would "an mule" be used instead of "a mule"?
Why is there a が in 深淵に臨むが如し?
Is there a "right" way to interpret a novel? If so, how do we make sure our novel is interpreted correctly?
How can a resurrection system prevent the cheapening of death?
Determining if file in projected or geographic coordinates using ArcGIS Desktop?
Usage of Offrir and Donner
Why are some Mac apps not available on AppStore?
My favorite color is blue what is your favorite color?
Is there a standard terminology for female equivalents of terms such as 'Kingdom' and if so, what are the most common terms?
Is BitLocker useful in the case of stolen laptop?
How do I politely hint customers to leave my store, without pretending to need leave store myself?
Is there a sentence that begins with “them”?
SQL Server table with 4,000,000 rows is 40GB
Georgian capital letter “Ⴒ” (“tar”) in pdfLaTeX
Systemd User services not starting
Where is / why is there no log for normal user systemd services?Automatically enable systemd services installed using deb?Change order of startup services with systemdEnable systemd services without systemctlSystemd user units fail to auto-startHow are PAM sessions applied to systemd user services?systemd: finish the execution of custom shell script before starting nginxHow to wait for docker in systemd user mod?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am trying to get a user service to start at boot.
This is for Tableau on Linux (Ubuntu 19.04 Server, no gui)
Tableau creates a non-admin user to run it's services. and creates a systemd service at
/etc/systemd/system/user@997.service
here it is
[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service
[Service]
LimitNOFILE=131072
LimitNPROC=32768
User=%i
PAMName=systemd-user
Type=notify
PermissionsStartOnly=true
ExecStartPre=/bin/loginctl enable-linger %i
ExecStart=/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=yes
TasksMax=infinity
Restart=always
RestartSec=15
[Install]
WantedBy=default.target
if I just reboot the host and login as an unrelated user, and check the systemctl status user@997.service
I see the problem is clearly with running systemd --user
if I sudo su - tableau
and try it myself, it either complains that there is no /run/user/$(id -u)
directory, that $XDG_RUNTIME_DIR isn't defined, or that it can't slice (I forget which and can't reboot the prod server to check it again right now)
journalctl -xe
reveals additional detail
So, pam_systemd can't see/list /run/user/ID
so it doesn't set $XDG_RUNTIME_DIR
so systemd --user
running as tableau is pissed off, which then causes user@997
service to fail.
If I login at the console to the "tableau" user (ID 997) or even over SSH as it, it seems to create a "login" session instead, and /run/user/997
, and the whole thing goes on down the line with the things being properly filled in and starting. After that, once the /run/user/997
is created and the service tries to load once, the enable-linger
in the user@997
keeps it around fine, and I can log out with no problem and everything stays running fine, as it ought.
My thing is, as far as I can see from documentation (and presumably from Tableau's experience, as their init process set this up by default) this User=997 ; PAMName=systemd-user
should be working. and should be spawning a process as uid 997/tableau through systemd, but for whatever reason, this isn't defining the /run/user/997
area
Once it's got the /run/user/997
dir to find, it quickly loads the services, and then tableau heads off starting it's internal initialization processes
and then user@997
status looks like this
systemd systemd-user
New contributor
add a comment |
I am trying to get a user service to start at boot.
This is for Tableau on Linux (Ubuntu 19.04 Server, no gui)
Tableau creates a non-admin user to run it's services. and creates a systemd service at
/etc/systemd/system/user@997.service
here it is
[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service
[Service]
LimitNOFILE=131072
LimitNPROC=32768
User=%i
PAMName=systemd-user
Type=notify
PermissionsStartOnly=true
ExecStartPre=/bin/loginctl enable-linger %i
ExecStart=/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=yes
TasksMax=infinity
Restart=always
RestartSec=15
[Install]
WantedBy=default.target
if I just reboot the host and login as an unrelated user, and check the systemctl status user@997.service
I see the problem is clearly with running systemd --user
if I sudo su - tableau
and try it myself, it either complains that there is no /run/user/$(id -u)
directory, that $XDG_RUNTIME_DIR isn't defined, or that it can't slice (I forget which and can't reboot the prod server to check it again right now)
journalctl -xe
reveals additional detail
So, pam_systemd can't see/list /run/user/ID
so it doesn't set $XDG_RUNTIME_DIR
so systemd --user
running as tableau is pissed off, which then causes user@997
service to fail.
If I login at the console to the "tableau" user (ID 997) or even over SSH as it, it seems to create a "login" session instead, and /run/user/997
, and the whole thing goes on down the line with the things being properly filled in and starting. After that, once the /run/user/997
is created and the service tries to load once, the enable-linger
in the user@997
keeps it around fine, and I can log out with no problem and everything stays running fine, as it ought.
My thing is, as far as I can see from documentation (and presumably from Tableau's experience, as their init process set this up by default) this User=997 ; PAMName=systemd-user
should be working. and should be spawning a process as uid 997/tableau through systemd, but for whatever reason, this isn't defining the /run/user/997
area
Once it's got the /run/user/997
dir to find, it quickly loads the services, and then tableau heads off starting it's internal initialization processes
and then user@997
status looks like this
systemd systemd-user
New contributor
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago
add a comment |
I am trying to get a user service to start at boot.
This is for Tableau on Linux (Ubuntu 19.04 Server, no gui)
Tableau creates a non-admin user to run it's services. and creates a systemd service at
/etc/systemd/system/user@997.service
here it is
[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service
[Service]
LimitNOFILE=131072
LimitNPROC=32768
User=%i
PAMName=systemd-user
Type=notify
PermissionsStartOnly=true
ExecStartPre=/bin/loginctl enable-linger %i
ExecStart=/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=yes
TasksMax=infinity
Restart=always
RestartSec=15
[Install]
WantedBy=default.target
if I just reboot the host and login as an unrelated user, and check the systemctl status user@997.service
I see the problem is clearly with running systemd --user
if I sudo su - tableau
and try it myself, it either complains that there is no /run/user/$(id -u)
directory, that $XDG_RUNTIME_DIR isn't defined, or that it can't slice (I forget which and can't reboot the prod server to check it again right now)
journalctl -xe
reveals additional detail
So, pam_systemd can't see/list /run/user/ID
so it doesn't set $XDG_RUNTIME_DIR
so systemd --user
running as tableau is pissed off, which then causes user@997
service to fail.
If I login at the console to the "tableau" user (ID 997) or even over SSH as it, it seems to create a "login" session instead, and /run/user/997
, and the whole thing goes on down the line with the things being properly filled in and starting. After that, once the /run/user/997
is created and the service tries to load once, the enable-linger
in the user@997
keeps it around fine, and I can log out with no problem and everything stays running fine, as it ought.
My thing is, as far as I can see from documentation (and presumably from Tableau's experience, as their init process set this up by default) this User=997 ; PAMName=systemd-user
should be working. and should be spawning a process as uid 997/tableau through systemd, but for whatever reason, this isn't defining the /run/user/997
area
Once it's got the /run/user/997
dir to find, it quickly loads the services, and then tableau heads off starting it's internal initialization processes
and then user@997
status looks like this
systemd systemd-user
New contributor
I am trying to get a user service to start at boot.
This is for Tableau on Linux (Ubuntu 19.04 Server, no gui)
Tableau creates a non-admin user to run it's services. and creates a systemd service at
/etc/systemd/system/user@997.service
here it is
[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service
[Service]
LimitNOFILE=131072
LimitNPROC=32768
User=%i
PAMName=systemd-user
Type=notify
PermissionsStartOnly=true
ExecStartPre=/bin/loginctl enable-linger %i
ExecStart=/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=yes
TasksMax=infinity
Restart=always
RestartSec=15
[Install]
WantedBy=default.target
if I just reboot the host and login as an unrelated user, and check the systemctl status user@997.service
I see the problem is clearly with running systemd --user
if I sudo su - tableau
and try it myself, it either complains that there is no /run/user/$(id -u)
directory, that $XDG_RUNTIME_DIR isn't defined, or that it can't slice (I forget which and can't reboot the prod server to check it again right now)
journalctl -xe
reveals additional detail
So, pam_systemd can't see/list /run/user/ID
so it doesn't set $XDG_RUNTIME_DIR
so systemd --user
running as tableau is pissed off, which then causes user@997
service to fail.
If I login at the console to the "tableau" user (ID 997) or even over SSH as it, it seems to create a "login" session instead, and /run/user/997
, and the whole thing goes on down the line with the things being properly filled in and starting. After that, once the /run/user/997
is created and the service tries to load once, the enable-linger
in the user@997
keeps it around fine, and I can log out with no problem and everything stays running fine, as it ought.
My thing is, as far as I can see from documentation (and presumably from Tableau's experience, as their init process set this up by default) this User=997 ; PAMName=systemd-user
should be working. and should be spawning a process as uid 997/tableau through systemd, but for whatever reason, this isn't defining the /run/user/997
area
Once it's got the /run/user/997
dir to find, it quickly loads the services, and then tableau heads off starting it's internal initialization processes
and then user@997
status looks like this
systemd systemd-user
systemd systemd-user
New contributor
New contributor
New contributor
asked 48 mins ago
PsychoDataPsychoData
1011 bronze badge
1011 bronze badge
New contributor
New contributor
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago
add a comment |
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
PsychoData is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f539942%2fsystemd-user-services-not-starting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
PsychoData is a new contributor. Be nice, and check out our Code of Conduct.
PsychoData is a new contributor. Be nice, and check out our Code of Conduct.
PsychoData is a new contributor. Be nice, and check out our Code of Conduct.
PsychoData is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f539942%2fsystemd-user-services-not-starting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please don't post screenshots of text. Copy the actual text here and use code formatting instead.
– muru
20 mins ago