[Support] Linuxserver.io - Nextcloud


Recommended Posts

4 hours ago, Mustangf22 said:

So anyone able to help me? any ideas?

I thought it didnt work at all when migrated to swag. if it worked for a bit, then we should check the db. 

Open nextcloud's console and run 
occ maintenance:repair 
see if that makes any difference

 

Also check on your config.php if the mariadb ip and username/pass is correct!

Edited by skois
Link to comment
10 hours ago, skois said:

I thought it didnt work at all when migrated to swag. if it worked for a bit, then we should check the db. 

Open nextcloud's console and run 
occ maintenance:repair 
see if that makes any difference

 

Also check on your config.php if the mariadb ip and username/pass is correct!

I think you hit the nail on the head with your diagnosis. It looks like something is going wrong with the DB. Here are the results after running that command:

 

Screenshot_2020-11-09 docker exec -it nextcloud sh (PaulServer).png

 

If you want to see all of it I can copy the text...

It did not solve the problem as I suppose the problem is more than OCC can solve... I still don't have access to nextcloud

 

 

Edited by Mustangf22
Link to comment
2 minutes ago, Mustangf22 said:

I think you hit the nail on the head with your diagnosis. It looks like something is going wrong with the DB. Here are the results after running that command:

 

Screenshot_2020-11-09 docker exec -it nextcloud sh (PaulServer).png

 

If you want to see all of it I can copy the text...

It did not solve the problem as I suppose the problem is more than OCC can solve... I still don't have access to nextcloud

 

 

Let's start from the basics, so we know we are good there.

Post mariadb docker config (the template) 
On your NC config.php, you have mariadb ip se as 192.168.1.9 and port 3306. is that correct?

  • Thanks 1
Link to comment
1 minute ago, Mustangf22 said:

 

Hmm... I don't think that mariadb is supposed to be on reverse proxy. Yet, I tried it anyway and it is still the same problem...

I remember when i was using custom network i had to put it on the same in order to work. Anyway. 
Copy paste whole occ maintenance:repair output, lets dig in
 

Link to comment

Looking back I think what may have caused the issue is updating all my dockers. I was having some issues with my RAM and in diagnosing it I updated the dockers which i hadn't done for a while. It probably had been close to a year. Nextcloud docker and lots of others were updated. Maybe that caused an issue?? I did not officially update nextcloud as i never went into it to accomplish the update.

Link to comment

Okay, here it is:

root@a5a928c318db:/# 
root@a5a928c318db:/# occ maintenance:repair
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /config/www/nextcloud/lib/private/DB/Connection.php:68
Stack trace:
#0 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(420): OC\DB\Connection->connect()
#1 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(380): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(324): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(683): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /config/www/nextcloud/lib/private/DB/Connection.php(155): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(195): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /config/www/nextcloud/lib/private/DB/ConnectionFactory.php(157): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /config/www/nextcloud/lib/private/Server.php(748): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /config/www/nextcloud/lib/private/Server.php(1664): OC\ServerContainer->query('DatabaseConnect...')
#14 /config/www/nextcloud/lib/private/Server.php(421): OC\Server->getDatabaseConnection()
#15 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(70): OC\ServerContainer->query('OC\\Authenticati...', true)
#18 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(100): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /config/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true)
#21 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(70): OC\ServerContainer->query('OC\\Authenticati...', true)
#22 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(100): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /config/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true)
#25 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\ServerContainer->query('OC\\Authenticati...')
#26 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /config/www/nextcloud/lib/private/Server.php(433): OC\ServerContainer->query('OC\\Authenticati...')
#29 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\ServerContainer->query('OC\\User\\Session')
#32 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('UserSession')
#34 /config/www/nextcloud/lib/private/Server.php(1540): OC\ServerContainer->query('UserSession')
#35 /config/www/nextcloud/lib/private/Server.php(801): OC\Server->getUserSession()
#36 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\App\\AppManag...')
#38 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\ServerContainer->query('OC\\App\\AppManag...')
#39 /config/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#40 /config/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('AppManager')
#41 /config/www/nextcloud/lib/private/Server.php(1835): OC\ServerContainer->query('AppManager')
#42 /config/www/nextcloud/lib/private/legacy/app.php(347): OC\Server->getAppManager()
#43 /config/www/nextcloud/lib/private/legacy/app.php(114): OC_App::getEnabledApps()
#44 /config/www/nextcloud/lib/base.php(645): OC_App::loadApps(Array)
#45 /config/www/nextcloud/lib/base.php(1089): OC::init()
#46 /config/www/nextcloud/console.php(48): require_once('/config/www/nex...')
#47 /config/www/nextcloud/occ(11): require_once('/config/www/nex...')

 

Link to comment
2 minutes ago, Mustangf22 said:

Looking back I think what may have caused the issue is updating all my dockers. I was having some issues with my RAM and in diagnosing it I updated the dockers which i hadn't done for a while. It probably had been close to a year. Nextcloud docker and lots of others were updated. Maybe that caused an issue?? I did not officially update nextcloud as i never went into it to accomplish the update.

