Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Rengine proxy fails to start #853

Closed
adeadfed opened this issue Mar 28, 2023 · 3 comments · Fixed by #865
Closed

Bug - Rengine proxy fails to start #853

adeadfed opened this issue Mar 28, 2023 · 3 comments · Fixed by #865

Comments

@adeadfed
Copy link

Issue Summary

Rengine now fails to start HTTP and HTTPS listeners on port 80 & 443.
Logs show that the proxy container constantly exits with an error code 1:

proxy_1        | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
proxy_1        | /docker-entrypoint.sh: Configuration complete; ready for start up
proxy_1        | 2023/03/28 09:58:10 [emerg] 1#1: host not found in upstream "rengine" in /etc/nginx/conf.d/rengine.conf:28
proxy_1        | nginx: [emerg] host not found in upstream "rengine" in /etc/nginx/conf.d/rengine.conf:28
proxy_1        | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
rengine_proxy_1 exited with code 1

The proxy container keeps restarting in an infinite loop after the start:

ubuntu@ip-172-31-31-240 ~/g/rengine (master)> docker container ls
CONTAINER ID   IMAGE                                                     COMMAND                  CREATED         STATUS                        PORTS                                       NAMES
...
149536a9f627   nginx:alpine                                              "/docker-entrypoint.…"   8 minutes ago   Restarting (1) 1 second ago                                               rengine_proxy_1
...

Ports 80 and 443 keep showing up and then disappearing:

ubuntu@ip-172-31-31-240 ~/g/rengine (master)> netstat -tunvlp | grep 80
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::8000                 :::*                    LISTEN      -                   
tcp6       0      0 :::80                   :::*                    LISTEN      -  
...
ubuntu@ip-172-31-31-240 ~/g/rengine (master) [7]> netstat -tunvlp | grep 80
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::8000                 :::*                    LISTEN      -  

Seems like the issue is related to the recent commit that removed network alias from the docker compose file #784

Steps to Reproduce

Build a new Rengine instance and start it using either auto-install script (./install.sh), or manual installation steps, listed on the official Wiki](https://rengine.wiki/install/detailed/#docker-compose).

Technical details

OS: Ubuntu 20.04 LTS AWS VM

@github-actions
Copy link

👋 Hi @adeadfed,
Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki
For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE
Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

@adeadfed
Copy link
Author

Yup, after adding the deleted lines to the docker compose file, I was able to make the Rengine running again.

ubuntu@ip-172-31-31-240 ~/g/rengine (master)> vim docker-compose.yml
*add these to the docker compose file at line 116*
    networks:
      rengine_network:
        aliases:
          - rengine
ubuntu@ip-172-31-31-240 ~/g/rengine (master)> sudo make up
ubuntu@ip-172-31-31-240 ~/g/rengine (master)> curl https://127.0.0.1 -k -v
*   Trying 127.0.0.1:443...
* Connected to 127.0.0.1 (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=Georgia; L=Atlanta; O=reNgine; CN=recon.example.com
*  start date: Mar 28 09:43:33 2023 GMT
*  expire date: Mar 25 09:43:33 2033 GMT
*  issuer: C=US; O=reNgine; CN=reNgine
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* Using Stream ID: 1 (easy handle 0x557f6a7eb550)
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET / HTTP/2
> Host: 127.0.0.1
> user-agent: curl/7.81.0
> accept: */*
> 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 302 
< server: nginx/1.23.3
< date: Tue, 28 Mar 2023 10:13:04 GMT
< content-type: text/html; charset=utf-8
< content-length: 0
< location: /login/?next=/
< vary: Cookie
< x-content-type-options: nosniff
< referrer-policy: same-origin
< 
* Connection #0 to host 127.0.0.1 left intact

@adeadfed
Copy link
Author

There's already an open pull request regarding this issue #850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant