PROCESS EXITED WITH ERROR CODE ON CENTOS 8 and PODMAN

Issues related to applications and software problems and general support
Post Reply
patridas
Posts: 2
Joined: 2020/11/20 17:13:25

PROCESS EXITED WITH ERROR CODE ON CENTOS 8 and PODMAN

Post by patridas » 2020/11/20 17:36:59

Hello everyone,
I am learning how to create a rootless service on centos 8 with Podman tools, but for some reason, it failed to and notice me that the control process exited with error code. I display in color the errors I got during my practice.
I will happy with helpful link or tutorial.

Last login: Tue Nov 10 06:16:04 2020 from 192.168.1.6
[student@server2 ~]$ ls -l apache/
total 0
drwxrwxrwx. 2 student student 24 Nov 20 11:49 html
[student@server2 ~]$ podman login registry.redhat.io
Username: patridas
Password:
Login Succeeded!
[student@server2 ~]$ skopeo inspect docker://registry.redhat.io/rhel8/httpd-24:1-105
{
"Name": "registry.redhat.io/rhel8/httpd-24",
"Digest": "sha256:de1e538dfc42fb511601461193d6a60d491c0a6b0bf70cac1b1059b4d80a4603",
"RepoTags": [
"1-112",
"1-118",
"1-118-source",
"1-70",
"1-30.1562749848",
"1-76",
"1-52",
"1-42",
"1-30",
"1",
"1-76.1584015406",
"1-98",
"1-112.1599745027",
"1-92",
"1-104",
"1-105",
"1-60",
"1-63",
"1-92.1590691900",
"1-30.1561731107",
"1-28",
"1-25",
"1-89",
"latest"
],
"Created": "2020-07-22T16:06:53.911588Z",
"DockerVersion": "1.13.1",
"Labels": {
"architecture": "x86_64",
"build-date": "2020-07-22T16:05:44.186991",
"com.redhat.build-host": "cpt-1004.osbs.prod.upshift.rdu2.redhat.com",
"com.redhat.component": "httpd-24-container",
"com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat ... ments#rhel",
"description": "Apache httpd 2.4 available as container, is a powerful, efficient, and extensible web server. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Virtual hosting allows one Apache installation to serve many different Web sites.",
"distribution-scope": "public",
"io.k8s.description": "Apache httpd 2.4 available as container, is a powerful, efficient, and extensible web server. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Virtual hosting allows one Apache installation to serve many different Web sites.",
"io.k8s.display-name": "Apache httpd 2.4",
"io.openshift.expose-services": "8080:http,8443:https",
"io.openshift.s2i.scripts-url": "image:///usr/libexec/s2i",
"io.openshift.tags": "builder,httpd,httpd-24",
"io.s2i.scripts-url": "image:///usr/libexec/s2i",
"maintainer": "SoftwareCollections.org \u003csclorg@redhat.com\u003e",
"name": "rhel8/httpd-24",
"release": "105",
"summary": "Platform for running Apache httpd 2.4 or building httpd-based application",
"url": "https://access.redhat.com/containers/#/ ... ages/1-105",
"usage": "s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ rhel8/httpd-24 sample-server",
"vcs-ref": "62b97d7356d1cb15e71fdd3c7bb3fb49e37ae754",
"vcs-type": "git",
"vendor": "Red Hat, Inc.",
"version": "1"
},
"Architecture": "amd64",
"Os": "linux",
"Layers": [
"sha256:77c58f19bd6e67185938abb6bbb6ec229e07a5e607453904294d982de141d2f0",
"sha256:47db82df7f3f4393c1f19c362a2db2c47ca049b6fb20bef041dfc9bdb12a4504",
"sha256:71391dc11a78542160544b68e45bc123ff55a2e84aeb6fa99b672d75765bc2f8",
"sha256:9d20433efa0ca8ff38d003ddbdee872fdf5bf18bba1a761547f7497a8c0b66bb"
],
"Env": [
"PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container=oci",
"SUMMARY=Platform for running Apache httpd 2.4 or building httpd-based application",
"DESCRIPTION=Apache httpd 2.4 available as container, is a powerful, efficient, and extensible web server. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Virtual hosting allows one Apache installation to serve many different Web sites.",
"STI_SCRIPTS_URL=image:///usr/libexec/s2i",
"STI_SCRIPTS_PATH=/usr/libexec/s2i",
"APP_ROOT=/opt/app-root",
"HOME=/opt/app-root/src",
"PLATFORM=el8",
"HTTPD_VERSION=2.4",
"HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/",
"HTTPD_APP_ROOT=/opt/app-root",
"HTTPD_CONFIGURATION_PATH=/opt/app-root/etc/httpd.d",
"HTTPD_MAIN_CONF_PATH=/etc/httpd/conf",
"HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d",
"HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d",
"HTTPD_TLS_CERT_PATH=/etc/httpd/tls",
"HTTPD_VAR_RUN=/var/run/httpd",
"HTTPD_DATA_PATH=/var/www",
"HTTPD_DATA_ORIG_PATH=/var/www",
"HTTPD_LOG_PATH=/var/log/httpd"
]
}
[student@server2 ~]$ podman run --n
--name --network --no-hosts
[student@server2 ~]$ podman run --name website -p 8080:8080 -v ^C
[student@server2 ~]$ cd apache/html/
[student@server2 html]$ cd
[student@server2 ~]$ ls -ld apache/
drwxrwxrwx. 3 student student 18 Nov 20 11:49 apache/
[student@server2 ~]$ ll -d apache/html/
drwxrwxrwx. 2 student student 24 Nov 20 11:49 apache/html/
[student@server2 ~]$ ll apache/html/index.html
-rwxrwxrwx. 1 student student 26 Nov 9 22:14 apache/html/index.html
[student@server2 ~]$ podman run -d --name website -p 8080:8080 -v /home/student/apache/html/:/var/www:Z -e HTTPD_MPM=event registry.redhat.io/rhel8/httpd-24:1-105
Trying to pull registry.redhat.io/rhel8/httpd-24:1-105...
Getting image source signatures
Copying blob 47db82df7f3f done
Copying blob 9d20433efa0c done
Copying blob 77c58f19bd6e done
Copying blob 71391dc11a78 done
Copying config 7e93f25a94 done
Writing manifest to image destination
Storing signatures
573a1ca7e555a1a12366b26c4b0c5d75a0196b2b59859e7724e219725b97899d
[student@server2 ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[student@server2 ~]$ podman images --all
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.redhat.io/rhel8/httpd-24 1-105 7e93f25a9468 4 months ago 430 MB
[student@server2 ~]$ pwd
/home/student
[student@server2 ~]$ cd .config/systemd/user/
[student@server2 user]$ podman generate systemd --name website --files --new
Error: unknown flag: --new

[student@server2 user]$ podman generate systemd --name website --files
/home/student/.config/systemd/user/container-website.service
[student@server2 user]$ podman stop website
573a1ca7e555a1a12366b26c4b0c5d75a0196b2b59859e7724e219725b97899d
[student@server2 user]$ podman rmi website
Error: unable to find a name and tag match for website in repotags: no such image
[student@server2 user]$ podman rm website
573a1ca7e555a1a12366b26c4b0c5d75a0196b2b59859e7724e219725b97899d
[student@server2 user]$ systemctl --user daemon-reload
[student@server2 user]$ systemctl --user enable --now container-website.service
Created symlink /home/student/.config/systemd/user/multi-user.target.wants/container-website.service → /home/student/.config/systemd/user/container-website.service.
Job for container-website.service failed because the control process exited with error code.
See "systemctl --user status container-website.service" and "journalctl --user -xe" for details.
[student@server2 user]$ loginctl enable-linger
[student@server2 user]$

pjsr2
Posts: 526
Joined: 2014/03/27 20:11:07

Re: PROCESS EXITED WITH ERROR CODE ON CENTOS 8 and PODMAN

Post by pjsr2 » 2020/11/20 18:48:16

See "systemctl --user status container-website.service" and "journalctl --user -xe" for details.
And now we are all curious what you did see ...

patridas
Posts: 2
Joined: 2020/11/20 17:13:25

Re: PROCESS EXITED WITH ERROR CODE ON CENTOS 8 and PODMAN

Post by patridas » 2020/11/20 21:48:47

Thank you for replying to me. I got this

[student@server2 ~]$ systemctl --user status container-website.service
● container-website.service - Podman container-website.service
Loaded: loaded (/home/student/.config/systemd/user/container-website.service; e>
Active: inactive (dead)
Docs: man:podman-generate-systemd(1)
[student@server2 ~]$ systemctl --user start container-website.service
Job for container-website.service failed because the control process exited with error code.
See "systemctl --user status container-website.service" and "journalctl --user -xe" for details.
[student@server2 ~]$ journalctl --user -xe
No journal files were found.
~

~
I also cat the content of the service file that I generated and I got this


[student@server2 ~]$ cat .config/systemd/user/container-website.service
# container-website.service
# autogenerated by Podman 1.6.4
# Fri Nov 20 12:02:47 EST 2020

[Unit]
Description=Podman container-website.service
Documentation=man:podman-generate-systemd(1)

[Service]
Restart=on-failure
ExecStart=/usr/bin/podman start website
ExecStop=/usr/bin/podman stop -t 10 website
KillMode=none
Type=forking
PIDFile=/run/user/1000/overlay-containers/573a1ca7e555a1a12366b26c4b0c5d75a0196b2b59859e7724e219725b97899d/userdata/conmon.pid

[Install]
WantedBy=multi-user.target
[student@server2 ~]$

Post Reply

Return to “CentOS 8 - General Support”