Pastebin
Paste #28708: No description
< previous paste - next paste>
Pasted by Anonymous Coward
########### Creating a systemd service as root (azureuser@podman1) (2025-04-12 07:57:20) [0] ~$ podman container ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES (azureuser@podman1) (2025-04-12 07:57:22) [0] ~$ sudo su - (root@podman1) (2025-04-12 07:57:31) [0] ~# podman container run -d --name www2 -e TZ='Europe/Copenhagen' -p 8082:80 -v /home/azureuser/podman/www:/var/www/html docker.io/ubuntu/apache2:latest Trying to pull docker.io/ubuntu/apache2:latest... Getting image source signatures Copying blob 4dc44e212a77 done Copying blob 742adbd14f98 done Copying blob 7b7f87d905cc done Copying config 547dd497e2 done Writing manifest to image destination Storing signatures 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef (root@podman1) (2025-04-12 07:58:39) [0] ~# ss -tln State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 4096 0.0.0.0:8082 0.0.0.0:* LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* LISTEN 0 100 127.0.0.1:25 0.0.0.0:* LISTEN 0 4096 [::]:5355 [::]:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 100 [::1]:25 [::]:* (root@podman1) (2025-04-12 07:59:01) [0] ~# podman container stop www2 WARN[0010] StopSignal SIGWINCH failed to stop container www2 in 10 seconds, resorting to SIGKILL www2 (root@podman1) (2025-04-12 07:59:42) [0] ~# podman generate systemd www2 # container-48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef.service # autogenerated by Podman 4.3.1 # Sat Apr 12 08:00:14 UTC 2025 [Unit] Description=Podman container-48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=/run/containers/storage [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=70 ExecStart=/usr/bin/podman start 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef ExecStop=/usr/bin/podman stop \ -t 10 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef ExecStopPost=/usr/bin/podman stop \ -t 10 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef PIDFile=/run/containers/storage/overlay-containers/48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef/userdata/conmon.pid Type=forking [Install] WantedBy=default.target (root@podman1) (2025-04-12 08:00:14) [0] ~# podman generate systemd www2 > /etc/systemd/system system/ system.conf (root@podman1) (2025-04-12 08:00:14) [0] ~# podman generate systemd www2 > /etc/systemd/system/www2.service (root@podman1) (2025-04-12 08:00:40) [0] ~# systemctl daemon-reload (root@podman1) (2025-04-12 08:00:51) [0] ~# ss -tln State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* LISTEN 0 100 127.0.0.1:25 0.0.0.0:* LISTEN 0 4096 [::]:5355 [::]:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 100 [::1]:25 [::]:* (root@podman1) (2025-04-12 08:01:06) [0] ~# systemctl enable --now www2 Created symlink /etc/systemd/system/default.target.wants/www2.service → /etc/systemd/system/www2.service. (root@podman1) (2025-04-12 08:01:22) [0] ~# ss -tln State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 4096 0.0.0.0:8082 0.0.0.0:* LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* LISTEN 0 100 127.0.0.1:25 0.0.0.0:* LISTEN 0 4096 [::]:5355 [::]:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 100 [::1]:25 [::]:* (root@podman1) (2025-04-12 08:01:29) [0] ~# systemctl status www2 ● www2.service - Podman container-48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef.service Loaded: loaded (/etc/systemd/system/www2.service; enabled; preset: enabled) Active: active (running) since Sat 2025-04-12 08:01:22 UTC; 15s ago Docs: man:podman-generate-systemd(1) Process: 24658 ExecStart=/usr/bin/podman start 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef (code=exited, status=0/SUCCESS) Main PID: 24718 (conmon) Tasks: 1 (limit: 9455) Memory: 864.0K CPU: 108ms CGroup: /system.slice/www2.service └─24718 /usr/bin/conmon --api-version 1 -c 48b53132bb8d1b515ea5fcdbd58c26fc545b2eee116ffec436c32e974103f4ef -u 48b53132bb8d1b515ea5fcdbd58> Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/Globo-Logo-white.svg HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/Bitmap.png HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/hero%20image.png HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/Bitmap(1).png HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /js/jquery.min.js HTTP/1.1" 200 33766 Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /js/bootstrap.min.js HTTP/1.1" 200 9833 Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/shutterstock_211091626.png HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/Globo-Logo-white-footer.svg HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/G.png HTTP/1.1" 304 - Apr 12 08:01:26 podman1 www2[24718]: 89.150.154.55 - - [12/Apr/2025:10:01:26 +0200] "GET /images/pluralsight-white.png HTTP/1.1" 304 - (root@podman1) (2025-04-12 08:01:42) [0] ~# ########### Creating a systemd service as non-root (azureuser@podman1) (2025-04-12 08:04:28) [0] ~$ podman container ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES (azureuser@podman1) (2025-04-12 08:04:36) [0] ~$ podman container run -d --name www1 -e TZ='Europe/Copenhagen' -p 8081:80 -v /home/azureuser/podman/www:/var/www/html docker.io/ubuntu/apache2:latest02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 (azureuser@podman1) (2025-04-12 08:05:16) [0] ~$ ss -tln State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 4096 0.0.0.0:8082 0.0.0.0:* LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* LISTEN 0 100 127.0.0.1:25 0.0.0.0:* LISTEN 0 4096 [::]:5355 [::]:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 4096 *:8081 *:* LISTEN 0 100 [::1]:25 [::]:* (azureuser@podman1) (2025-04-12 08:05:28) [0] ~$ podman container stop www1 WARN[0010] StopSignal SIGWINCH failed to stop container www1 in 10 seconds, resorting to SIGKILL www1 (azureuser@podman1) (2025-04-12 08:05:48) [0] ~$ (azureuser@podman1) (2025-04-12 08:05:48) [0] ~$ podman generate systemd www1 # container-02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7.service # autogenerated by Podman 4.3.1 # Sat Apr 12 08:06:24 UTC 2025 [Unit] Description=Podman container-02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=/run/user/1000/containers [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=70 ExecStart=/usr/bin/podman start 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 ExecStop=/usr/bin/podman stop \ -t 10 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 ExecStopPost=/usr/bin/podman stop \ -t 10 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 PIDFile=/run/user/1000/containers/vfs-containers/02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7/userdata/conmon.pid Type=forking [Install] WantedBy=default.target (azureuser@podman1) (2025-04-12 08:06:24) [0] ~$ podman generate systemd www1 |sudo tee /etc/systemd/system/www1.service # container-02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7.service # autogenerated by Podman 4.3.1 # Sat Apr 12 08:07:21 UTC 2025 [Unit] Description=Podman container-02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=/run/user/1000/containers [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=70 ExecStart=/usr/bin/podman start 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 ExecStop=/usr/bin/podman stop \ -t 10 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 ExecStopPost=/usr/bin/podman stop \ -t 10 02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7 PIDFile=/run/user/1000/containers/vfs-containers/02846f431260b9f3e4383ad035456de31fd976b59eafe685804c465b0c0200e7/userdata/conmon.pid Type=forking [Install] WantedBy=default.target (azureuser@podman1) (2025-04-12 08:07:57) [0] ~$ sudo systemctl daemon-reload (azureuser@podman1) (2025-04-12 08:08:01) [0] ~$ ss -tln State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 4096 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 4096 0.0.0.0:8082 0.0.0.0:* LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* LISTEN 0 100 127.0.0.1:25 0.0.0.0:* LISTEN 0 4096 [::]:5355 [::]:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 100 [::1]:25 [::]:* (azureuser@podman1) (2025-04-12 08:08:24) [0] ~$ sudo systemctl enable --now www1 Created symlink /etc/systemd/system/default.target.wants/www1.service → /etc/systemd/system/www1.service. Job for www1.service failed because the control process exited with error code. See "systemctl status www1.service" and "journalctl -xeu www1.service" for details.
New Paste
Go to most recent paste.