I just migrated over to a new server and using largely the same configuration, I am now receiving 502 bad gateway when trying to load the System Check page and Geolocation page.
The new server is Ubuntu 16.04, nginx 1.10, php 5.6, and MariaDB 10.1. The previous server was Ubuntu 12.04, nginx 1.10, php 5.5, and MariaDB 5.5. Using Piwik 3.0.1, I get the following on the new server, but didn’t on the old server:
nginx error log (I can’t seem to find a proper code block option in this forum):
failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: www.example.com, request: “GET /piwik/index.php?module=UserCountry&action=adminIndex&idSite=1&period=day&date=today HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php5.6-fpm.sock:”, host: “www.example.com”, referrer: “https://www.example.com/piwik/index.php?module=PrivacyManager&action=privacySettings&idSite=1&period=day&date=today”
WARNING: [pool www] child 8388 exited on signal 11 (SIGSEGV - core dumped) after 1434.367562 seconds from start
NOTICE: [pool www] child 8487 started
kernel: php-fpm5.6: segfault at 28 ip 00007f1737fd35c0 sp 00007ffeaeddb090 error 4 in libGeoIP.so.1.6.9[7f1737fc5000+2f000]
mysqld: 2017-01-14 2:36:36 140562309577472 [Warning] Aborted connection 188 to db: ‘database’ user: ‘username’ host: ‘localhost’ (Got an error reading communication packets)
Geolocation was selected to use PECL, though it is installed to the server using php-geoip package from the sury.org PPA. I used the default database update settings at the bottom of the geolocation page. It properly reported my location based on my IP address.
I freely accept that this is a configuration issue, but I haven’t been able to figure out where to start and I’m not having problems with any other packages on the server.
EDIT: I removed the migrated database statement, as this error occurs with fresh database as well.