bitnami / vms

Bitnami VMs
https://bitnami.com
Other
203 stars 43 forks source link

Bitnami Odoo on Azure - Trying to enable nginx but getting the below error #424

Closed rinaz closed 1 year ago

rinaz commented 1 year ago

Platform

Azure

bndiagnostic ID know more about bndiagnostic ID

13532843-22a3-e57d-5257-c7f2e375e07e

bndiagnostic output

● bitnami.service - LSB: bitnami init script Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2022-10-21 10:23:28 UTC; 8s ago Process: 3335 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE) Tasks: 7 (limit: 4717) Memory: 171.2M CGroup: /system.slice/bitnami.service └─2306 /opt/bitnami/gonit/bin/gonit

Oct 21 10:23:28 CRM bitnami[3335]: 2022-10-21T10:23:28.628Z - error: Unable to perform start operation Export start for apache Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010detect Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040update Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/060_clean_m Oct 21 10:23:28 CRM systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE Oct 21 10:23:28 CRM systemd[1]: bitnami.service: Failed with result 'exit-code'. Oct 21 10:23:28 CRM systemd[1]: Failed to start LSB: bitnami init script.

bndiagnostic was not useful. Could you please tell us why?

The sugegsted tools pointing to an issue with port 80 but I am not finding any clue how to change or whether it's okay to change the port in httpd

Describe your issue as much as you can

Hi,

I am seeking help after reading so many forums but couldn't get an answer.

I am trying to enable multi worker feature in Odoo and installed nginx

sudo apt-get install nginx -y

All are installed properly but nginx service cannot be activated and throws the below error

