Got an error reading communication packets in MySQL hosted on Docker containers with master slave replication

I have set up a master and 2 slave MySQL databases in my docker-compose.yml. When starting, they start up fine, but when I run some operations I get the error

Got an error reading communication packets

in all 3 (master, slave1 and slave2)

Here are the .cnf files for all 3

master.cnf

[mysqld]
 server-id = 1
 log_bin = /var/log/mysql/mysql-bin.log
 binlog_do_db = common
 bind-address = 0.0.0.0
 character_set_server = utf8
 collation_server = utf8_general_ci

slave-1.cnf

[mysqld]
server-id = 2
log_bin = /var/log/mysql/mysql-bin.log
relay-log = /var/log/mysql/mysql-relay-bin.log
binlog_do_db = warehouse_b2b_common
replicate_do_db = warehouse_b2b_common
bind-address = 0.0.0.0
character_set_server = utf8
collation_server = utf8_general_ci

slave-2.cnf

[mysqld]
server-id = 3
log_bin = /var/log/mysql/mysql-bin.log
relay-log = /var/log/mysql/mysql-relay-bin.log
binlog_do_db = warehouse_b2b_common
replicate_do_db = warehouse_b2b_common
bind-address = 0.0.0.0
character_set_server = utf8
collation_server = utf8_general_ci

What am I missing here?

Source: StackOverflow