mariadb/mysql won't start on TrueNAS 12.2

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
Alright, so after moving my hardisks from an older hardware to a newer hardware, making a config restore on the new build, everything was running as before, just faster. Until yesterday, when Nextcloud's mariadb stopped working. The jail was setup with an static ip and I can't start mariadb. I don't even get outside the jail (no connection) to do pkg update. Other jails with dhcp working as smooth as ever, just nextcloud won't work.

I created another jail and just installed mariadb (at least I've got network in that jail). But it wouldn't start either.

When I run cat /etc/rc.conf it outputs this

cron_flags="$cron_flags -J 15"

# Disable Sendmail by default
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# Run secure syslog
syslogd_flags="-c -ss"

# Enable IPv6
ipv6_activate_all_interfaces="YES"
apache24_enable="yes"
mysql_enable="yes"
redis_enable="yes"
php_fpm_enable="yes"
postfix_enable="YES"
clear_tmp_enable="YES"
turnserver_enable="YES"
fail2ban_enable="yes"
ifconfig_epair0b="SYNCDHCP"

When I run sh -x /usr/local/etc/rc.d/mysql-server start it shows this

+ . /etc/rc.subr
+ : 20812
+ export RC_PID
+ [ -n '' ]
+ _rc_subr_loaded=YES
+ SYSCTL=/sbin/sysctl
+ SYSCTL_N='/sbin/sysctl -n'
+ SYSCTL_W=/sbin/sysctl
+ PROTECT=/usr/bin/protect
+ ID=/usr/bin/id
+ IDCMD='if [ -x /usr/bin/id ]; then /usr/bin/id -un; fi'
+ PS='/bin/ps -ww'
+ JID=0
+ rc_service=/usr/local/etc/rc.d/mysql-server
+ _rc_namevarlist='program chroot chdir env flags fib nice user group groups prepend'
+ kenv -q rc.debug
+ name=mysql
+ rcvar=mysql_enable
+ load_rc_config mysql
+ local _name _rcvar_val _var _defval _v _msg _new _d
+ _name=mysql
+ false
+ [ -r /etc/defaults/rc.conf ]
+ debug 'Sourcing /etc/defaults/rc.conf'
+ . /etc/defaults/rc.conf
+ rc_info=NO
+ rc_startmsgs=YES
+ rcshutdown_timeout=90
+ early_late_divider=FILESYSTEMS
+ always_force_depends=NO
+ apm_enable=NO
+ apmd_enable=NO
+ apmd_flags=''
+ ddb_enable=NO
+ ddb_config=/etc/ddb.conf
+ devd_enable=YES
+ devd_flags=''
+ devmatch_enable=YES
+ devmatch_blacklist=''
+ kldxref_enable=YES
+ kldxref_clobber=NO
+ kldxref_module_path=''
+ powerd_enable=NO
+ powerd_flags=''
+ tmpmfs=AUTO
+ tmpsize=20m
+ tmpmfs_flags=-S
+ varmfs=AUTO
+ varsize=32m
+ varmfs_flags=-S
+ mfs_type=auto
+ populate_var=AUTO
+ cleanvar_enable=YES
+ local_startup=/usr/local/etc/rc.d
+ script_name_sep=' '
+ rc_conf_files='/etc/rc.conf /etc/rc.conf.local'
+ zfs_enable=NO
+ zfsd_enable=NO
+ gptboot_enable=YES
+ gbde_autoattach_all=NO
+ gbde_devices=NO
+ gbde_attach_attempts=3
+ gbde_lockdir=/etc
+ geli_devices=''
+ geli_groups=''
+ geli_tries=''
+ geli_default_flags=''
+ geli_autodetach=YES
+ root_rw_mount=YES
+ root_hold_delay=30
+ fsck_y_enable=NO
+ fsck_y_flags='-T ffs:-R -T ufs:-R'
+ background_fsck=YES
+ background_fsck_delay=60
+ growfs_enable=NO
+ netfs_types='nfs:NFS smbfs:SMB'
+ extra_netfs_types=NO
+ hostname=''
+ hostid_enable=YES
+ hostid_file=/etc/hostid
+ nisdomainname=NO
+ dhclient_program=/sbin/dhclient
+ dhclient_flags=''
+ background_dhclient=NO
+ synchronous_dhclient=NO
+ defaultroute_delay=30
+ defaultroute_carrier_delay=5
+ netif_enable=YES
+ netif_ipexpand_max=2048
+ wpa_supplicant_program=/usr/sbin/wpa_supplicant
+ wpa_supplicant_flags=-s
+ wpa_supplicant_conf_file=/etc/wpa_supplicant.conf
+ firewall_enable=NO
+ firewall_script=/etc/rc.firewall
+ firewall_type=UNKNOWN
+ firewall_quiet=NO
+ firewall_logging=NO
+ firewall_logif=NO
+ firewall_flags=''
+ firewall_coscripts=''
+ firewall_client_net=192.0.2.0/24
+ firewall_simple_iif=ed1
+ firewall_simple_inet=192.0.2.16/28
+ firewall_simple_oif=ed0
+ firewall_simple_onet=192.0.2.0/28
+ firewall_myservices=''
+ firewall_allowservices=''
+ firewall_trusted=''
+ firewall_logdeny=NO
+ firewall_nologports='135-139,445 1026,1027 1433,1434'
+ firewall_nat_enable=NO
+ firewall_nat_interface=''
+ firewall_nat_flags=''
+ firewall_nat64_enable=NO
+ firewall_nptv6_enable=NO
+ firewall_pmod_enable=NO
+ dummynet_enable=NO
+ ipfw_netflow_enable=NO
+ ip_portrange_first=NO
+ ip_portrange_last=NO
+ ike_enable=NO
+ ike_program=/usr/local/sbin/isakmpd
+ ike_flags=''
+ ipsec_enable=NO
+ ipsec_file=/etc/ipsec.conf
+ natd_program=/sbin/natd
+ natd_enable=NO
+ natd_interface=''
+ natd_flags=''
+ ipfilter_enable=NO
+ ipfilter_program=/sbin/ipf
+ ipfilter_rules=/etc/ipf.rules
+ ipfilter_flags=''
+ ippool_enable=NO
+ ippool_program=/sbin/ippool
+ ippool_rules=/etc/ippool.tables
+ ippool_flags=''
+ ipnat_enable=NO
+ ipnat_program=/sbin/ipnat
+ ipnat_rules=/etc/ipnat.rules
+ ipnat_flags=''
+ ipmon_enable=NO
+ ipmon_program=/sbin/ipmon
+ ipmon_flags=-Ds
+ ipfs_enable=NO
+ ipfs_program=/sbin/ipfs
+ ipfs_flags=''
+ pf_enable=NO
+ pf_rules=/etc/pf.conf
+ pf_program=/sbin/pfctl
+ pf_flags=''
+ pflog_enable=NO
+ pflog_logfile=/var/log/pflog
+ pflog_program=/sbin/pflogd
+ pflog_flags=''
+ ftpproxy_enable=NO
+ ftpproxy_flags=''
+ pfsync_enable=NO
+ pfsync_syncdev=''
+ pfsync_syncpeer=''
+ pfsync_ifconfig=''
+ tcp_extensions=YES
+ log_in_vain=0
+ tcp_keepalive=YES
+ tcp_drop_synfin=NO
+ icmp_drop_redirect=NO
+ icmp_log_redirect=NO
+ network_interfaces=auto
+ cloned_interfaces=''
+ sppp_interfaces=''
+ ppp_enable=NO
+ ppp_program=/usr/sbin/ppp
+ ppp_mode=auto
+ ppp_nat=YES
+ ppp_profile=papchap
+ ppp_user=root
+ hostapd_program=/usr/sbin/hostapd
+ hostapd_enable=NO
+ syslogd_enable=YES
+ syslogd_program=/usr/sbin/syslogd
+ syslogd_flags=-s
+ syslogd_oomprotect=YES
+ altlog_proglist=''
+ inetd_enable=NO
+ inetd_program=/usr/sbin/inetd
+ inetd_flags='-wW -C 60'
+ iscsid_enable=NO
+ iscsictl_enable=NO
+ iscsictl_flags=-Aa
+ hastd_enable=NO
+ hastd_program=/sbin/hastd
+ hastd_flags=''
+ ctld_enable=NO
+ local_unbound_enable=NO
+ local_unbound_tls=NO
+ blacklistd_enable=NO
+ blacklistd_flags=''
+ resolv_enable=YES
+ kdc_enable=NO
+ kdc_program=/usr/libexec/kdc
+ kdc_flags=''
+ kadmind_enable=NO
+ kadmind_program=/usr/libexec/kadmind
+ kpasswdd_enable=NO
+ kpasswdd_program=/usr/libexec/kpasswdd
+ kfd_enable=NO
+ kfd_program=/usr/libexec/kfd
+ kfd_flags=''
+ ipropd_master_enable=NO
+ ipropd_master_program=/usr/libexec/ipropd-master
+ ipropd_master_flags=''
+ ipropd_master_keytab=/etc/krb5.keytab
+ ipropd_master_slaves=''
+ ipropd_slave_enable=NO
+ ipropd_slave_program=/usr/libexec/ipropd-slave
+ ipropd_slave_flags=''
+ ipropd_slave_keytab=/etc/krb5.keytab
+ ipropd_slave_master=''
+ gssd_enable=NO
+ gssd_program=/usr/sbin/gssd
+ gssd_flags=''
+ rwhod_enable=NO
+ rwhod_flags=''
+ rarpd_enable=NO
+ rarpd_flags=-a
+ bootparamd_enable=NO
+ bootparamd_flags=''
+ pppoed_enable=NO
+ pppoed_provider='*'
+ pppoed_flags='-P /var/run/pppoed.pid'
+ pppoed_interface=fxp0
+ sshd_enable=NO
+ sshd_program=/usr/sbin/sshd
+ sshd_flags=''
+ ftpd_enable=NO
+ ftpd_program=/usr/libexec/ftpd
+ ftpd_flags=''
+ amd_enable=NO
+ amd_program=/usr/sbin/amd
+ amd_flags='-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map'
+ amd_map_program=NO
+ autofs_enable=NO
+ automount_flags=''
+ automountd_flags=''
+ autounmountd_flags=''
+ nfs_client_enable=NO
+ nfs_access_cache=60
+ nfs_server_enable=NO
+ nfs_server_flags='-u -t'
+ nfs_server_managegids=NO
+ mountd_enable=NO
+ mountd_flags='-r -S'
+ weak_mountd_authentication=NO
+ nfs_reserved_port_only=NO
+ nfs_bufpackets=''
+ rpc_lockd_enable=NO
+ rpc_lockd_flags=''
+ rpc_statd_enable=NO
+ rpc_statd_flags=''
+ rpcbind_enable=NO
+ rpcbind_program=/usr/sbin/rpcbind
+ rpcbind_flags=''
+ rpc_ypupdated_enable=NO
+ keyserv_enable=NO
+ keyserv_flags=''
+ nfsv4_server_enable=NO
+ nfscbd_enable=NO
+ nfscbd_flags=''
+ nfsuserd_enable=NO
+ nfsuserd_flags=''
+ timed_enable=NO
+ timed_flags=''
+ ntpdate_enable=NO
+ ntpdate_program=/usr/sbin/ntpdate
+ ntpdate_flags=-b
+ ntpdate_config=/etc/ntp.conf
+ ntpdate_hosts=''
+ ntpd_enable=NO
+ ntpd_program=/usr/sbin/ntpd
+ ntpd_config=/etc/ntp.conf
+ ntpd_sync_on_start=NO
+ ntpd_flags=''
+ ntp_src_leapfile=/etc/ntp/leap-seconds
+ ntp_db_leapfile=/var/db/ntpd.leap-seconds.list
+ ntp_leapfile_sources=https://www.ietf.org/timezones/data/leap-seconds.list
+ ntp_leapfile_fetch_opts=-mq
+ ntp_leapfile_expiry_days=30
+ ntp_leapfile_fetch_verbose=NO
+ nis_client_enable=NO
+ nis_client_flags=''
+ nis_ypset_enable=NO
+ nis_ypset_flags=''
+ nis_server_enable=NO
+ nis_server_flags=''
+ nis_ypxfrd_enable=NO
+ nis_ypxfrd_flags=''
+ nis_yppasswdd_enable=NO
+ nis_yppasswdd_flags=''
+ nis_ypldap_enable=NO
+ nis_ypldap_flags=''
+ bsnmpd_enable=NO
+ bsnmpd_flags=''
+ defaultrouter=NO
+ static_arp_pairs=''
+ static_ndp_pairs=''
+ static_routes=''
+ gateway_enable=NO
+ routed_enable=NO
+ routed_program=/sbin/routed
+ routed_flags=-q
+ arpproxy_all=NO
+ forward_sourceroute=NO
+ accept_sourceroute=NO
+ hcsecd_enable=NO
+ hcsecd_config=/etc/bluetooth/hcsecd.conf
+ sdpd_enable=NO
+ sdpd_control=/var/run/sdp
+ sdpd_groupname=nobody
+ sdpd_username=nobody
+ bthidd_enable=NO
+ bthidd_config=/etc/bluetooth/bthidd.conf
+ bthidd_hids=/var/db/bthidd.hids
+ bthidd_evdev_support=AUTO
+ rfcomm_pppd_server_enable=NO
+ rfcomm_pppd_server_profile='one two'
+ rfcomm_pppd_server_one_channel=1
+ rfcomm_pppd_server_two_channel=3
+ ubthidhci_enable=NO
+ netwait_enable=NO
+ netwait_timeout=60
+ netwait_if_timeout=30
+ icmp_bmcastecho=NO
+ ipv6_network_interfaces=auto
+ ipv6_activate_all_interfaces=NO
+ ipv6_defaultrouter=NO
+ ipv6_static_routes=''
+ ipv6_gateway_enable=NO
+ ipv6_cpe_wanif=NO
+ ipv6_privacy=NO
+ route6d_enable=NO
+ route6d_program=/usr/sbin/route6d
+ route6d_flags=''
+ ipv6_default_interface=NO
+ rtsol_flags=''
+ rtsold_enable=NO
+ rtsold_flags=-a
+ rtadvd_enable=NO
+ rtadvd_interfaces=''
+ stf_interface_ipv4addr=''
+ stf_interface_ipv4plen=0
+ stf_interface_ipv6_ifid=0:0:0:1
+ stf_interface_ipv6_slaid=0000
+ ipv6_ipv4mapping=NO
+ ipv6_ipfilter_rules=/etc/ipf6.rules
+ ip6addrctl_enable=YES
+ ip6addrctl_verbose=NO
+ ip6addrctl_policy=AUTO
+ keyboard=''
+ keymap=NO
+ keyrate=NO
+ keybell=NO
+ keychange=NO
+ cursor=NO
+ scrnmap=NO
+ font8x16=NO
+ font8x14=NO
+ font8x8=NO
+ blanktime=300
+ saver=NO
+ moused_nondefault_enable=YES
+ moused_enable=NO
+ moused_type=auto
+ moused_port=/dev/psm0
+ moused_flags=''
+ mousechar_start=NO
+ allscreens_flags=''
+ allscreens_kbdflags=''
+ mta_start_script=/etc/rc.sendmail
+ sendmail_enable=NO
+ sendmail_pidfile=/var/run/sendmail.pid
+ sendmail_procname=/usr/sbin/sendmail
+ sendmail_flags='-L sm-mta -bd -q30m'
+ sendmail_cert_create=YES
+ sendmail_submit_enable=YES
+ sendmail_submit_flags='-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost'
+ sendmail_outbound_enable=YES
+ sendmail_outbound_flags='-L sm-queue -q30m'
+ sendmail_msp_queue_enable=YES
+ sendmail_msp_queue_flags='-L sm-msp-queue -Ac -q30m'
+ sendmail_rebuild_aliases=NO
+ auditd_enable=NO
+ auditd_program=/usr/sbin/auditd
+ auditd_flags=''
+ auditdistd_enable=NO
+ auditdistd_program=/usr/sbin/auditdistd
+ auditdistd_flags=''
+ cron_enable=YES
+ cron_program=/usr/sbin/cron
+ cron_dst=YES
+ cron_flags=''
+ cfumass_enable=NO
+ cfumass_dir=/var/cfumass
+ cfumass_image=/var/tmp/cfumass.img
+ lpd_enable=NO
+ lpd_program=/usr/sbin/lpd
+ lpd_flags=''
+ nscd_enable=NO
+ chkprintcap_enable=NO
+ chkprintcap_flags=-d
+ dumpdev=NO
+ dumpon_flags=''
+ dumpdir=/var/crash
+ savecore_enable=YES
+ savecore_flags='-m 10'
+ service_delete_empty=NO
+ crashinfo_enable=YES
+ crashinfo_program=/usr/sbin/crashinfo
+ quota_enable=NO
+ check_quotas=YES
+ quotaon_flags=-a
+ quotaoff_flags=-a
+ quotacheck_flags=-a
+ accounting_enable=NO
+ ibcs2_enable=NO
+ ibcs2_loaders=coff
+ firstboot_sentinel=/firstboot
+ sysvipc_enable=NO
+ linux_enable=NO
+ linux_mounts_enable=YES
+ clear_tmp_enable=NO
+ clear_tmp_X=YES
+ ldconfig_insecure=NO
+ ldconfig_paths='/usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg'
+ ldconfig32_paths='/usr/lib32 /usr/lib32/compat'
+ ldconfigsoft_paths='/usr/libsoft /usr/libsoft/compat /usr/local/libsoft'
+ ldconfig_paths_aout='/usr/lib/compat/aout /usr/local/lib/aout'
+ ldconfig_local_dirs=/usr/local/libdata/ldconfig
+ ldconfig_local32_dirs=/usr/local/libdata/ldconfig32
+ ldconfig_localsoft_dirs=/usr/local/libdata/ldconfigsoft
+ kern_securelevel_enable=NO
+ kern_securelevel=-1
+ update_motd=YES
+ entropy_boot_file=/boot/entropy
+ entropy_file=/entropy
+ entropy_dir=/var/db/entropy
+ entropy_save_sz=4096
+ entropy_save_num=8
+ harvest_mask=511
+ osrelease_enable=YES
+ osrelease_file=/var/run/os-release
+ osrelease_perms=444
+ dmesg_enable=YES
+ watchdogd_enable=NO
+ watchdogd_flags=''
+ watchdogd_timeout=''
+ watchdogd_shutdown_timeout=''
+ devfs_rulesets='/etc/defaults/devfs.rules /etc/devfs.rules'
+ devfs_system_ruleset=''
+ devfs_set_rulesets=''
+ devfs_load_rulesets=YES
+ performance_cx_lowest=NONE
+ performance_cpu_freq=NONE
+ economy_cx_lowest=Cmax
+ economy_cpu_freq=NONE
+ virecover_enable=YES
+ ugidfw_enable=NO
+ bsdextended_script=/etc/rc.bsdextended
+ newsyslog_enable=YES
+ newsyslog_flags=-CN
+ mixer_enable=YES
+ opensm_enable=NO
+ rctl_enable=YES
+ rctl_rules=/etc/rctl.conf
+ iovctl_files=''
+ jail_enable=NO
+ jail_conf=/etc/jail.conf
+ jail_confwarn=YES
+ jail_parallel_start=NO
+ jail_list=''
+ jail_reverse_stop=NO
+ [ -z '' ]
+ source_rc_confs_defined=yes
+ [ -r /etc/defaults/vendor.conf ]
+ source_rc_confs
+ local i sourced_files
+ sourced_files=:/etc/rc.conf:
+ [ -r /etc/rc.conf ]
+ . /etc/rc.conf
+ cron_flags=' -J 15'
+ sendmail_enable=NONE
+ sendmail_submit_enable=NO
+ sendmail_outbound_enable=NO
+ sendmail_msp_queue_enable=NO
+ syslogd_flags='-c -ss'
+ ipv6_activate_all_interfaces=YES
+ apache24_enable=yes
+ mysql_enable=yes
+ redis_enable=yes
+ php_fpm_enable=yes
+ postfix_enable=YES
+ clear_tmp_enable=YES
+ turnserver_enable=YES
+ fail2ban_enable=yes
+ ifconfig_epair0b=SYNCDHCP
+ sourced_files=:/etc/rc.conf::/etc/rc.conf.local:
+ [ -r /etc/rc.conf.local ]
+ _rc_conf_loaded=true
+ [ -n mysql ]
+ _d=/etc
+ [ -f /etc/rc.conf.d/mysql ]
+ [ -d /etc/rc.conf.d/mysql ]
+ _d=/usr/local/etc
+ [ -f /usr/local/etc/rc.conf.d/mysql ]
+ [ -d /usr/local/etc/rc.conf.d/mysql ]
+ eval '_defval=$mysql_enable_defval'
+ _defval=''
+ [ -n '' ]
+ : yes
+ : mysql
+ : /var/db/mysql
+ : /var/db/mysql/my.cnf
+ command=/usr/sbin/daemon
+ procname=/usr/local/libexec/mysqld
+ start_precmd=mysql_prestart
+ start_postcmd=mysql_poststart
+ [ -n '' ]
+ [ -n '' -a -n start ]
+ /bin/hostname
+ mysql_pidfile=/var/db/mysql/nextcloud.pid
+ pidfile=/var/db/mysql/nextcloud.pid
+ mysql_install_db=/usr/local/bin/mysql_install_db
+ mysql_install_db_args='--basedir=/usr/local --datadir=/var/db/mysql --force'
+ command_args='-c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid '
+ run_rc_command start
+ _return=0
+ rc_arg=start
+ [ -z mysql ]
+ shift 1
+ rc_extra_args=''
+ _rc_prefix=''
+ eval '_override_command=$mysql_program'
+ _override_command=''
+ command=/usr/sbin/daemon
+ _keywords='start stop restart rcvar enable disable delete enabled describe extracommands '
+ rc_pid=''
+ _pidcmd=''
+ _procname=/usr/local/libexec/mysqld
+ [ -n /usr/local/libexec/mysqld ]
+ [ -n /var/db/mysql/nextcloud.pid ]
+ _pidcmd='rc_pid=$(check_pidfile /var/db/mysql/nextcloud.pid /usr/local/libexec/mysqld )'
+ _keywords='start stop restart rcvar enable disable delete enabled describe extracommands status poll'
+ [ -z start ]
+ [ start '=' enabled ]
+ [ -n '' ]
+ eval 'rc_flags=$mysql_flags'
+ rc_flags=''
+ eval '_chdir=$mysql_chdir' '_chroot=$mysql_chroot' '_nice=$mysql_nice' '_user=$mysql_user' '_group=$mysql_group' '_groups=$mysql_groups' '_fib=$mysql_fib' '_env=$mysql_env' '_prepend=$mysql_prepend' '_login_class=${mysql_login_class:-daemon}' '_limits=$mysql_limits' '_oomprotect=$mysql_oomprotect' '_env_file=$mysql_env_file'
+ _chdir='' _chroot='' _nice='' _user=mysql _group='' _groups='' _fib='' _env='' _prepend='' _login_class=daemon _limits='' _oomprotect='' _env_file=''
+ [ -n '' ]
+ [ -n mysql ]
+ eval if [ -x /usr/bin/id '];' then /usr/bin/id '-un;' fi
+ [ -x /usr/bin/id ]
+ /usr/bin/id -un
+ [ mysql '=' root ]
+ [ -z '' ]
+ eval 'rc_pid=$(check_pidfile' /var/db/mysql/nextcloud.pid /usr/local/libexec/mysqld ')'
+ check_pidfile /var/db/mysql/nextcloud.pid /usr/local/libexec/mysqld
+ _pidfile=/var/db/mysql/nextcloud.pid
+ _procname=/usr/local/libexec/mysqld
+ _interpreter=''
+ [ -z /var/db/mysql/nextcloud.pid -o -z /usr/local/libexec/mysqld ]
+ [ ! -f /var/db/mysql/nextcloud.pid ]
+ debug 'pid file (/var/db/mysql/nextcloud.pid): not readable.'
+ return
+ rc_pid=''
+ [ start '!=' start ]
+ [ -n mysql_enable -a start '!=' rcvar -a start '!=' stop -a start '!=' delete -a start '!=' enable -a start '!=' describe ]
+ checkyesno mysql_enable
+ eval '_value=$mysql_enable'
+ _value=yes
+ debug 'checkyesno: mysql_enable is set to yes.'
+ return 0
+ [ start '=' start -a -z '' -a -n '' ]
+ eval '_cmd=$start_cmd' '_precmd=$start_precmd' '_postcmd=$start_postcmd'
+ _cmd='' _precmd=mysql_prestart _postcmd=mysql_poststart
+ [ -n '' ]
+ [ ! -x /usr/sbin/daemon ]
+ _run_rc_precmd
+ check_required_before start
+ local _f
+ return 0
+ [ -n mysql_prestart ]
+ debug 'run_rc_command: start_precmd: mysql_prestart '
+ eval 'mysql_prestart '
+ mysql_prestart
+ local dir
+ [ -f /etc/my.cnf ]
+ [ -f /etc/mysql/my.cnf ]
+ [ ! -d /var/db/mysql/mysql/. ]
+ [ '' '=' '' ]
+ mysql_rundir=/var/run/mysql
+ [ ! -d /var/run/mysql ]
+ return 0
+ _return=0
+ [ 0 -ne 0 ]
+ check_required_after start
+ local _f _args
+ return 0
+ return 0
+ check_startmsgs
+ [ -n '' ]
+ return 0
+ echo 'Starting mysql.'
Starting mysql.
+ [ -n '' ]
+ _cd=''
+ _doit='/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid '
+ [ -n mysql ]
+ _doit=$'su -m mysql -c \'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "\''
+ [ -n '' ]
+ [ -n '' ]
+ _doit=$' limits -C daemon su -m mysql -c \'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "\''
+ _run_rc_doit $' limits -C daemon su -m mysql -c \'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "\''
+ debug $'run_rc_command: doit: limits -C daemon su -m mysql -c \'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "\''
+ eval $' limits -C daemon su -m mysql -c \'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "\''
+ limits -C daemon su -m mysql -c 'sh -c "/usr/sbin/daemon -c -f /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/nextcloud.pid "'
+ _return=0
+ [ 0 -ne 0 ]
+ return 0
+ _run_rc_postcmd
+ [ -n mysql_poststart ]
+ debug 'run_rc_command: start_postcmd: mysql_poststart '
+ eval 'mysql_poststart '
+ mysql_poststart
+ local 'timeout=15'
+ [ ! -f /var/db/mysql/nextcloud.pid -a 15 -gt 0 ]
+ timeout=14
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 14 -gt 0 ]
+ timeout=13
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 13 -gt 0 ]
+ timeout=12
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 12 -gt 0 ]
+ timeout=11
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 11 -gt 0 ]
+ timeout=10
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 10 -gt 0 ]
+ timeout=9
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 9 -gt 0 ]
+ timeout=8
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 8 -gt 0 ]
+ timeout=7
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 7 -gt 0 ]
+ timeout=6
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 6 -gt 0 ]
+ timeout=5
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 5 -gt 0 ]
+ timeout=4
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 4 -gt 0 ]
+ timeout=3
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 3 -gt 0 ]
+ timeout=2
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 2 -gt 0 ]
+ timeout=1
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 1 -gt 0 ]
+ timeout=0
+ sleep 1
+ [ ! -f /var/db/mysql/nextcloud.pid -a 0 -gt 0 ]
+ return 0
+ _return=0
+ return 0
+ [ -n '' ]
+ return 0

