Update to 10.0.0
Ubuntu 16.04
PHP 7.0.15-0ubuntu0.16.04.4
Apache/2.4.18
MySQL Ver 14.14 Distrib 5.7.17
Are you using encryption: yes
Are you using an external user-backend, if yes which one: No
It's a fresh install updated directly from 9 to 10, so impossible to access the admin page.
ownCloud will be updated to version 10.0.0
These apps will be updated:
Activity (activity)
oc_activity CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;': SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBsPreparing update
Set log level to debug
Turned on maintenance mode
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_activity CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;': SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
I've modified max_allowed_packet and innodb_log_file_size without success ...
This is an issue with the update order ....
Do you have shell access? If yes please run
```
./occ migrations:status activity
Mine is a clean install, php 7.0, Ubuntu, mysql, and apache2
Once the owncloud was installed I'm stuck clicking update or running the CLI to update the applications, then I receive the error OP posted.
I'm getting the same error here's what my status says
>> App: activity
>> Version Table Name: oc_migrations
>> Migrations Namespace: OCA\activity\Migrations
>> Migrations Directory: /var/www/html/owncloud/apps/activity/appinfo/Migrations
>> Previous Version: Already at first migration step
>> Current Version: 0
>> Next Version: 20161122085340
>> Latest Version: 20170131134507
>> Executed Migrations: 0
>> Executed Unavailable Migrations: 0
>> Available Migrations: 3
>> New Migrations: 3
@DeepDiver1975 any update ?
Dist: Gentoo
MariaDB: 10.1.24
I got this error after migrating MariaDB to Barracuda format & running ./occ maintenance:repair
Hi,
With "sudo -u www-data ./occ migrations:status activity" I have :
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command" "app".
Is it a known issue of update order ?
Thanks to a user of the other cloud solution I was pointed in a helpful direction. It seems that this problem is related to the 4 byte UTF support (the mysql.utf8mb4 setting in the config file).
I was able to fix my problems by following this chain of occ commands:
sudo -u www-data ./occ maintenance:mode --on
sudo -u www-data ./occ config:system:set mysql.utf8mb4 --type boolean --value="false"
sudo -u www-data ./occ upgrade
sudo -u www-data ./occ config:system:set mysql.utf8mb4 --type boolean --value="true"
sudo -u www-data ./occ db:convert-mysql-charset
sudo -u www-data ./occ maintenance:mode --off
Hello! The same problem is here.
``ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLEoc_activity` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
Update failed
Maintenance mode is kept active
Reset log level
```
ownCloud after container is started should run normally
Ubuntu 16.04:
ownCloud version: 10.0.2 dockerized
Updated from an older ownCloud: 9.1.7
./occ config:system:set mysql.utf8mb4 --type boolean --value="false"
./occ upgrade
didn't help
www-data@ef8fcfa0c2c8: ~/owncloud # ./occ config:system:set mysql.utf8mb4 --type boolean --value="false"
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
System config value mysql.utf8mb4 set to boolean false
www-data@ef8fcfa0c2c8: ~/owncloud # ./occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE `oc_activity` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
Update failed
Maintenance mode is kept active
Reset log level
@kovalroma you might need to also update the activity app. Best would be updating to 10.0.4 and also update the activity app to its latest version. From what I remember the app itself also comes with some schema changes that are needed before the mb4 switch can be enabled.
cc @DeepDiver1975
@PVince81 I thought the activity app updated automatically with docker container. Because my owncloud based on official docker image.
How can I update an activity app from docker container? Should I enter to the docker and replace some files there? Is there any instruction ?
@DeepDiver1975 any idea ?
Still valid for ownCloud 10.0.4
ownCloud version: 10.0.4 dockerized
Updated from an older ownCloud: 9.1.7
I took a look at the definition of the oc_activity table and before the update (ownCloud 9.1.7, activity plugin 2.3.2) it looked like this:
MariaDB [owncloud]> describe oc_activity;
+---------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+----------------+
| activity_id | int(11) | NO | PRI | NULL | auto_increment |
| timestamp | int(11) | NO | MUL | 0 | |
| priority | int(11) | NO | | 0 | |
| type | varchar(255) | YES | | NULL | |
| user | varchar(64) | YES | | NULL | |
| affecteduser | varchar(64) | NO | MUL | NULL | |
| app | varchar(255) | NO | | NULL | |
| subject | varchar(255) | NO | | NULL | |
| subjectparams | varchar(4000) | NO | | NULL | |
| message | varchar(255) | YES | | NULL | |
| messageparams | varchar(4000) | YES | | NULL | |
| file | varchar(4000) | YES | | NULL | |
| link | varchar(4000) | YES | | NULL | |
| object_type | varchar(255) | YES | MUL | NULL | |
| object_id | int(11) | NO | | 0 | |
+---------------+---------------+------+-----+---------+----------------+
For a fresh install of ownCloud with activity plugin 2.3.6 this table looks like this:
MariaDB [owncloud]> describe oc_activity;
+---------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+----------------+
| activity_id | bigint(20) | NO | PRI | NULL | auto_increment |
| timestamp | int(11) | NO | MUL | 0 | |
| priority | int(11) | NO | | 0 | |
| type | varchar(255) | YES | | NULL | |
| user | varchar(64) | YES | | NULL | |
| affecteduser | varchar(64) | NO | MUL | NULL | |
| app | varchar(255) | NO | | NULL | |
| subject | varchar(255) | NO | | NULL | |
| subjectparams | longtext | NO | | NULL | |
| message | varchar(255) | YES | | NULL | |
| messageparams | longtext | YES | | NULL | |
| file | varchar(4000) | YES | | NULL | |
| link | varchar(4000) | YES | | NULL | |
| object_type | varchar(255) | YES | MUL | NULL | |
| object_id | bigint(20) | NO | | 0 | |
+---------------+---------------+------+-----+---------+----------------+
That is the column subjectparams and messageparams are of type longtext instead of varchar(4000) and the columns activity_id and object_id are of type bigint(20) instead of int(11). The old structure seems to originate from a rather old version of the activity plugin (as the longtext change was made in december 2016) and was obviously never updated with updates of the plugin.
I modified my dump of the owncloud database to create the table with the correct structure and was able to update to 10.0.4 successfully.
Instruction helps me correctly upgrade to 10.0.4.
ownCloud (docker version 9.1.7) stopped with docker-compose down, edited .env to owncloud 10.0.2 and started with docker compose up -d
Enter to the MariaDB container
sudo docker exec -i -t 0975f6b97a67 /bin/bash
0975f6b97a67 - is a container id
In MariaDB:
mysql -h localhost -u owncloud -powncloud owncloud
ALTER TABLE oc_activity MODIFY subjectparams longtext
ALTER TABLE oc_activity MODIFY messageparams longtext
ALTER TABLE oc_activity MODIFY activity_id bigint(20)
ALTER TABLE oc_activity MODIFY object_id bigint(20);
after query is OK type exit
Enter to the owncloud container
sudo docker exec -i -t 0975f6b97a67 /bin/bash
0975f6b97a67 - is a owncloud container id
change user su www-data and ./occ upgrade . After we need to disable maintenance mode
./occ maintenance:mode --off
After this owncloud started correctly.
After I've upgrade to 10.0.2 my activity app no longer shows information.
@dpeger @pvince81 what about your experience?
closing due to lack of feedback
if this issue is still happening in 10.0.10 and you believe it's a bug, please reopen.
for configuration / environment issues, please go to http://central.owncloud.org/ for help
Lack of feedback?
I analyzed the problem as reported in this comment and identified a problem with upgrades from previous versions of the activity plugin as the database structure seemingly has not been updated to match the requirements of the latest versions.
As you can only reproduce the issue when updating owncloud or the activity plugin from a pre december 2016 version, it's kind of hard to tell, if the issue is still present in 10.0.10. But as nothing happend on this issue since 10.0.4 and the issue was valid for 10.0.4, I think it's safe to assume that the problem is still valid.
I've been able to reproduce this here now, so it will be possible to fix it: https://github.com/owncloud/activity/issues/652
@PVince81 , in owncloud/activity#652 you only mention missing indices and the missing changes on the longtext columns, while I saw missing changes for the columns activity_id and object_id as well after upgrading to 10.0.4.
Any idea, if this was fixed in the meantime?
@dpeger good point. I checked and it seems a migration was added in https://github.com/owncloud/activity/pull/584 in 2.3.6 which fixes the column type, which explains why my update test led to the column becoming bigint.
I have the same error on a fresh installation (owncloud-10.0.10.tar.bz2) via installation wizard:
Exception: {"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing 'CREATE TABLE oc_activity (activity_id INT AUTO_INCREMENT NOT NULL, timestamp INT DEFAULT 0 NOT NULL, priority INT DEFAULT 0 NOT NULL, type VARCHAR(255) DEFAULT NULL, user VARCHAR(64) DEFAULT NULL, affecteduser VARCHAR(64) NOT NULL, app VARCHAR(255) NOT NULL, subject VARCHAR(255) NOT NULL, subjectparams VARCHAR(4000) NOT NULL, message VARCHAR(255) DEFAULT NULL, messageparams VARCHAR(4000) DEFAULT NULL, file VARCHAR(4000) DEFAULT NULL, link VARCHAR(4000) DEFAULT NULL, object_type VARCHAR(255) DEFAULT NULL, object_id INT DEFAULT 0 NOT NULL, INDEX activity_time (timestamp), INDEX activity_user_time (affecteduser, timestamp), INDEX activity_filter_by (affecteduser, user, timestamp), INDEX activity_filter_app (affecteduser, app, timestamp), INDEX activity_object (object_type, object_id), PRIMARY KEY(activity_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed':\n\nSQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs" ...
System:
There is as quite similar issue here https://github.com/owncloud/activity/issues/652 but since i am not a coder nor an sysadmin, i cannot follow the instructions... any help for a "dummy-installer" ?
Most helpful comment
Instruction helps me correctly upgrade to 10.0.4.
ownCloud (docker version 9.1.7) stopped with
docker-compose down, edited .env to owncloud 10.0.2 and started withdocker compose up -dEnter to the MariaDB container
sudo docker exec -i -t 0975f6b97a67 /bin/bash0975f6b97a67 - is a container id
In MariaDB:
after query is OK type
exitEnter to the owncloud container
sudo docker exec -i -t 0975f6b97a67 /bin/bash0975f6b97a67 - is a owncloud container id
change user
su www-dataand./occ upgrade. After we need to disable maintenance mode./occ maintenance:mode --offAfter this owncloud started correctly.