on nextcloud docker change the tag from latest to  18.0.3-ls76
you are using 18.0.3 right? This is what your config was saying!

Link to comment
3 minutes ago, Mustangf22 said:

I am not sure what version i am on or how to find out at the moment. Where in unraid do i go to change the tag?

 

On nextcloud template in repository "linuxserver/nextcloud:18.0.3-ls76"

Can you also post nextcloud.log from nextcloud /mnt/user/Nextcloud/nextcloud.log

Edited by skois
Link to comment
20 hours ago, Mustangf22 said:

One more thing. mariadb log seems strange to me. I don't know what it suppose to look like but it just keep repeating this:


-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 40-initialise-db: executing...
[cont-init.d] 40-initialise-db: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
201108 12:59:47 mysqld_safe Logging to syslog.
201108 12:59:47 mysqld_safe Starting mysqld daemon with databases from /config/databases
201108 12:59:49 mysqld_safe Logging to syslog.
201108 12:59:49 mysqld_safe Starting mysqld daemon with databases from /config/databases
201108 12:59:51 mysqld_safe Logging to syslog.
201108 12:59:51 mysqld_safe Starting mysqld daemon with databases from /config/databases
201108 12:59:54 mysqld_safe Logging to syslog.
201108 12:59:54 mysqld_safe Starting mysqld daemon with databases from /config/databases
201108 12:59:54 mysqld_safe Logging to syslog.
201108 12:59:54 mysqld_safe Starting mysqld daemon with databases from /config/databases
201108 12:59:56 mysqld_safe Logging to syslog.
201108 12:59:56 mysqld_safe Starting mysqld daemon with databases from /config/databases..... This keeps going forever

FYI if you are just arriving here my problem in short is that my nextcloud broke shortly after migrating to SWAG from Letsencrypt. It worked initially and not i get an error when trying to access it locally or remotely.

I'm thinking maybe database is corrupted. and nextcloud is just fine.
open mariadb docker console and try this. 
mysqlcheck -u $USER -p --auto-repair --check nextcloud

if you have followed Spaceinvaders video your user should be nextcloud, so


mysqlcheck -u nextcloud -p --auto-repair --check nextcloud

Link to comment

 

3 minutes ago, skois said:

I'm thinking maybe database is corrupted. and nextcloud is just fine.
open mariadb docker console and try this. 
mysqlcheck -u $USER -p --auto-repair --check nextcloud

if you have followed Spaceinvaders video your user should be nextcloud, so


mysqlcheck -u nextcloud -p --auto-repair --check nextcloud

This is what i get when i do that:

# mysqlcheck -u nextcloud -p --auto-repair --check nextcloud
Enter password:
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
#

Link to comment
1 minute ago, Mustangf22 said:

 

This is what i get when i do that:

# mysqlcheck -u nextcloud -p --auto-repair --check nextcloud
Enter password:
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
#

You might have a broken mariadb. Try force update 
Docker tab -> Upper right corner turn on advanced view -> update container mariadb.

Link to comment
Just now, Mustangf22 said:

can i Just delete mariadb entirely and start from scratch? will that affect my nextcloud?

you will definately lose all your tasks and mails. 

 

Stop nextcloud docker.

can you backup all your contents of your mariadb appdata folder? 
Then delete them from there. 
force update mariadb docker. 
login to mariadb console
 

mysql -uroot -p

 

CREATE USER 'nextcloud' IDENTIFIED by 'password';

 

CREATE DATABASE IF NOT EXISTS nextcloud;

 

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud' IDENTIFIED BY 'password';

 

quit

 

mysqlcheck -u nextcloud -p --auto-repair --check nextcloud

 

Still dont start nextcloud yet. Lets see if this works and dont give you an error.

After that we'll try restore db's

 

Link to comment
23 minutes ago, skois said:

you will definately lose all your tasks and mails. 

 

Stop nextcloud docker.

can you backup all your contents of your mariadb appdata folder? 
Then delete them from there. 
force update mariadb docker. 
login to mariadb console
 

mysql -uroot -p

 

CREATE USER 'nextcloud' IDENTIFIED by 'password';

 

CREATE DATABASE IF NOT EXISTS nextcloud;

 

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud' IDENTIFIED BY 'password';

 

quit

 

mysqlcheck -u nextcloud -p --auto-repair --check nextcloud

 

Still dont start nextcloud yet. Lets see if this works and dont give you an error.

After that we'll try restore db's

 

Okay! success on that bit. I had to remove and the reinstall mariadb from the previous apps though instead of forcing update.

mariadb seems to be working correctly now. Granted, i failed to change the 'password' to anything harder than 'password'

 

Edited by Mustangf22
Link to comment
5 minutes ago, skois said:

Yea, you can keep a copy of the working appdata folder also just in case.

Well now I'm back to the same broken mariadb...

it won't respond to: mysqlcheck -u nextcloud -p --auto-repair --check nextcloud

I just get:

mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect

 

and it is looping again in the log:

mysqld_safe Starting mysqld daemon with databases from /config/databases
201109 10:58:02 mysqld_safe Logging to syslog.

 

 

Edited by Mustangf22
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.