Thank you
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You will find a file named something.err in /var/db/mysql. That will tell why it does not start.
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
The only err file I've found was in /var/log/mysql and it showed this

2021-11-01 22:44:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-01 22:44:04 0 [Note] InnoDB: Uses event mutexes
2021-11-01 22:44:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-01 22:44:04 0 [Note] InnoDB: Number of pools: 1
2021-11-01 22:44:04 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-11-01 22:44:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-11-01 22:44:04 0 [Note] InnoDB: Completed initialization of buffer pool
2021-11-01 22:44:04 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.5.12.
2021-11-01 22:44:04 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-11-01 22:44:04 0 [Note] InnoDB: Starting shutdown...
2021-11-01 22:44:04 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-11-01 22:44:04 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-11-01 22:44:04 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-01 22:44:04 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-11-01 22:44:04 0 [ERROR] Aborting

I'm afraid, I don't understand what's going on.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to remove the redo logs and therefore will lose some data. Do a mysqlcheck afterwards. The logfiles are probably named ib_logfileN ...
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
No, nothing with ib_logfileN... There a 100s of log files. How will I ever find them? And why has this become an issue in the first place? Sorry, just angry...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Those files are in /var/db/mysql, probably. In these files the database server logs uncommitted transactions that can be redone in case of a crash and a restart. Hence redo logs.

