nextcloud installing Problem

varcal

Explorer
Joined
Jan 4, 2018
Messages
60
I just installed truenes and I tried to install nextcloud plugin and I get this after the install

Plugin installed successfully
Install Notes:
nginx_enable: -> YES
mysql_enable: -> YES
php_fpm_enable: -> YES
Performing sanity check on nginx configuration:
Starting nginx.
Performing sanity check on php-fpm configuration:
Starting php_fpm.
Starting mysql.
Starting mysql.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('JK8CPOK07YDS0gwe') WHERE User='root'' at line 1
Using NAT Address: 192.168.11.202
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('JK8CPOK07YDS0gwe') WHERE User='root'' at line 1
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'dbadmin'@'localhost' (using password: YES)
Trace: #0 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(69): OC\DB\Exceptions\DbalException::wrap()
#1 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#2 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#3 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#4 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#5 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#6 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#7 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#8 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#10 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#11 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#12 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#13 {main}

Previous: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'dbadmin'@'localhost' (using password: YES)
Trace: #0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(66): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#5 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#6 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#7 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#8 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#10 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#13 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#14 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#15 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#16 {main}
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('JK8CPOK07YDS0gwe') WHERE User='root'' at line 1
Nextcloud is not installed - only a limited number of commands are available
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('JK8CPOK07YDS0gwe') WHERE User='root'' at line 1
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "config:system" namespace.
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "config:system" namespace.
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "db" namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the "db" namespace.
Stopping php_fpm.

There are no commands defined in the "db" namespace.

There are no commands defined in the "db" namespace.
Waiting for PIDS: 24813.

There are no commands defined in the "db" namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the "db" namespace.
Starting php_fpm.

There are no commands defined in the "db" namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the "db" namespace.
Stopping nginx.

There are no commands defined in the "db" namespace.

There are no commands defined in the "db" namespace.

There are no commands defined in the "db" namespace.
Waiting for PIDS: 24802, 24802.

There are no commands defined in the "db" namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the "db" namespace.
Starting nginx.

There are no commands defined in the "db" namespace.
Admin Portal:
http://192.168.11.122


is this right it dose not look right to me

after setting the jails I go to mange and I enter the info it asks but I get this and I can't pass this step

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'dbadmin'@'localhost' (using password: YES)

please help
 

varcal

Explorer
Joined
Jan 4, 2018
Messages
60
it looks like my nextcloud is not fully install how do I get it to fully install what am I missing can I reinstall in from command line
 

BestRaider

Dabbler
Joined
May 8, 2021
Messages
10
Plugin installed successfully
Install Notes:
nginx_enable: -> YES
mysql_enable: -> YES
php_fpm_enable: -> YES
Performing sanity check on nginx configuration:
Starting nginx.
Performing sanity check on php-fpm configuration:
Starting php_fpm.
Starting mysql.
Starting mysql.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('BipJYKDLsCABEV23') WHERE User='root'' at line 1
Using NAT Address: 192.168.1.8
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('BipJYKDLsCABEV23') WHERE User='root'' at line 1
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Trace: #0 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(69): OC\DB\Exceptions\DbalException::wrap()
#1 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#2 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#3 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#4 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#5 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#6 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#7 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#8 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#10 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#11 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#12 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#13 {main}

Previous: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Trace: #0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(66): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#5 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#6 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#7 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#8 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#10 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#13 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#14 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#15 /usr/local/www/nextcloud/occ(11): require_once('/usr/local/www/...')
#16 {main}
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('BipJYKDLsCABEV23') WHERE User='root'' at line 1
Nextcloud is not installed - only a limited number of commands are available
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('BipJYKDLsCABEV23') WHERE User='root'' at line 1
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "config:system" namespace.
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "config:system" namespace.
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the "db" namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the "db" namespace.
Stopping php_fpm.

There are no commands defined in the "db" namespace.

There are no commands defined in the "db" namespace.
Waiting for PIDS: 76781.

There are no commands defined in the "db" namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the "db" namespace.
Starting php_fpm.

There are no commands defined in the "db" namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the "db" namespace.
Stopping nginx.

There are no commands defined in the "db" namespace.

There are no commands defined in the "db" namespace.
Waiting for PIDS: 76766.

There are no commands defined in the "db" namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the "db" namespace.
Starting nginx.

There are no commands defined in the "db" namespace.
Admin Portal:

i have the same problem ....I've been trying to solve it for over a week now ...but no solution :(
 
Joined
May 8, 2021
Messages
3
I think this may be an issue with the installation script for the plugin. The grant all privileges command doesn't seem to work when configuring the password inline. Theoretically this may be fixed by creating the user and then granting privileges
 

BestRaider

Dabbler
Joined
May 8, 2021
Messages
10
I think this may be an issue with the installation script for the plugin. The grant all privileges command doesn't seem to work when configuring the password inline. Theoretically this may be fixed by creating the user and then granting privileges
ok ....fair enough ...but what name should i give to the username ?
 

rapot

Cadet
Joined
May 9, 2021
Messages
1
iocage console nextcloud
mysql -V
8 ? nextcloud plugin works correctly with the version 5.
 
Joined
May 8, 2021
Messages
3
ok ....fair enough ...but what name should i give to the username ?

More that the plugin will need to be fixed. It looks like there's a syntax difference in the mysql difference so the db user creation and then ALL the subsequent DB commands fail to execute because of it.
 

ItsSK

