monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.82k stars 2.19k forks source link

Login page loads without images - Request Timeout after login #5451

Open KierenConnell opened 3 years ago

KierenConnell commented 3 years ago

Really not sure where to start with this. Sometimes the Dashboard will load up and look fairly normal, but most times it loads like so image Or more often I'll hit a Request Timeout image

Things were running perfectly fine a few months ago, then a power outage hit, and now I get this - Short of a complete re-install, I'm lost on how to debug this.

The logs when I start the container show this APP_KEY already set, , ✓ Maintenance mode: on, '/usr/local/bin/php' 'artisan' down --retry="10", Application is now in maintenance mode., , ✓ Resetting application cache, '/usr/local/bin/php' 'artisan' cache:clear, Application cache cleared!, , ✓ Clear config cache, '/usr/local/bin/php' 'artisan' config:clear, Configuration cache cleared!, , ✓ Resetting route cache, '/usr/local/bin/php' 'artisan' route:cache, Route cache cleared!, Routes cached successfully!, , ✓ Resetting view cache, '/usr/local/bin/php' 'artisan' view:cache, Compiled views cleared!, Blade templates cached successfully!, , ✓ Symlink the storage folder, '/usr/local/bin/php' 'artisan' storage:link, The [/var/www/html/public/storage] link has been connected to [/var/www/html/storage/app/public]., The links have been created., , ✓ Performing migrations, '/usr/local/bin/php' 'artisan' migrate --force, Nothing to migrate., , ✓ Check for encryption keys, '/usr/local/bin/php' 'artisan' monica:passport --force, Checking encryption keys..., ✓ Creating encryption keys, '/usr/local/bin/php' 'artisan' passport:keys --no-interaction, Encryption keys generated successfully., , ! Please be careful to backup /var/www/html/storage/oauth-public.key and /var/www/html/storage/oauth-private.key files !, Checking Personal Access Client..., ✓ Personal Access Client already created., , ✓ Ping for new version, '/usr/local/bin/php' 'artisan' monica:ping --force, Call url:https://version.monicahq.com/ping, ConnectException..., , ✓ Cache configuraton, '/usr/local/bin/php' 'artisan' config:cache, Configuration cache cleared!, Configuration cached successfully!, , ✓ Maintenance mode: off, '/usr/local/bin/php' 'artisan' up, Application is now live., , Monica v3.1.3 is set up, enjoy., Database ready.AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message, AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message, [Sun Jan 00 00:00:00.000000 1900] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.48 (Debian) PHP/8.0.9 configured -- resuming normal operations, [Sat May 11 07:09:33.'''(+, 1935] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

env variables below

ALLOW_STATISTICS_THROUGH_PUBLIC_API_ACCESS | false -- | -- APACHE_CONFDIR | /etc/apache2 APACHE_ENVVARS | /etc/apache2/envvars APP_DEBUG | false APP_DISABLE_SIGNUP | true APP_EMAIL_NEW_USERS_NOTIFICATION |   APP_ENV | production APP_FORCE_URL | true APP_KEY | ******KEYVALUEHIDDEN****** APP_SIGNUP_DOUBLE_OPTIN | false APP_TRUSTED_CLOUDFLARE | false APP_TRUSTED_PROXIES | * APP_URL | ******URLHIDDEN****** AWS_BUCKET |   AWS_KEY |   AWS_REGION | us-east-1 AWS_SECRET |   AWS_SERVER |   CACHE_DRIVER | database CHECK_VERSION | true CRON_LEGACY | true DARKSKY_API_KEY |   DAV_ENABLED | true DB_CONNECTION | mysql DB_DATABASE | monica DB_HOST | 172.17.0.3 DB_PASSWORD | root DB_PORT | 3306 DB_PREFIX |   DB_TEST_DATABASE | monica_test DB_TEST_HOST | 127.0.0.1 DB_TEST_PASSWORD | DB_TEST_USERNAME | DB_USE_UTF8MB4 | true DB_USERNAME | root DEFAULT_FILESYSTEM | public DEFAULT_MAX_STORAGE_SIZE | 10240 DEFAULT_MAX_UPLOAD_SIZE | 10240 ENABLE_GEOLOCATION | false ENABLE_WEATHER | false GPG_KEYS | ******GPGKEYHIDDEN****** HASH_LENGTH | 18 HASH_SALT |   LOCATION_IQ_API_KEY |   LOG_CHANNEL | daily MAIL_ENCRYPTION | tls MAIL_FROM_ADDRESS | MAIL_FROM_NAME | MAIL_HOST | smtp.gmail.com MAIL_MAILER | smtp MAIL_PASSWORD | MAIL_PORT | 587 MAIL_USERNAME | MFA_ENABLED | true MONICA_VERSION | v3.1.3 PASSPORT_PASSWORD_GRANT_CLIENT_ID |   PASSPORT_PASSWORD_GRANT_CLIENT_SECRET |   PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHP_ASC_URL | https://www.php.net/distributions/php-8.0.8.tar.xz.asc PHP_CFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_CPPFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_EXTRA_BUILD_DEPS | apache2-dev PHP_EXTRA_CONFIGURE_ARGS | --with-apxs2 --disable-cgi PHP_INI_DIR | /usr/local/etc/php PHP_LDFLAGS | -Wl,-O1 -pie PHP_OPCACHE_MAX_ACCELERATED_FILES | 20000 PHP_OPCACHE_MAX_WASTED_PERCENTAGE | 10 PHP_OPCACHE_MEMORY_CONSUMPTION | 192 PHP_OPCACHE_VALIDATE_TIMESTAMPS | 0 PHP_SHA256 | dc1668d324232dec1d05175ec752dade92d29bb3004275118bc3f7fc7cbfbb1c PHP_URL | https://www.php.net/distributions/php-8.0.8.tar.xz PHP_VERSION | 8.0.8 PHPIZE_DEPS | autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c POLICY_COMPLIANT | true QUEUE_CONNECTION | sync SENTRY_LARAVEL_DSN |   SENTRY_SUPPORT | false SESSION_DRIVER | file SESSION_LIFETIME | 120

It's been awhile since I set this up, so I'm lost as to where to start looking to resolve the issue. Monica is being reverse proxied out via Caddy on another machine - Caddy is running a bunch of reverse proxies and the config for all of them is identical, so I'm inclined to think the issue isn't there. On the same machine as Monica I'm also running a couple of other services, proxied through Caddy on the other machine, and they run perfectly So it seems the issue is somewhere within the specific Monica container, but I'm lost as to where to start looking.

KierenConnell commented 3 years ago

Deployed a brand new docker container and still recieve the same

Request Timeout
Server timeout waiting for the HTTP request from the client.
Apache/2.4.48 (Debian) Server at 172.17.0.6 Port 80

On refresh it'll occasionally load with correct formatting, but showing 1969/1970 as the current date, and if you select a contact, it goes straight back to the Request Timeout image

KierenConnell commented 3 years ago

Have resolved the error AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message By running echo "ServerName localhost" >> /etc/apache2/apache2.conf via the console window for Monica inside Portainer.

But Monica is still loading with weird dates image And if you try and hit any of the links you either get a page that loads like this image or this image

This is a brand new docker container pointing to my original sql database

KierenConnell commented 3 years ago

@asbiin Any ideas on how I can resolve this?

hmnstf commented 2 years ago

did you find a solution ? i have the same problem

EDIT: I have found a solution. https://serverfault.com/questions/1037146/docker-container-with-random-date It was the outdated libseccomp which leads to a wrong date and to the request timeout