You had an unclean shutdown, obviously. At a clean shutdown all transactions are committed and there are no open transactions in redo logs.

Following that unclean shutdown you did an upgrade of the database software. The redo logs are tied to a particular version. So your current database server cannot complete these open transactions.

Either:

Roll back the upgrade and let the server commit the transactions, then redo the upgrade.

Or:

Throw away the redo logs, losing some open transactions.

In both cases do a mysqlcheck --all-databases --auto-repair -p and enter the database root password, afterwards.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
The only err file I've found was in /var/log/mysql and it showed this
In my jails with a databse the error log is is the jailname.err. Check that and see what you come up with.

I've had issues in the past trying to get mysql (and maridb) to run on a fresh install in a jail. Changing directory permissions for /tmp to 777 allowed the mysql.sock file to be created and saved and then everything ran fine after that. Don't know if that will help but it's worth a shot.
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
Those files are in /var/db/mysql, probably. In these files the database server logs uncommitted transactions that can be redone in case of a crash and a restart. Hence redo logs.
Correct (1). I went for solution #2 and killed the logfiles. I've found 4 files beginning with "ib...", 3 close to 1gb and 1 over 10gb...(?). However, they're gone.
You had an unclean shutdown, obviously. At a clean shutdown all transactions are committed and there are no open transactions in redo logs.
Correct(2) I was deleting a user in nextcloud when the whole server froze and I had to hard reset it. That's how it started.
Following that unclean shutdown you did an upgrade of the database software. The redo logs are tied to a particular version. So your current database server cannot complete these open transactions.
Correct(3). After I ssh'ed into the jail, I thought, well, while you're here, you can do an update, so everything is fresh and clean... big mistake.
Either:

