Hi, I am unable to connect to nc server. I get the following error:
'Failed to connect to Nextcloud at http://192.168.x.x/nextcloud/status.php: Error transferring http:192.168.x.x/nextcloud/status.php - server replied: Internal Server Error.
Nextcloud 13.0.0
Debian 9
log from apache2:
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Obj in /var/www/nextcloud/lib/private/DB/Connection.php on line 64
Im unable to connect via browser nor shell.
http(s)://192.168.0.28/nextcloud/ --> blank page
http(s)://192.168.0.28 --> reaches the apache2 server page
/var/www/nextcloud# sudo -u www-data php occ status
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
I am not getting anything from both commands
netstat -an | grep 3306
ss -an | grep 3306
systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-02-21 18:28:51 CET; 6min ago
Process: 3916 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 3826 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment
Process: 3821 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 3818 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 3916 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Feb 21 18:28:47 Lianli systemd[1]: Starting MariaDB database server...
Feb 21 18:28:48 Lianli mysqld[3916]: 2018-02-21 18:28:48 140267619983936 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 3916 ...
Feb 21 18:28:51 Lianli systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 18:28:51 Lianli systemd[1]: Failed to start MariaDB database server.
Feb 21 18:28:51 Lianli systemd[1]: mariadb.service: Unit entered failed state.
Feb 21 18:28:51 Lianli systemd[1]: mariadb.service: Failed with result 'exit-code'
error log:
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: The InnoDB memory heap is disabled
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Using Linux native AIO
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Using SSE crc32 instructions
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Completed initialization of buffer pool
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Highest supported file format is Barracuda.
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: 128 rollback segment(s) are active.
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Waiting for purge to start
2018-02-21 16:54:57 140627133432384 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 135039151
2018-02-21 16:54:57 140626473514752 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-02-21 16:54:57 140627133432384 [Note] Plugin 'FEEDBACK' is disabled.
2018-02-21 16:54:57 140627133432384 [Note] Recovering after a crash using tc.log
2018-02-21 16:54:57 140627133432384 [ERROR] Can't init tc log
2018-02-21 16:54:57 140627133432384 [ERROR] Aborting
Problem solved. I deleted tc.log (it was 0 bytes) and restarted the db, it works fine now.
Problem may have appeared because my system drive is almost full.
Thanks everyone for your help!