[Support] Linuxserver.io - Nextcloud


Recommended Posts

Hi Dimtar,

 

I've dropped the tables in the nextcloud db and ran the wizard again. Below is the log output.

 

http://pastebin.com/xuhe981b

 

I also noticed this time I don't have the 504 error. Instead I have this message.

 

An exception occurred while executing 'INSERT INTO `oc_users` ( `uid`, `password` ) VALUES( ?, ? )' with params ["admin", "1|$2y$10$OlTPx6zAGEmTcOn3ive5I.T7UAMys924DX2Kc0mvez0wrabH89Dym"]:

SQLSTATE[HY000]: General error: 1665 Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.	

 

Link to comment

So I could be wrong but I believe this to be the potential issue the first post referred to. I had that issue too and I fixed by adding a line to the custom.cnf file inside the mariadb config folder.

The following line:

skip-log-bin

 

I added skip-log-bin to the [mysqld] section of my custom.cnf

 

[mysqld]
skip-log-bin
max_connections		= 100
connect_timeout		= 5
wait_timeout		= 600

 

I also deleted the nextcloud data and config files, droped the tables created by the last failed nextcloud install but I still got this error:

 

An exception occurred while executing 'INSERT INTO `oc_users` ( `uid`, `password` ) VALUES( ?, ? )' with params ["admin", "1|$2y$10$Nl2x6fxx3Xd7c4dsukN4HOIjBW6q3ZAH98il5DL2et3eZpnlgNRPy"]:

SQLSTATE[HY000]: General error: 1665 Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

 

Any other ideas?

Link to comment

Hey Dimtar, I used your custom.cnf file but I'm still getting the same error.

 

I wonder if it has something to do with the permissions of the custom.cnf because when I entered the mariadb container to set binlog to mixed in mysql cli I saw a message saying /etc/mysql/.../my.cnf will be ignored because it has world writable permission. /etc/mysql/.../my.cnf is soft linked to config/custom.cnf.

I tried to chmod 774 the above mentioned file but it didn't change.

 

I'm going to give {next own}cloud a miss altogether and move on to a vm instance or something. I actually had nextcloud working nicely with mariadb on my arch desktop before I converted it into an unraid machine.

 

Thanks for your help guys.

Link to comment

You can just edit the custom.cnf and change line 118 (Line number may change between versions) to

 

binlog_format=mixed

 

Hey CHBMB, I appreciate you taking the time to help. I changed that line to binlog_format=mixed and also binlog_format=row but neither worked.

 

It is as if that custom.cnf file is being ignored by mariadb.

Link to comment

You can just edit the custom.cnf and change line 118 (Line number may change between versions) to

 

binlog_format=mixed

 

Hey CHBMB, I appreciate you taking the time to help. I changed that line to binlog_format=mixed and also binlog_format=row but neither worked.

 

It is as if that custom.cnf file is being ignored by mariadb.

 

Sorry to ask this question but you're restarting the docker after changes right?

Link to comment

I meant the container, wrong terminology sorry.

 

Ah yes I did restart mariadb only. OK I'll give it one more attempt.

 

I'll delete mariadb and nextcloud and start from scratch and post back.

 

You are uncommenting the line in custom.cnf aren't you? (ie removing the # from the beginning of the line)

Link to comment

This is so awesome, im not good  at databases so if I could virtually nudge for the integration of Maria dB that would be great. 

 

Sent from my SAMSUNG-SM-N920A using Tapatalk

 

Sorry, not going to happen, we talked about it, but it's a no no for a number of reasons.  Postgres and SQLlite users for one, and we're not in favour of bundling lots of things in containers any more.  Just more stuff to go wrong.

Link to comment

YES! I managed to get my installation working. This is what I did:

 

1. Delete all traces of config files related to mariadb and nextcloud containers.

 

Install and setup MariaDB

[*]Install linuxserver/mariadb:latest

[*]docker exec -t -i mariadb /bin/bash

[*]mysql_secure_installation

[*]create new root password

[*]allow remote connection

 

Edit custom.cnf

[*]cp /config/custom.cnf /config/custom.bak.cnf

[*]vim /config/custom.cnf

[*]insert skip-log-bin to end of [mysqld]

[*]insert binlog_format=mixed after #binlog_format=row

[*]:wq

 

Create db and user

[*]mysql -u root -p

[*]CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'xxxx';

[*]CREATE DATABASE IF NOT EXISTS nextcloud;

[*]GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%' IDENTIFIED BY 'xxxx';

[*]exit

[*]restart mariadb container

 

Nextcloud

[*]Install lsiodev/nextcloud:latest

[*]https://nextcloud.app

[*]admin username

[*]admin password

[*]select mysql

[*]db name    nextcloud

[*]db username nextcloud

[*]db password xxxx

[*]db location 192.168.0.200:3306

[*]Submit

[*]and fingers crossed

 

What I did different was

  • edit the custom.cnf file inside the mariadb container so it keeps the file permissions. I think editing the file from the shared folder in my client machine screwed things up and mysql ignored the custom.cnf

 

And to think I was so close to giving up!

 