Roll back the upgrade and let the server commit the transactions, then redo the upgrade.

Or:

Throw away the redo logs, losing some open transactions.
Did #2
In both cases do a mysqlcheck --all-databases --auto-repair -p and enter the database root password, afterwards.

So, mysql is running again, that's a huge step forward, but I'm still confronted with the "internal server error". More info should be in the server log. Where would that be and do you maybe know a name?
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
I was trying to post the output of the mysqlcheck, but hit the 30k character limit. But long story short, it found a lot of mistake and couldn't repair them... So I guess, I'm toasted now.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You should have thrown away strictly the ib_logfileN files. If you deleted an ibdata* file, your database is toast. Do you have a snapshot?
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
Yes, I do - from back in April. :rolleyes: Probably when I created the jail. So I got the punishment of beeing an ignorant idiot. That won't happen again.

Since I've got nothing to loose, I could use that snapshot and see what happens or maybe rebuild the database with the folders and try to somehow limit the damage. Or build everything from scratch.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I create hourly snapshots of everything. They don't cost a thing if no data is modified. You can have thousands of them without any negative impact.

Second if you do a fresh install of Nextcloud you can use occ file:scan or similar to get all the information about the files back into your database. You will have to recreate users and all other settings besides the file info manually.
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
Yes, I have to learn how to do that.

