logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache not working with Varnish Cache.
Author
kianwalters2005



Joined: 26 Jun 2021
Posts: 2

PostPosted: Sat 26 Jun '21 20:45    Post subject: Apache not working with Varnish Cache. Reply with quote

Hi!
I recently installed the varnish cache with my apache webserver on my ubuntu 18.04 VPS. I have varnish running on port 80 and apache on port 81(Docker is using 8080). It ran fine but now randomly shuts down every 5hrs or so. It gives the error
Code:
 caught SIGTERM, shutting down
. I then checked the syslog and got this.
Code:
Jun 25 18:43:02 vmi425722 systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE

Jun 25 18:43:02 vmi425722 systemd[1]: apache2.service: Failed with result 'exit-code'.


And:
Code:
[core:warn] [pid 32583] (101)Network is unreachable: AH00056: connect to listener on [::]:81.


And:
Code:
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

[Fri Jun 25 18:43:26.940157 2021] [mpm_prefork:alert] [pid 11221] no listening sockets available, shutting down

[Fri Jun 25 18:43:26.940165 2021] [:emerg] [pid 11221] AH00019: Unable to open logs, exiting

[Fri Jun 25 18:43:31.523338 2021] [so:warn] [pid 11392] AH01574: module dav_module is already loaded, skipping

[Fri Jun 25 18:43:31.559677 2021] [http2:warn] [pid 11394] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the cur$

[Fri Jun 25 18:43:31.595233 2021] [core:warn] [pid 11394] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?

[Fri Jun 25 18:43:31.603614 2021] [mpm_prefork:notice] [pid 11394] AH00163: Apache/2.4.29 (Ubuntu) SVN/1.9.7 mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations

[Fri Jun 25 18:43:31.603673 2021] [core:notice] [pid 11394] AH00094: Command line: '/usr/sbin/apache2'

[Fri Jun 25 18:43:32.763347 2021] [mpm_prefork:notice] [pid 11394] AH00169: caught SIGTERM, shutting down
.

This has only been happening since I installed varnish. I dont get why it cant connect to port 81, I have set it in ports.conf & have opened it in ufw. Does anyone know how to fix this? Or any advice?

Thanks,
Kian
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7374
Location: Germany, Next to Hamburg

PostPosted: Sat 26 Jun '21 22:03    Post subject: Reply with quote

Hi Kian,

did you change all the ports in all vhosts?

Also you have to change the "Listen 80", too, to Listen 81
Back to top
kianwalters2005



Joined: 26 Jun 2021
Posts: 2

PostPosted: Sat 26 Jun '21 22:13    Post subject: Reply with quote

Hi James,
Yep, all port are changed in all sites-available conf and my ports.conf now says Listen 81.
Back to top


Reply to topic   Topic: Apache not working with Varnish Cache. View previous topic :: View next topic
Post new topic   Forum Index -> Apache