Failed to start LSB: bitnami init script. Process: 507 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILUR

Keywords: Django - AWS - Technical issue - Other
bnsupport ID: 0eba4364-0853-d6f6-440c-bedb432d7383
Description:
Hi,

I am trying to run my django app using AWS Lightsail. I have uploaded the app and can successfully run the django development server. I’m having some issues running a production apache server - to set up this connection, I have installed the mod_wsgi package and added the following in the ‘/etc/apache2/sites-available/000-default.conf’ file:

<VirtualHost *:80>
    ...


    LoadFile /opt/bitnami/python/lib/libpython3.8.so.1.0

    LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

    Alias /static /opt/bitnami/apache/htdocs/projects/myTEMS/static
    <Directory /opt/bitnami/apache/htdocs/projects/myTEMS/static>
    Require all granted
    </Directory>.so.1.0

    <Directory /opt/bitnami/apache/htdocs/projects/myTEMS>
    <Files wsgi.py>
    Require all granted
    </Files>
    </Directory>


    WSGIDaemonProcess myTEMS python-path=/opt/bitnami/apache/htdocs/projects/myTEMS python-home=/opt/bitnami/apache/htdocs/projects/myT$
    WSGIProcessGroup myTEMS
    WSGIScriptAlias / /opt/bitnami/apache/htdocs/projects/myTEMS/wsgi.py

</VirtualHost>

After running the command ‘systemctl status bitnami.service’ I am notified with the folowing error:

● bitnami.service - LSB: bitnami init script
   Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2021-04-21 10:32:39 UTC; 1h 2min ago
  Process: 507 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)

Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: AH00015: Unable to open logs
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: 2021-04-21T10:32:39.165Z - error: Unable to perform start operation Export start for apache failed with exit code 1
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: ## 2021-04-21 10:32:39+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010_bitnami_agent_extra...
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: ## 2021-04-21 10:32:39+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami_agent...
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: ## 2021-04-21 10:32:39+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_update_welcome_file...
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: ## 2021-04-21 10:32:39+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040_bitnami_credentials_file...
Apr 21 10:32:39 ip-172-26-11-32 bitnami[507]: ## 2021-04-21 10:32:39+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_clean_metadata...
Apr 21 10:32:39 ip-172-26-11-32 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
Apr 21 10:32:39 ip-172-26-11-32 systemd[1]: bitnami.service: Failed with result 'exit-code'.
Apr 21 10:32:39 ip-172-26-11-32 systemd[1]: Failed to start LSB: bitnami init script.

I found Bitnami Support Bundle and after using it, I get this code:
0eba4364-0853-d6f6-440c-bedb432d7383

Please help.
Thanks

Hi @samstoppani,

The Bitnami Django solution comes with an Apache server, why are you using the system’s Apache? You can deploy your Django application on top of the Bitnami solution by following these guides

https://docs.bitnami.com/aws/infrastructure/django/get-started/start-django-project/
https://docs.bitnami.com/aws/infrastructure/django/get-started/deploy-django-project/

In order to start the Bitnami’s Apache, you will need to stop the system’s one and start the Bitnami’s services using this command

sudo /opt/bitnami/ctlscript.sh start

Happy to help!


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.