On your 2nd point Patrick: I'm not proficient enough to do that on my own. The user data is stored under /mnt/user/user1 to 5. The Document Root is under /usr/local/www/nextcloud. So I would setup a new jail, setup Nextcloud, create users and then what exactly? Going in the Document root and occ file:scan /mnt/data/user and that's it?

Btw, Patrick, you've been of great help and I thank you for that. I would perfectly understand if you would have got better things to do, than helping me out.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No problem. First would be to install your Nextcloud fresh. Please don't use the plugin but @danb35's script. Once you recreated your users I (or someone else here on this forum) can help you with the re-import of your data.

And for the snapshots: Tasks > Periodic Snapshot Tasks > Add - it's dead easy. Really. TrueNAS does all you need to protect your data.
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
Hello

with a fresh, clean install, everything is up to speed again after following the Dowling guide once more. Since the instance is behind a proxy, it could get rid of the ssl related setting/files from earlier on. I also used php 8 and mariadb 10.5, so it was at least good for something.

However, two curiosities occured:

1. When prompted at the first login, where one is supposed to enter the user/admin/db credentials, it skipped that part and chose sql-lite as a db (?). I then had to "upgrade" to the mysql-server install with occ. After doing so, my files from the old install where all back. After changing the database root from the default /usr/local/www/nextcloud/data to /mnt/data everything was back as if nothing ever happend. Nice!

