Error with my Nextcloud plugin after a update

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
Okay cool, now the site is online.

1626084786843.png


should I click now on "Aktualisierung starten or shut I do something else?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I'd recommend doing it on the command line. The web UI might time out and leave you with a half-done upgrade.
su -m www -c '/usr/local/bin/php /usr/local/www/nextcloud/occ upgrade'
 

Leonard Lassen

Explorer
Joined
Nov 19, 2020
Messages
82
Okay, I think we had this command a long time ago :)
Yes Now It worked :) Thank you!

should I do every update with su -m www -c '/usr/local/bin/php /usr/local/www/nextcloud/occ upgrade' ?

Best regards Leonard
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
As per the Nextcloud documentation: yes, of course. :tongue:
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
Probably your MySQL or MariaDB database is not running. Look in /var/db/mysql for a file ending in .err

When i do this i get the following (opened NC.err with "nano" pkg)

I have the same "Internal Server Error" issue to the OP, and was following along (well reading) until i found this part, thought id have a look, and nada.

My Rig details etc attached

Img 1 - Files in /var/db/mysql
Img 2 - My NC.err file/log
Img 3 - Rig Info
Img 4 - NC plugin info (Installed via IXSytems plugin part)
 

Attachments

  • 4.JPG
    4.JPG
    15 KB · Views: 170
  • 3.JPG
    3.JPG
    61.2 KB · Views: 179
  • 2.JPG
    2.JPG
    25.3 KB · Views: 171
  • 1.JPG
    1.JPG
    73.7 KB · Views: 177

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What does service mysql-server status inside the jail say? What does cat NC.err show you? And please post these things as text in CODE tags, not as screenshots. Thanks.
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
What does service mysql-server status inside the jail say? What does cat NC.err show you? And please post these things as text in CODE tags, not as screenshots. Thanks.


Hi Patrick, it shows the following
Code:
root@NC:~ # service mysql-server status
mysql is not running.
root@NC:~ # cat NC.er
cat: NC.er: No such file or directory
root@NC:~ #
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
cat NC.err after you changed into the /var/db/mysql directory, of course. :wink:
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
cat NC.err after you changed into the /var/db/mysql directory, of course. :wink:


Code:
root@NC:/var/db/mysql # cat NC.err
2021-08-16T19:07:30.6NZ mysqld_safe Logging to '/var/db/mysql/NC.err'.
2021-08-16T19:07:30.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2021-08-16T19:07:30.318857Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.318865Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.318882Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T19:07:30.318940Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.318957Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.318963Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.318977Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T19:07:30.319007Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T19:07:30.320372Z 0 [System] [MY-010116] [Server] /usr/local/libexec/mysqld (mysqld 8.0.25) starting as process 56598
2021-08-16T19:07:30.380441Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T19:07:30.876229Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-16T19:07:31.032327Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-16T19:07:31.231743Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-08-16T19:07:31.231999Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-08-16T19:07:31.242247Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_type=0'.
2021-08-16T19:07:31.242791Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-08-16T19:07:32.202138Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.25)  Source distribution.
2021-08-16T19:07:32.6NZ mysqld_safe mysqld from pid file /var/db/mysql/NC.pid ended
2021-08-16T19:10:06.6NZ mysqld_safe Logging to '/var/db/mysql/NC.err'.
2021-08-16T19:10:06.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2021-08-16T19:10:07.124201Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.124210Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.124353Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T19:10:07.124541Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.124559Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.124565Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.124578Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T19:10:07.124610Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T19:10:07.125959Z 0 [System] [MY-010116] [Server] /usr/local/libexec/mysqld (mysqld 8.0.25) starting as process 70732
2021-08-16T19:10:07.207433Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T19:10:07.656489Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-16T19:10:07.944840Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-16T19:10:08.196373Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-08-16T19:10:08.196633Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-08-16T19:10:08.211901Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_type=0'.
2021-08-16T19:10:08.212448Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-08-16T19:10:09.040105Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.25)  Source distribution.
2021-08-16T19:10:09.6NZ mysqld_safe mysqld from pid file /var/db/mysql/NC.pid ended
2021-08-16T20:43:35.6NZ mysqld_safe Logging to '/var/db/mysql/NC.err'.
2021-08-16T20:43:35.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2021-08-16T20:43:35.924737Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.924746Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.924763Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:43:35.924815Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.924832Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.924838Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.924851Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:43:35.924880Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:43:35.926255Z 0 [System] [MY-010116] [Server] /usr/local/libexec/mysqld (mysqld 8.0.25) starting as process 73839
2021-08-16T20:43:36.088673Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T20:43:36.549225Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-16T20:43:36.693188Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-16T20:43:36.850963Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-08-16T20:43:36.851230Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-08-16T20:43:36.865117Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_type=0'.
2021-08-16T20:43:36.865658Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-08-16T20:43:37.899474Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.25)  Source distribution.
2021-08-16T20:43:37.6NZ mysqld_safe mysqld from pid file /var/db/mysql/NC.pid ended
2021-08-16T20:56:18.6NZ mysqld_safe Logging to '/var/db/mysql/NC.err'.
2021-08-16T20:56:18.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2021-08-16T20:56:18.642264Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.642273Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.642290Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:56:18.642341Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.642358Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.642364Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.642377Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:56:18.642406Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:56:18.643756Z 0 [System] [MY-010116] [Server] /usr/local/libexec/mysqld (mysqld 8.0.25) starting as process 76231
2021-08-16T20:56:18.698994Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T20:56:19.137352Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-16T20:56:19.282386Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-16T20:56:19.451267Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-08-16T20:56:19.451521Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-08-16T20:56:19.465731Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_type=0'.
2021-08-16T20:56:19.466271Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-08-16T20:56:20.474168Z 0 [System] [MY-010910] [Server] /usr/local/libexec/mysqld: Shutdown complete (mysqld 8.0.25)  Source distribution.
2021-08-16T20:56:20.6NZ mysqld_safe mysqld from pid file /var/db/mysql/NC.pid ended
2021-08-16T20:56:52.6NZ mysqld_safe Logging to '/var/db/mysql/NC.err'.
2021-08-16T20:56:52.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2021-08-16T20:56:52.867126Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.867135Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.867152Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:56:52.867206Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.867223Z 0 [Warning] [MY-011069] [Server] The syntax '--master-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.867228Z 0 [Warning] [MY-011069] [Server] The syntax '--relay-log-info-repository' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.867242Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-08-16T20:56:52.867271Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider notusing this option as it' is deprecated and will be removed in a future release.
2021-08-16T20:56:52.868584Z 0 [System] [MY-010116] [Server] /usr/local/libexec/mysqld (mysqld 8.0.25) starting as process 78420
2021-08-16T20:56:52.920582Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T20:56:53.344295Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-08-16T20:56:53.685746Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-08-16T20:56:53.871416Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-08-16T20:56:53.871673Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-08-16T20:56:53.88113
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So, repeating what I wrote about half a dozen times before ... here's your first clue:
Code:
2021-08-16T19:07:31.242247Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_type=0'.
2021-08-16T19:07:31.242791Z 0 [ERROR] [MY-010119] [Server] Aborting