Cadet
Joined
May 20, 2017
Messages
3
It does seem like the NextCloud plugin in TrueNAS 12.0-U3 has installation issues, I spent hours trying to figure out why it wouldn't work. I have a second system running FreeNAS 11.3-U5 and it was able to install NextCloud with no issues, so I took that .json file and copied it over to my TrueNAS box and ran the install, and it seems to work for now.

I've attached a how-to that contains the contents of the JSON file.
 

Attachments

  • How-To Install NextCloud with Proxy.txt
    1.9 KB · Views: 573

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Nextcloud 20 requires MySQL 8. Save yourselves the trouble of messing with the plugin and install Nextcloud in a standard jail. If this is beyond your capabilities you won't be happy with a self hosted Nextcloud anyway. We are always willing to help with minor problems, but if you run your own Nextcloud you have become a web server, application engine and database admin. Congratulations.

There are so many things that are mandatory after e.g. each and every MySQL update, that can not be extensively covered here but rely on "knowing MySQL". Seriously.

HTH, as I said, always willing to help anyone who wants to start the journey into system administration ...
 
Joined
May 8, 2021
Messages
3
I think the Plugin should include some more disclosures on the description since it conveys a sense that it's easier to install/manage than it actually is. It's a nice to have, but ultimately it's a lot of moving targets for the plugin to track and maintain, and without support/dev on the plugin on an ongoing basis, it's not really a great experience.

After doing more research, it definitely makes more sense to just self-configure and run it separately from the actual TrueNAS installation (for a few reasons), that and it's a good learning exercise for how NextCloud actually works/can be maintained.
 
Joined
Jan 4, 2014
Messages
1,644

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Joined
Jan 4, 2014
Messages
1,644
Still heed my words, please. As soon as you do your first update after initial installation you will have to know your way around MySQL ...
I'm pretty sure danb35's script uses MariaDB (v10.3) in favour of MySQL, but your words still ring true.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Nextcloud 20 requires MySQL 8. Save yourselves the trouble of messing with the plugin and install Nextcloud in a standard jail. If this is beyond your capabilities you won't be happy with a self hosted Nextcloud anyway. We are always willing to help with minor problems, but if you run your own Nextcloud you have become a web server, application engine and database admin. Congratulations.

There are so many things that are mandatory after e.g. each and every MySQL update, that can not be extensively covered here but rely on "knowing MySQL". Seriously.

HTH, as I said, always willing to help anyone who wants to start the journey into system administration ...

Whilst i agree with your statements on maintenance, i still wonder what the point is of having a published plugin "supported" by IXsystems that doesn't work out of the box, which basically is the whole concept of the plugins in the first place. My NC is installed as a plugin, and whilst i also had some minor hiccups to get it entirely how i wanted, it has worked great so far. I must say though that with the recent issues reported, i am very concerned updating the plugin and will leave "as-is" for now until i see some more encouraging feedback.
 

twyrick

Dabbler
Joined
Jan 16, 2021
Messages
13
Yep! I've been running NextCloud on my FreeNAS for the better part of a year now, and I really only started having major problems after the upgrade from FreeNAS to TrueNAS.

Back when I first wanted to use NextCloud, the plugin offered was woefully inadequate. Full of configuration issues that made it not only really insecure, but a lot of broken configuration files so it barely ran properly at all. (Couldn't even check itself for updates properly via the web UI, etc.) I put a lot of time and effort into fixing the major problems and posted what I learned in the forums to help others, but ultimately -- I had to do the whole installation from scratch in a new iocage jail to really get it right.

Unfortunately, that installation just stopped working for me with the last TrueNAS update I did. I'm not very good with SQL but know just enough to be able to do minor edits to a DB when someone documents what needs changing, etc. I've been able to keep my Nextcloud going from something like version 10 or 11 through 20. But things just fell apart for me after that. My "letsencrypt" configuration stopped working to grab updated SSL certs and I broke pretty much everything trying to do a "pkg upgrade" that patched a good 40 or so packages on the installation. (It looked like it decided to remove my existing mariadb installation as part of that upgrade, and I never got it to behave properly again after trying to manually reinstall a newer version of it.)

I even tried to roll back my nextcloud jail to one that worked the other day, before all of this broke -- and it, too, refused to run anymore.

I was really hoping this updated Nextcloud 21 plug-in would be a solution to quickly get me back up and running, if they updated it enough to work with current systems. But looks like they didn't. (Got the same installation errors mentioned above with it.)

Frankly, I may just scrap the whole thing and see what other alternatives I've got? Nextcloud is really cool when it's working properly, but it's kind of a nightmare of apps with dependencies that all have to work in harmony -- and the whole time? They're pretty rapidly releasing whole new versions of Nextcloud itself. I thought some friends of mine would appreciate me creating them logins on mine so they had a personal cloud to store things on. But none of them ever really used it, after a few initial logins to look around. I mainly used it for easily syncing photos to it from my iPhone.

On top of all that? The functionality they often talk about where Nextcloud allows collaborative editing of Office type documents seems like it really only works in a Linux environment. (The open source Office suite it uses to make that part work requires a library that they never ported to BSD.)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The functionality they often talk about where Nextcloud allows collaborative editing of Office type documents seems like it really only works in a Linux environment.

Edit: Never mind, I'd forgotten that this method sets up the office suite in a Linux VM--but you can still do it all on Free/TrueNAS.
 
Last edited:

Manitou

Cadet
Joined
Mar 13, 2017
Messages
3
Just found this topic while I wondering why the plugin not working for days. Now I am heading to get a new standard jail for Nextcloud, hope I can handle it.
 
Top