sudo apt-get install nginx -y

Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libgd3 libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx-common nginx-full Suggested packages: libgd-tools fcgiwrap nginx-doc ssl-cert The following NEW packages will be installed: libgd3 libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx nginx-common nginx-full 0 upgraded, 14 newly installed, 0 to remove and 1 not upgraded. Need to get 1,897 kB of archives. After this operation, 3,764 kB of additional disk space will be used. Get:1 http://httpredir.debian.org/debian buster/main amd64 libgd3 amd64 2.2.5-5.2 [136 kB] Get:2 http://httpredir.debian.org/debian buster/main amd64 nginx-common all 1.14.2-2+deb10u4 [121 kB] Get:3 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-auth-pam amd64 1.14.2-2+deb10u4 [92.8 kB] Get:4 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-dav-ext amd64 1.14.2-2+deb10u4 [100 kB] Get:5 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-echo amd64 1.14.2-2+deb10u4 [104 kB] Get:6 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-geoip amd64 1.14.2-2+deb10u4 [94.1 kB] Get:7 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-image-filter amd64 1.14.2-2+deb10u4 [97.6 kB] Get:8 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-subs-filter amd64 1.14.2-2+deb10u4 [95.9 kB] Get:9 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-upstream-fair amd64 1.14.2-2+deb10u4 [96.0 kB] Get:10 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-http-xslt-filter amd64 1.14.2-2+deb10u4 [95.9 kB] Get:11 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-mail amd64 1.14.2-2+deb10u4 [126 kB] Get:12 http://httpredir.debian.org/debian buster/main amd64 libnginx-mod-stream amd64 1.14.2-2+deb10u4 [147 kB] Get:13 http://httpredir.debian.org/debian buster/main amd64 nginx-full amd64 1.14.2-2+deb10u4 [501 kB] Get:14 http://httpredir.debian.org/debian buster/main amd64 nginx all 1.14.2-2+deb10u4 [88.5 kB] Fetched 1,897 kB in 0s (14.5 MB/s) Preconfiguring packages ... Selecting previously unselected package libgd3:amd64. (Reading database ... 47657 files and directories currently installed.) Preparing to unpack .../00-libgd3_2.2.5-5.2_amd64.deb ... Unpacking libgd3:amd64 (2.2.5-5.2) ... Selecting previously unselected package nginx-common. Preparing to unpack .../01-nginx-common_1.14.2-2+deb10u4_all.deb ... Unpacking nginx-common (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-auth-pam. Preparing to unpack .../02-libnginx-mod-http-auth-pam_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-auth-pam (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-dav-ext. Preparing to unpack .../03-libnginx-mod-http-dav-ext_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-dav-ext (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-echo. Preparing to unpack .../04-libnginx-mod-http-echo_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-echo (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-geoip. Preparing to unpack .../05-libnginx-mod-http-geoip_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-geoip (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-image-filter. Preparing to unpack .../06-libnginx-mod-http-image-filter_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-image-filter (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-subs-filter. Preparing to unpack .../07-libnginx-mod-http-subs-filter_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-subs-filter (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-upstream-fair. Preparing to unpack .../08-libnginx-mod-http-upstream-fair_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-upstream-fair (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-http-xslt-filter. Preparing to unpack .../09-libnginx-mod-http-xslt-filter_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-http-xslt-filter (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-mail. Preparing to unpack .../10-libnginx-mod-mail_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-mail (1.14.2-2+deb10u4) ... Selecting previously unselected package libnginx-mod-stream. Preparing to unpack .../11-libnginx-mod-stream_1.14.2-2+deb10u4_amd64.deb ... Unpacking libnginx-mod-stream (1.14.2-2+deb10u4) ... Selecting previously unselected package nginx-full. Preparing to unpack .../12-nginx-full_1.14.2-2+deb10u4_amd64.deb ... Unpacking nginx-full (1.14.2-2+deb10u4) ... Selecting previously unselected package nginx. Preparing to unpack .../13-nginx_1.14.2-2+deb10u4_all.deb ... Unpacking nginx (1.14.2-2+deb10u4) ... Setting up nginx-common (1.14.2-2+deb10u4) ... Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service. Setting up libnginx-mod-http-xslt-filter (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-auth-pam (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-geoip (1.14.2-2+deb10u4) ... Setting up libgd3:amd64 (2.2.5-5.2) ... Setting up libnginx-mod-http-echo (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-subs-filter (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-dav-ext (1.14.2-2+deb10u4) ... Setting up libnginx-mod-mail (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-image-filter (1.14.2-2+deb10u4) ... Setting up libnginx-mod-stream (1.14.2-2+deb10u4) ... Setting up libnginx-mod-http-upstream-fair (1.14.2-2+deb10u4) ... Setting up nginx-full (1.14.2-2+deb10u4) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. invoke-rc.d: initscript nginx, action "start" failed. ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2022-10-21 07:11:38 UTC; 8ms ago Docs: man:nginx(8) Process: 5978 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 5979 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Oct 21 07:11:36 CRM nginx[5979]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Oct 21 07:11:36 CRM nginx[5979]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Oct 21 07:11:37 CRM nginx[5979]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Oct 21 07:11:37 CRM nginx[5979]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Oct 21 07:11:37 CRM nginx[5979]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Oct 21 07:11:37 CRM nginx[5979]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) Oct 21 07:11:38 CRM nginx[5979]: nginx: [emerg] still could not bind() Oct 21 07:11:38 CRM systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Oct 21 07:11:38 CRM systemd[1]: nginx.service: Failed with result 'exit-code'. Oct 21 07:11:38 CRM systemd[1]: Failed to start A high performance web server and a reverse proxy server. dpkg: error processing package nginx-full (--configure): installed nginx-full package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of nginx: nginx depends on nginx-full (<< 1.14.2-2+deb10u4.1~) | nginx-light (<< 1.14.2-2+deb10u4.1~) | nginx-extras (<< 1.14.2-2+deb10u4.1~); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. nginx depends on nginx-full (>= 1.14.2-2+deb10u4) | nginx-light (>= 1.14.2-2+deb10u4) | nginx-extras (>= 1.14.2-2+deb10u4); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure): dependency problems - leaving unconfigured Processing triggers for systemd (241-7~deb10u8) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10+deb10u2) ... Errors were encountered while processing: nginx-full nginx E: Sub-process /usr/bin/dpkg returned an error code (1) <

