Skip to content

Bitnami.service is getting failed due to php-fpm

0

Hi All,

I have created an instance on LightSail with Bitnami+NGINX+PHP/Laravel, it was working fine but when I installed SSL letsencript and configured my application to point the correct certificates (.crt, & .key) files and restarting the services, I am getting below errors, I did lots of investigations but could not resolved this issue. One point, I observed that www.sock file was available before the SSL in bolder var/run, which was point to CGI as fastcgi_pass unix:/opt/bitnami/php/var/run/www.sock;

After SSL installation a new folder with name session created. Please help me to resolve this issue.

Belows are the errors:

sudo /opt/bitnami/ctlscript.sh restart
Restarting services..
Job for bitnami.service failed because the control process exited with error code.
See "systemctl status bitnami.service" and "journalctl -xeu bitnami.service" for details.
bitnami@ip-172-26-0-107:/opt/bitnami/php/etc/php-fpm.d$ journalctl -xeu bitnami.service

 journalctl -xeu bitnami.service
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit bitnami.service has begun execution.
░░
░░ The job identifier is 2591.
Oct 06 13:09:20 ip-172-26-0-107 bitnami[735904]: ## 2024-10-06 13:09:20+00:00 ## INFO ## Running /opt/bitnami/var/init/pre-start/010_hostname...
Oct 06 13:09:20 ip-172-26-0-107 bitnami[735904]: ## 2024-10-06 13:09:20+00:00 ## INFO ## Running /opt/bitnami/var/init/pre-start/020_swap_file...
Oct 06 13:09:20 ip-172-26-0-107 bitnami[735904]: ## 2024-10-06 13:09:20+00:00 ## INFO ## Running /opt/bitnami/var/init/pre-start/030_get_default_passwords...
Oct 06 13:09:20 ip-172-26-0-107 bitnami[735900]: ## 2024-10-06 13:09:20+00:00 ## INFO ## Starting services...
Oct 06 13:09:20 ip-172-26-0-107 bitnami[735959]: 2024-10-06T13:09:20.981Z - info: Saving configuration info to disk
Oct 06 13:09:21 ip-172-26-0-107 bitnami[735959]: 2024-10-06T13:09:21.307Z - info: Skipping service start operation for varnish
Oct 06 13:09:21 ip-172-26-0-107 bitnami[735959]: 2024-10-06T13:09:21.308Z - info: Performing service start operation for php
Oct 06 13:10:21 ip-172-26-0-107 bitnami[735959]: php 13:10:21.55 ERROR ==> php-fpm did not start
Oct 06 13:10:21 ip-172-26-0-107 bitnami[735959]: 2024-10-06T13:10:21.563Z - error: Unable to perform start operation Export start for php failed with exit c>
Oct 06 13:10:21 ip-172-26-0-107 bitnami[736273]: ## 2024-10-06 13:10:21+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010_bitnami_agent_extra...
Oct 06 13:10:21 ip-172-26-0-107 bitnami[736273]: ## 2024-10-06 13:10:21+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami_agent...
Oct 06 13:10:21 ip-172-26-0-107 bitnami[736273]: ## 2024-10-06 13:10:21+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_update_welcome_file...
Oct 06 13:10:21 ip-172-26-0-107 bitnami[736273]: ## 2024-10-06 13:10:21+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040_bitnami_credentials_fi>
Oct 06 13:10:21 ip-172-26-0-107 bitnami[736273]: ## 2024-10-06 13:10:21+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_clean_metadata...
Oct 06 13:10:21 ip-172-26-0-107 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit bitnami.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Oct 06 13:10:21 ip-172-26-0-107 systemd[1]: bitnami.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit bitnami.service has entered the 'failed' state with result 'exit-code'.
Oct 06 13:10:21 ip-172-26-0-107 systemd[1]: Failed to start bitnami.service - LSB: bitnami init script.
░░ Subject: A start job for unit bitnami.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit bitnami.service has finished with a failure.
░░
░░ The job identifier is 2591 and the job result is failed.
Oct 06 13:10:21 ip-172-26-0-107 systemd[1]: bitnami.service: Consumed 1.296s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit bitnami.service completed and consumed the indicated resources.

asked 2 years ago845 views

1 Answer
0

It appears that the issue you're experiencing is related to the PHP-FPM service failing to start after installing SSL certificates and reconfiguring your application. This is causing the bitnami.service to fail. Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check PHP-FPM logs: Look for specific error messages in the PHP-FPM log files. These are typically located in /opt/bitnami/php/logs/ or /var/log/php-fpm/.

  2. Verify PHP-FPM configuration: Ensure that your PHP-FPM configuration files are correct and that there are no syntax errors. Check files in /opt/bitnami/php/etc/php-fpm.d/.

  3. Check permissions: Make sure that the user running PHP-FPM has the necessary permissions to access the SSL certificate files and any other required directories.

  4. Revert recent changes: If possible, try reverting the changes you made when configuring SSL to see if that resolves the issue.

  5. Restart PHP-FPM separately: Try restarting PHP-FPM service independently using the command: sudo /opt/bitnami/ctlscript.sh restart php-fpm

  6. Check for conflicting processes: Ensure there are no conflicting processes using the same ports or resources that PHP-FPM needs.

  7. Verify SSL configuration: Double-check your SSL configuration in your web server (NGINX) settings to ensure it's correctly pointing to the right certificate files.

If these steps don't resolve the issue, you may need to dive deeper into the PHP-FPM configuration and logs to identify the specific cause of the failure. Consider reaching out to Bitnami support or consulting their documentation for more specific troubleshooting steps related to your particular stack and configuration.

Sources
Check the status of a Bitnami service in Lightsail | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.