Failed to connect to bus: No such file or directory Error in autostarting a Rootless container

Latest response

Hello Community,

I’ve this issue while configuring rootless container.
I can check the autogenerated service file content. But, when I run the command (systemctl —user daemon-reload) to update for new service,
I got this error (failed to connect to bus: no such file or directory error).

[conusr1@server20 ~]$ mkdir ~/.config/systemd/user -p
[conusr1@server20 ~]$ podman run -dt —name rootless-container ubi8
[conusr1@server20 ~]$ podman ps
df25….. registry.access.red…… /bin/bash 10 seconds ago Up 10 seconds ago rootless-container
[conusr1@server20 ~]$ podman generate systems —new —name rootless-container > ~/.config/systemd/user/rootless-container.service
[conusr1@server20 ~]$ cat ~/.config/systemd/user/rootless-container.service
[Unit]
Description=Podman….
Doc…
[Service]
Enviornment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
ExecStartPre=/bin/rm -f %t/container-rootless-container.pid %t/container-rootless-….

[Install]
……
[conusr1@server20 ~]$ podman stop rootless-container
df25…..
[conusr1@server20 ~]$ podman rm rootless-container
df25…..
[conusr1@server20 ~]$ podman ps -a
[conusr1@server20 ~]$ systemctl —user daemon-reload
Failed to connect to bus: No such file or directory
[conusr1@server20 ~]$ systemctl enable —now rootless-container.service
Failed to enable unit: Unit file rootless-container.service does not exist.

Thank you in advance.

Attachments

Responses