danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
252 stars 71 forks source link

Constant 502 bad gateway error after install #123

Closed argonimos closed 4 years ago

argonimos commented 4 years ago

I ran through the script multiple times, reinstalled FreeNAS mutiple times, wiped the drive and tried different domain names, but whenever the installer finishes a 502 bad gateway error when trying to access the site for the first time. I even tried to access it after running the staging-command at the end of the install, but the situation does not change. I was able to install Nextcloud without issue two weeks ago via this script, but I cannot make it work since yesterday.

Edit: I run my server behind a FritzBox! 6591, using Cloudflare as my DNS provider and without DynDNS since I have got a stable IP-aderss from my provider.

My config file looks as follows:

JAIL_IP="192.168.178.145"
JAIL_NAME="FranconiaWolke"
DEFAULT_GW_IP="192.168.178.1"
FILES_PATH="/mnt/HDD/Speicher"
POOL_PATH="/mnt/SSD/Daten"
TIME_ZONE="Europe/Berlin"
HOST_NAME="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
DNS_CERT=1
CERT_EMAIL="xxxxxxxxxxxxxxxxxxxxx"
DNS_ENV="CLOUDFLARE_EMAIL=xxxxxxxx@xxxx.xx CLOUDFLARE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
DNS_PLUGIN="cloudflare"

The problematic part of the install seems to be the following:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Command: mysqladmin reload failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ maintenance:install --database="mysql" --database-name="nextcloud" --database-user="nextcloud" --database-pass="kTe3eYCJORzqXdoTrskgDw==" --database-host="localhost:/tmp/mysql.sock" --admin-user="admin" --admin-pass="lCfpleYVHz+BT+cA" --data-dir="/mnt/files" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set mysql.utf8mb4 --type boolean --value="true" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ db:add-missing-indices failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ db:convert-filecache-bigint --no-interaction failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logtimezone --value="Europe/Berlin" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set log_type --value="file" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logfile --value="/var/log/nextcloud.log" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set loglevel --value="2" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logrotate_size --value="104847600" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set redis host --value="/var/run/redis/redis.sock" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set redis port --value=0 --type=integer failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set memcache.locking --value="\OC\Memcache\Redis" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwritehost --value="nextcloud.frankenwolke-freiburg.de" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwriteprotocol --value="https" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwrite.cli.url --value="https://nextcloud.frankenwolke-freiburg.de/" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set htaccess.RewriteBase --value="/" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ maintenance:update:htaccess failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set trusted_domains 1 --value="nextcloud.frankenwolke-freiburg.de" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set trusted_domains 2 --value="192.168.178.145" failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ app:enable encryption failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ encryption:enable failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ encryption:disable failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php /usr/local/www/nextcloud/occ background:cron failed!
/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"
Command: su -m www -c php -f /usr/local/www/nextcloud/cron.php failed!
Successfully removed mount from FranconiaWolke's fstab
Installation complete!
sobmalag commented 4 years ago

I have the same issue...

tounessa commented 4 years ago

I have the same issue with a fresh installation.

GeorgDahm commented 4 years ago

Same here. My server is attached to Fritzbox 7590 router, I'm using the DynDS provided by my hoster Strato.

The config:

JAIL_IP="192.168.178.63" JAIL_NAME="podcastnetzwerk" DEFAULT_GW_IP="192.168.178.1" POOL_PATH="/mnt/becken" TIME_ZONE="Europe/Berlin" HOST_NAME="leaderservant.diezumutung.de" STANDALONE_CERT=1 CERT_EMAIL=georg.dahm@failbetter.biz

The install reported multiple errors:

install: /mnt/becken/iocage/releases/11.3-RELEASE/root//usr/lib/debug/usr/sbin/local-unbound-anchor.debug: No such file or directory install: /mnt/becken/iocage/releases/11.3-RELEASE/root//usr/lib/debug/usr/sbin/local-unbound-checkconf.debug: No such file or directory install: /mnt/becken/iocage/releases/11.3-RELEASE/root//usr/lib/debug/usr/sbin/local-unbound-control.debug: No such file or directory install: /mnt/becken/iocage/releases/11.3-RELEASE/root//usr/lib/debug/usr/sbin/local-unbound.debug: No such file or directory Installing updates...Installing updates...Installing updates...Installing updates...Installing updates...Installing updates... done. install: /mnt/becken/iocage/releases/11.3-RELEASE/root//usr/lib/debug/usr/sbin/local-unbound.debug: No such file or directory

(...)

/usr/local/share/fonts: skipping, no such directory /usr/local/lib/X11/fonts: skipping, no such directory

(...)

mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' Command: mysqladmin reload failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ maintenance:install --database="mysql" --database-name="nextcloud" --database-user="nextcloud" --database-pass="61ijpqq/wDCdbsWjx99hpA==" --database-host="localhost:/tmp/mysql.sock" --admin-user="admin" --admin-pass="gMUqsAb2oRx8yuGd" --data-dir="/mnt/files" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set mysql.utf8mb4 --type boolean --value="true" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ db:add-missing-indices failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ db:convert-filecache-bigint --no-interaction failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logtimezone --value="Europe/Berlin" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set log_type --value="file" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logfile --value="/var/log/nextcloud.log" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set loglevel --value="2" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set logrotate_size --value="104847600" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set redis host --value="/var/run/redis/redis.sock" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set redis port --value=0 --type=integer failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set memcache.locking --value="\OC\Memcache\Redis" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwritehost --value="leaderservant.diezumutung.de" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwriteprotocol --value="https" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set overwrite.cli.url --value="https://leaderservant.diezumutung.de/" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set htaccess.RewriteBase --value="/" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ maintenance:update:htaccess failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set trusted_domains 1 --value="leaderservant.diezumutung.de" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ config:system:set trusted_domains 2 --value="192.168.178.63" failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ app:enable encryption failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ encryption:enable failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ encryption:disable failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php /usr/local/www/nextcloud/occ background:cron failed! /usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex" Command: su -m www -c php -f /usr/local/www/nextcloud/cron.php failed!

danb35 commented 4 years ago

/usr/local/lib/php/20180731/redis.so: Undefined symbol "php_hash_bin2hex"

This is where the real problem is, and it's a problem in the upstream pecl-redis package. It's been fixed, but likely needs a few days to be built so that it will work again.

tounessa commented 4 years ago

I tried to upgrade the script to php-74 and the error fixed and works! sc01

argonimos commented 4 years ago

That's great ! It would be awesome if you could share your solution in a little detail, I am in quite a hurry to redeploy the nextcloud instance and quite new to this field.

tounessa commented 4 years ago

That's great ! It would be awesome if you could share your solution, I am in quite a hurry to redeploy the nextcloud instance.

In a new installation, edit the script "nextcloud-jail.sh" find and replace php73 with php74. If it need execution permission: chmod + x nextcloud-jail.sh I ran it and was enough.