github / github/gh-ost

FATAL ERROR 1105 (HY000): Failed to register slave: too long 'report-host'

Open
#734 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

I have been running into this issue when running `gh-ost` inside of some of our docker containers. When the hostname of the docker container is at least 61 characters in length, I get the following error when trying to run `gh-ost`.

```
$ cat /tmp/ghost_user.cnf
[client]
user = ghost
$ /usr/bin/gh-ost --database yelp_pushplan_execution --table pushplan_run --alter ENGINE=InnoDB --conf /tmp/ghost_user.cnf --host xx.xx.xx.xx --chunk-size 500 --force-table-names 1557255792_pushplan_run --assume-rbr
2019/05/07 20:20:05 binlogsyncer.go:79: [info] create BinlogSyncer with config {99999 mysql 10.121.133.170 3306 ghost false false }
2019/05/07 20:20:05 binlogsyncer.go:246: [info] begin to sync binlog from position (mysql-bin.000008, 951800672)
2019/05/07 20:20:05 binlogsyncer.go:139: [info] register slave for master server 10.121.133.170:3306
2019-05-07 20:20:05 FATAL ERROR 1105 (HY000): Failed to register slave: too long 'report-host'
```

The docker container is running on Ubuntu Bionic.

When I specified `--hostname` when creating the same docker container to be 61 characters instead, `gh-ost` ran without any issues.

The error message comes from https://github.com/mysql/mysql-server/blob/124c7ab1d6f914637521fd4463a993aa73403513/sql/rpl_master.cc#L161 and it looks like hostname is chosen from https://github.com/siddontang/go-mysql/blob/master/replication/binlogsyncer.go#L495

Let me know if you need any other information to reproduce this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.