Summary
Running the config migrate
command is always failing
Steps to reproduce
With mattermost 5.21.0, on CentOS 7, try:
bin/mattermost config migrate /path/to/config.json "user:pass@tcp(server:port)/mattermost?sslmode=disable&connect_timeout=10"
or
bin/mattermost config migrate /path/to/config.json "mysql://user:pass@server:port/mattermost?sslmode=disable&connect_timeout=10"
Expected behavior
Config migrate runs
Observed behavior
With connect string formatted as in config:
$ bin/mattermost config migrate ~/mattermost-installdir/config/config.json "${MM_SQLSETTINGS_DATASOURCE}"
{"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."}
{"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."}
{"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."}
{"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."}
Error: failed to migrate config: failed to access destination config <user>:<pass>@tcp(<server>:<port>)/mattermost?charset=utf8mb4: failed to load: failed to persist required changes after load: failed to write file: open /home/mattermost/mattermost-installdir/mattermost/config/<user>:<pass>@tcp(<server>:<port>)/mattermost?charset=utf8mb4: no such file or directory
Usage:
$ bin/mattermost config migrate ~/mattermost-installdir/config/config.json "${MATTERMOST_MYSQL_URL}&sslmode=disable&connect_timeout=10"
{"level":"warn","msg":"DefaultServerLocale must be one of the supported locales. Setting DefaultServerLocale to en as default value."}
{"level":"warn","msg":"DefaultClientLocale must be one of the supported locales. Setting DefaultClientLocale to en as default value."}
Error: failed to migrate config: failed to access destination config mysql://<user>:<pass>@<server>:<port>/mattermost?charset=utf8mb4&sslmode=disable&connect_timeout=10: failed to initialize: failed to create Configurations table: default addr for network '<server>:<port>' unknown
Usage:
...
I confirmed that from this shell I can telnet to the destination server and port.
I also tried:
- Passing my current config to this command with the
--config
flag (no change) - Using the IP of the destination server instead of the DNS name (no change)