Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: Nagataka on April 11, 2019, 06:02:34 PM

Title: [Solved] Connection refused
Post by: Nagataka on April 11, 2019, 06:02:34 PM
Hi all,

Just reinstalled one of my laptop with centos7.
Installed the latest version of CWP (version  0.9.8.796).
All working fine.. now changed my webserver to nginx -> varnish -> apache.
After this, every time i get a connection refused ERR_CONNECTION_REFUSED error when visiting a normal file.
Normally, no problem. Just reading some error logs and the problem could be solved. But this time.
Nothing got written in the log files.
If i switch to apache the sites work without any problem.

Someone got a clue?
Title: Re: Connection refused
Post by: Igor S. on April 11, 2019, 06:05:55 PM
Hi, try to check if all three WEB servers are work after the rebuild. Also, you can try apache+nginx or nginx+php-fpm 7.x
Title: Re: Connection refused
Post by: Nagataka on April 11, 2019, 06:06:23 PM
Ooooh wait.. might already have found it..
Code: [Select]
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan systemd[1]: Starting nginx - high performance web server...
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan nginx[18381]: nginx: [emerg] bind() to <ip>:80 failed (99: Cannot assign requested address)
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan systemd[1]: nginx.service: control process exited, code=exited status=1
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan systemd[1]: Failed to start nginx - high performance web server.
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan systemd[1]: Unit nginx.service entered failed state.
Apr 11 18:04:24 DESKTOP-QPDDT1U.lan systemd[1]: nginx.service failed.

Now need to find out how to solve this ^^
Title: Re: Connection refused
Post by: Nagataka on April 11, 2019, 06:07:19 PM
Hi, try to check if all three WEB servers are work after the rebuild. Also, you can try apache+nginx or nginx+php-fpm 7.x

Thanks for your quick reply.
Just noticed that nginx doesn't want to start indeed.. should have checked that first :)
Title: Re: Connection refused
Post by: Igor S. on April 11, 2019, 06:10:36 PM
Try nginx -t or systemctl status nginx . It will show you why this happens.
Title: Re: Connection refused
Post by: Nagataka on April 11, 2019, 06:14:58 PM
Try nginx -t or systemctl status nginx . It will show you why this happens.
Status of systemctl nginx status was just posted above your reply.

nginx -t output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] bind() to <ip>:80 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed

This bit: nginx: [emerg] bind() to <ip>:80 failed (99: Cannot assign requested address)
Which is weird.. cause i can connect on the hostname.
Title: Re: Connection refused
Post by: Nagataka on April 11, 2019, 06:17:55 PM
This btw just solved the problem:
https://stackoverflow.com/questions/3191509/nginx-error-99-cannot-assign-requested-address
Title: Re: Connection refused
Post by: Igor S. on April 11, 2019, 06:19:08 PM
You must check if the IP in nginx configs exists at the server.
Title: Re: Connection refused
Post by: Nagataka on April 11, 2019, 06:21:25 PM
You must check if the IP in nginx configs exists at the server.

Mmmm... so what you basicly mean.. It does a reverse checkup on the domain/ip?
Cause i made a fake domein.. added it in my hostfile on my pc.
So it does some reverse checkup?