[Solved] (Mysql8) Error when running pydio/cells docker: "failed to initialize storage: failed to open migrations: creating dex_migration table: Error 1193: Unknown system variable 'tx_isolation'"


#1

I am running the pydio/cells docker container on an EC2 in AWS. The database is an Amazon RDS/Aurora database with MySQL 8 compatibility.

When I run the docker container, the initialization process seems to be OK - and checking the MySQL database, I can see that it has created tables.

The log is:

 $ docker-compose -f docker-compose-pydio.yaml up
    Starting pydio_cells_1
    Attaching to pydio_cells_1
    cells_1  | 2019-02-09T15:06:23.839Z     INFO    pydio.grpc.update       started
    cells_1  | 2019-02-09T15:06:23.909Z     INFO    pydio.grpc.data.objects started
    cells_1  | 2019-02-09T15:06:23.909Z     INFO    pydio.grpc.data.objects Starting umbrella service pydio.grpc.data.objects. with sources {"sources": ["local1"]}
    cells_1  | 2019-02-09T15:06:23.910Z     INFO    pydio.grpc.data.sync    started
    cells_1  | 2019-02-09T15:06:23.910Z     INFO    pydio.grpc.data.sync    Starting umbrella service pydio.grpc.data.sync. with sources    {"sources": ["pydiods1", "personal", "cellsdata"]}
    cells_1  | 2019-02-09T15:06:23.950Z     INFO    pydio.grpc.log  started
    cells_1  | 2019-02-09T15:06:23.966Z     INFO    pydio.grpc.docstore     started
    cells_1  | 2019-02-09T15:06:24.122Z     INFO    pydio.gateway.rest      started
    cells_1  | 2019-02-09T15:06:24.162Z     INFO    pydio.grpc.jobs started
    cells_1  | 2019-02-09T15:06:24.195Z     INFO    pydio.grpc.chat started
    cells_1  | 2019-02-09T15:06:24.303Z     INFO    pydio.web.statics       started
    cells_1  | 2019-02-09T15:06:25.223Z     INFO    pydio.grpc.config       started
    cells_1  | 2019-02-09T15:06:25.671Z     INFO    pydio.grpc.mailer       Starting mailer with queue 'boltdb'
    cells_1  | 2019-02-09T15:06:25.672Z     INFO    pydio.grpc.mailer       Starting mailer with sender 'smtp'
    cells_1  | 2019-02-09T15:06:25.673Z     INFO    pydio.grpc.mailer       started
    cells_1  | 2019-02-09T15:06:25.855Z     INFO    pydio.grpc.acl  started
    cells_1  | 2019-02-09T15:06:25.988Z     INFO    pydio.grpc.user-key     started
    cells_1  | 2019-02-09T15:06:26.167Z     INFO    pydio.grpc.policy       started
    cells_1  | 2019-02-09T15:06:26.478Z     INFO    pydio.grpc.meta started
    cells_1  | 2019-02-09T15:06:26.937Z     INFO    pydio.gateway.websocket started
    cells_1  | 2019-02-09T15:06:27.041Z     INFO    pydio.grpc.role started
    cells_1  | 2019-02-09T15:06:27.042Z     INFO    pydio.grpc.workspace    started
    cells_1  | 2019-02-09T15:06:27.233Z     INFO    pydio.grpc.tree started
    cells_1  | 2019-02-09T15:06:27.291Z     INFO    pydio.grpc.user-meta    started
    cells_1  | Activating privacy features... done.
    cells_1  | http://my_server_name:8080
    cells_1  | 2019-02-09T15:06:27.557Z     INFO    http://my_server_name:8080
    cells_1  | 2019-02-09T15:06:27.336Z     INFO    pydio.grpc.tasks        started
    cells_1  | 2019-02-09T15:06:27.436Z     ERROR   pydio.grpc.tasks        Streamer PutTaskStream  {"error": "{\"id\":\"go.micro.client\",\"code\":500,\"detail\":\"none available\",\"status\":\"Internal Server Error\"}"}
    cells_1  | 2019-02-09T15:06:28.365Z     INFO    pydio.grpc.timer        started
    cells_1  | 2019-02-09T15:06:28.376Z     INFO    pydio.grpc.activity     started
    cells_1  | 2019-02-09T15:06:28.391Z     INFO    pydio.grpc.websocket    started
    cells_1  | 2019-02-09T15:06:28.400Z     INFO    pydio.grpc.data-key     started
    cells_1  | 2019-02-09T15:06:28.516Z     INFO    pydio.grpc.data.index   started
    cells_1  | 2019-02-09T15:06:28.517Z     INFO    pydio.grpc.data.index   Starting umbrella service pydio.grpc.data.index. with sources   {"sources": ["pydiods1", "personal", "cellsdata"]}
    cells_1  | 2019-02-09T15:06:28.607Z     INFO    pydio.gateway.proxy     started
    cells_1  | 2019-02-09T15:06:28.648Z     INFO    pydio.grpc.changes      started
    cells_1  | 2019-02-09T15:06:29.324Z     INFO    pydio.grpc.data.sync.personal   started
    cells_1  | 2019-02-09T15:06:29.525Z     INFO    pydio.grpc.data.objects.local1  started
    cells_1  | 2019-02-09T15:06:29.526Z     INFO    pydio.grpc.data.objects.local1  Starting objects service local1
    cells_1  | 2019-02-09T15:06:29.524Z     INFO    pydio.grpc.data.sync.cellsdata  started
    cells_1  | 2019-02-09T15:06:29.523Z     INFO    pydio.grpc.data.sync.pydiods1   started
    cells_1  | 2019-02-09T15:06:29.715Z     INFO    pydio.grpc.user started
    cells_1  | 2019-02-09T15:06:32.989Z     INFO    pydio.web.auth  config using log level: debug
    cells_1  | 2019-02-09T15:06:32.990Z     INFO    pydio.web.auth  config issuer: http://my_server_name:80/auth/dex
    cells_1  | 2019-02-09T15:06:33.186Z     INFO    pydio.grpc.auth started
    cells_1  | 2019-02-09T15:06:33.325Z     INFO    pydio.grpc.data.index.personal  started
    cells_1  | 2019-02-09T15:06:33.329Z     INFO    pydio.grpc.data.index.cellsdata started
    cells_1  | 2019-02-09T15:06:33.365Z     INFO    pydio.grpc.data.index.pydiods1  started
    cells_1  | 2019-02-09T15:06:33.446Z     FATAL   failed to init micro service    {"error": "failed to initialize storage: failed to open migrations: creating dex_migration table: Error 1193: Unknown system variable 'tx_isolation'"}

Any ideas what might be going on?

Thanks,

Martin


#2

Hi Martin,

the problem are are changes made in MySQL 5.7 and 8 - ‘tx_isolation’ has been depreciated in 5.7.20 and an alias has been added called 'transaction_isolation. In MySQL 8 tx_isolation has been removed entirely leaving the former alias.

The means that cells will not run with MySQL 8 currently. Code changes are needed to allow both, pre 5.7.20 (tx_isolation) and 5.7.20 and later (transaction_isolation). It should however not be a big task I guess, as this variable is rarely used. An option would be by to use the “set transaction” statement instead of setting the isolation level as connection parameter. “set transaction” is supported in all versions and will not cause compatibility issues - it will, however, add a slight overhead due to the additional statement needed.

Does Amazon RDS allow to change the MySQL compatibility mode to 5.7? If so, this should solve your issues for now.


#3

I guess I have found a solution (@Charles, I added a PR for a possibe fix).


#4

Hi,
as John pointed it out, it might be related to mysql 8, for the time being we are not compatible with mysql 8.
thanks again @falk.john for the help.


#5

Sorry for the delay - I was on holiday the last week. I’ve now had time to switch to MySQL 5.6 and cells start up correctly.

Thanks for your help!


closed #6

opened #7

closed #8