我有一个按需使用的 AWS 实例,我试图启动它并启动 Apache,但出现了这个错误,我查了一下,却无法解决或诊断它
The job identifier is 26531 and the job result is failed.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: Dependency failed for httpd-init.service - One-time temporary TLS key generation for httpd.service.
Subject: A start job for unit httpd-init.service has failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
A start job for unit httpd-init.service has finished with a failure.
The job identifier is 26596 and the job result is dependency.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: httpd-init.service: Job httpd-init.service/start failed with result 'dependency'.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: Dependency failed for php-fpm.service - The PHP FastCGI Process Manager.
Subject: A start job for unit php-fpm.service has failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
A start job for unit php-fpm.service has finished with a failure.
The job identifier is 26597 and the job result is dependency.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: php-fpm.service: Job php-fpm.service/start failed with result 'dependency'.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: Dependency failed for httpd.service - The Apache HTTP Server.
Subject: A start job for unit httpd.service has failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
A start job for unit httpd.service has finished with a failure.
The job identifier is 26519 and the job result is dependency.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal systemd[1]: httpd.service: Job httpd.service/start failed with result 'dependency'.
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal sudo[4084]: pam_unix(sudo:session): session closed for user root
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal audit[4084]: USER_END pid=4084 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=>
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal audit[4084]: CRED_DISP pid=4084 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_e>
Apr 30 19:34:45 ip-172-31-21-205.ec2.internal kernel: EXT4-fs (nvme1n1): VFS: Can't find ext4 filesystem
答案1
事实证明,这是我的错误,/var 被安装在无法访问的设备上,更准确地说,/etc/fstab 中的文件系统格式不正确。
我已更正设备格式,现在 https 和 php-fpm 运行正常