That means the parameter query_cache_type was removed from MySQL 8, but is still present in your config file. So please edit the file /usr/local/mysql/my.cnf and remove the matching line. Then try to restart your database server with service mysql-server start and check again with service mysql-server status.

Probably it won't start up. But there will be more error messages of the same kind in the NC.err file. Look for similar problems and remove the corresponding lines from the config file. Rinse and repeat until it starts.

This is expected after every major MySQL upgrade, documented in the MySQL release notes, and in no way related to TrueNAS, FreeBSD or jails. You want to run Nextcloud? You are now a database server administrator. Congrats.

I really do not intend to be condescending, but this is frustrating. Nextcloud is not an "app" but a heck of a complex 3-tier web application ecosystem. As I wrote in another context, you were possibly not even aware that you were running a database server. There lies the problem. Not your fault.

HTH,
Patrick
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
So please edit the file /usr/local/mysql/my.cnf and remove the matching line.

this i cannot find, and i get that Nextcloud is not an app, but surely an update shouldn't brick the install, especially with they type of program it is (imo)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sorry, /usr/local/etc/mysql/my.cnf - my bad. Or possibly /usr/local/etc/my.cnf - whatever you find. It really depends on the MySQL version present before the update.
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
I now have access to the splash screen, but am stuck on this, all info in the config.php looks ok


Cannot write into "config" directory!

This can usually be fixed by giving the webserver write access to the config directory. But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So why don't you do what it tells you?

Either put the line 'config_is_read_only' => true, at the end of the config file right before the line with the closing );.
Or do cd /usr/local/www/nextcloud && chown www:www config config/config.php.

Depending on whether you want your config file to be read-only (more secure) or not (more convenient). The second command enables changing of config settings through the UI.
 

Dckr90

Dabbler
Joined
Jul 14, 2021
Messages
11
So why don't you do what it tells you?

Either put the line 'config_is_read_only' => true, at the end of the config file right before the line with the closing );.
Or do cd /usr/local/www/nextcloud && chown www:www config config/config.php.

Depending on whether you want your config file to be read-only (more secure) or not (more convenient). The second command enables changing of config settings through the UI.


I did try and add the line in the config.php file, will try them both again, as i believe i may have put the line in a different place, not at the very end.

Thank you Patrick
 
Top