Thanks to Dimtar and CHBMB for your help too :)

Link to comment

This is so awesome, im not good  at databases so if I could virtually nudge for the integration of Maria dB that would be great. 

 

Sent from my SAMSUNG-SM-N920A using Tapatalk

 

Sorry, not going to happen, we talked about it, but it's a no no for a number of reasons.  Postgres and SQLlite users for one, and we're not in favour of bundling lots of things in containers any more.  Just more stuff to go wrong.

 

well damn it, i guess im going to have to learn some mariaDB or run it in a vm, thank you either way.

for getting the container put together.

Link to comment

This is so awesome, im not good  at databases so if I could virtually nudge for the integration of Maria dB that would be great. 

 

Sent from my SAMSUNG-SM-N920A using Tapatalk

 

Sorry, not going to happen, we talked about it, but it's a no no for a number of reasons.  Postgres and SQLlite users for one, and we're not in favour of bundling lots of things in containers any more.  Just more stuff to go wrong.

 

well damn it, i guess im going to have to learn some mariaDB or run it in a vm, thank you either way.

for getting the container put together.

 

You do know that you're only going to have to do practically the same commands in regards to mysql etc to get nextcloud working in a VM ?

Link to comment

YES! I managed to get my installation working. This is what I did:

 

1. Delete all traces of config files related to mariadb and nextcloud containers.

 

Install and setup MariaDB

[*]Install linuxserver/mariadb:latest

[*]docker exec -t -i mariadb /bin/bash

[*]mysql_secure_installation

[*]create new root password

[*]allow remote connection

 

Edit custom.cnf

[*]cp /config/custom.cnf /config/custom.bak.cnf

[*]vim /config/custom.cnf

[*]insert skip-log-bin to end of [mysqld]

[*]insert binlog_format=mixed after #binlog_format=row

[*]:wq

 

Create db and user

[*]mysql -u root -p

[*]CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'xxxx';

[*]CREATE DATABASE IF NOT EXISTS nextcloud;

[*]GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%' IDENTIFIED BY 'xxxx';

[*]exit

[*]restart mariadb container

 

Nextcloud

[*]Install lsiodev/nextcloud:latest

[*]https://nextcloud.app

[*]admin username

[*]admin password

[*]select mysql

[*]db name    nextcloud

[*]db username nextcloud

[*]db password xxxx

[*]db location 192.168.0.200:3306

[*]Submit

[*]and fingers crossed

 

What I did different was

  • edit the custom.cnf file inside the mariadb container so it keeps the file permissions. I think editing the file from the shared folder in my client machine screwed things up and mysql ignored the custom.cnf

 

And to think I was so close to giving up!

 

Thanks to Dimtar and CHBMB for your help too :)

 

following the guide but when i try to connect to mysql to create users and database it gives me this error

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

 

Yes i've change the password as per the guide.

 

 

Link to comment

 

1. Delete all traces of config files related to mariadb and nextcloud containers.

 

Install and setup MariaDB

[*]Install linuxserver/mariadb:latest

[*]docker exec -t -i mariadb /bin/bash

[*]mysql_secure_installation

[*]create new root password

[*]allow remote connection

 

Edit custom.cnf

[*]cp /config/custom.cnf /config/custom.bak.cnf

[*]vim /config/custom.cnf

[*]insert skip-log-bin to end of [mysqld]

[*]insert binlog_format=mixed after #binlog_format=row

[*]:wq

 

Nextcloud

[*]Install lsiodev/nextcloud:latest

[*]https://nextcloud.app

[*]admin username

[*]admin password

[*]select mysql

[*]db name    nextcloud

[*]db username root

[*]db password root password

[*]db location 192.168.0.200:3306

[*]Submit

[*]and fingers crossed

 

 

ijuarez, try doing it the way I've edited above.  Nextcloud creates it's own user via the install I believe.

Link to comment

 

1. Delete all traces of config files related to mariadb and nextcloud containers.

 

Install and setup MariaDB

[*]Install linuxserver/mariadb:latest

[*]docker exec -t -i mariadb /bin/bash

[*]mysql_secure_installation

[*]create new root password

[*]allow remote connection

 

Edit custom.cnf

[*]cp /config/custom.cnf /config/custom.bak.cnf

[*]vim /config/custom.cnf

[*]insert skip-log-bin to end of [mysqld]

[*]insert binlog_format=mixed after #binlog_format=row

[*]:wq

 

Nextcloud

[*]Install lsiodev/nextcloud:latest

[*]https://nextcloud.app

[*]admin username

[*]admin password

[*]select mysql

[*]db name    nextcloud

[*]db username root

[*]db password root password

[*]db location 192.168.0.200:3306

[*]Submit

[*]and fingers crossed

 

 

ijuarez, try doing it the way I've edited above.  Nextcloud creates it's own user via the install I believe.

 

will do and start fresh again

 

Link to comment

well there's the extra stuff, i got it running but i think i answer the disallow remote connections questions incorrectly because it wont let me connect. Can i re-run the mysql_secure_installation again with out issues? if not its no biggie to recreate the container.

 

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.