I setup nginx conf file and tested all seems fine

enabled# sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

I understood the issue is with port 80 I checked the services utilized port 80

netstat -tulpn | grep --color :80

tcp 0 0 0.0.0.0:8069 0.0.0.0: LISTEN 7895/python tcp6 0 0 :::80 ::: LISTEN 6935/httpd

80 used by httpd

Stopped Odoo services then started nginx

nginx running

root@CRM:/# sudo service nginx start root@CRM:/# service nginx status ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2022-10-21 08:24:43 UTC; 4s ago Docs: man:nginx(8) Process: 9522 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 9523 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 9524 (nginx) Tasks: 3 (limit: 4717) Memory: 3.6M CGroup: /system.slice/nginx.service ├─9524 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├─9525 nginx: worker process └─9526 nginx: worker process

Oct 21 08:24:43 CRM systemd[1]: Starting A high performance web server and a reverse proxy server... Oct 21 08:24:43 CRM systemd[1]: Started A high performance web server and a reverse proxy server.

But the issue if I restart Odoo services it will not start

root@CRM:/var/run# sudo /opt/bitnami/ctlscript.sh start Starting services.. Job for bitnami.service failed because the control process exited with error code. See "systemctl status bitnami.service" and "journalctl -xe" for details. root@CRM:/var/run# systemctl status bitnami.service ● bitnami.service - LSB: bitnami init script Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2022-10-21 10:23:28 UTC; 8s ago Process: 3335 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE) Tasks: 7 (limit: 4717) Memory: 171.2M CGroup: /system.slice/bitnami.service └─2306 /opt/bitnami/gonit/bin/gonit

Oct 21 10:23:28 CRM bitnami[3335]: 2022-10-21T10:23:28.628Z - error: Unable to perform start operation Export start for apache Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010detect Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040update Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_bitnami Oct 21 10:23:28 CRM bitnami[3335]: ## 2022-10-21 10:23:28+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/060_clean_m Oct 21 10:23:28 CRM systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE Oct 21 10:23:28 CRM systemd[1]: bitnami.service: Failed with result 'exit-code'. Oct 21 10:23:28 CRM systemd[1]: Failed to start LSB: bitnami init script.

If I stop nginx and start Odoo services all running

sudo /opt/bitnami/ctlscript.sh status odoo already running postgresql already running

Then I stopped and disabled appache

sudo /opt/bitnami/ctlscript.sh stop apache root@CRM:/etc/nginx# sudo mv /etc/monit/conf.d/apache.conf /etc/monit/conf.d/apache.conf.disabled

Couldn't execute the last two lines above because the path doesn't exist. (I installed nginx separately as I mention initially) https://docs.bitnami.com/aws/apps/dreamfactory/administration/switch-apache-nginx/

root@CRM:/etc/nginx# sudo mv /etc/monit/conf.d/nginx.conf.disabled /etc/monit/conf.d/nginx.conf mv: cannot stat '/etc/monit/conf.d/nginx.conf.disabled': No such file or directory

My issue is I am still unable to run both services together so I can enable multi worker features.

My queries

  1. Is it safe to change bitnami default ports https://docs.bitnami.com/aws/apps/odoo/administration/configure-port/
  2. Can I change to a different port than 80 in nginx conf file
  3. AM I missing something? my concern is the application is live and I am testing these on a sandbox env.

Thanks, Mohamed

mdhont commented 1 year ago

Bitnami applications are configured to work out of the box and unfortunately the changes to the configuration that are required for this to work exceed the scope of this forum.

github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 1 year ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

rinaz commented 1 year ago

Hi, will I get any feedback about this issue? It still exists but the ticket was "Pending" but is now marked closed.

mdhont commented 1 year ago

I have already replied earlier in this thread. Bitnami Odoo is configured to work with Apache. Unfortunately our solutions are shipped with preconfigured components, updating or changing individual components is not supported.