2. I couldn't install the memcache.locking' => '\\OC\\Memcache\\Redis' directive. I did install the php-80-pecl-acpu, but when adding the directive to the config.php it gave me a Internal Server error. Don't know what to do about that. Adding apc.enable_cli = 1 in the /usr/local/etc/php/ext-20-apcu.ini didn't help. Maybe that's a 22.2.0.2 bug. But I don't know the consequences of not having the memcache.locking set.

So know I guess I have to create the other users (just about 6 or 7) and run some occ line for every user (I'd prefer that). I'd appreciate some guidance with this.

Also another thing please:

Is it common to install the turnserver in the same jail as Nextcloud or in a separate one? I had it installed in the same jail, since that way, at first, I could use the same Let's encrypt certificate. But now the instance is behind a proxy, so I'm not sure what's the best route to take here. How do I solve the certificate issue? Can the proxy somehow point to it? Install an extra certificate for coturn or just run it without one (is that possible)?

Thank you
 

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
I just tried to add a former user (with the same userid) and got an error saying can't create user, since files already exists. So maybe the user has to be brought back in another way than create it over the interface "add user".
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can rename the directory of that user in the Nextcloud data directory, create the user, delete the new empty user directory, rename your old directory with the data back, then do the occ thing.

Carefully! :wink:

Better come back to ask if the procedure is unclear - I don't have that much time just now.
 
Last edited:

RandomBloke85

Dabbler
Joined
May 22, 2021
Messages
23
I do understand the back & forth renaming part, good idea. But I don't know the occ "thing". :grin:

I'm not in a hurry at all Patrick, just answer whenever you've got the time, I can wait. Maybe than you could address the memcache/turnserver issues in post #16 as well? :smile:
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sorry, I don't run turnserver with Nextcloud and I have yet to upgrade mine to 22. You did install and enable Redis? If you want to use that as the memcache? I wonder about the apcu thing ... Redis is a different product. And you need php-redis or pecl-redis or however it is called, too.

The "occ thing" on a standard installation would be
su -m www -c "/usr/local/bin/php /usr/local/www/nextcloud/occ files:scan <username>"

Your runtime user and/or paths may be different depending on your installation.
 
Top