[MDEV-10442] "Address already in use" on restart Created: 2016-07-26 Updated: 2018-04-02 Resolved: 2018-01-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.0.26-galera |
| Fix Version/s: | 10.2.3 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Andrzej | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Ubuntu 14.04 |
||
| Issue Links: |
|
||||||||
| Description |
|
When MariaDB starts or - more frequently - restarts and needs a state transfer, there is a recurring issue when port 4567 is already taken by a stray socat instance. I've solved this by adding "killall -9 socat" to the start) section of the init script. It works for me, but it's of course not an universal solution. My init script hack is overwritten by MariaDB upgrades so I'd like to have this issue solved upstream. What do you think would be the correct solution? I'm thinking pgrep -U mysql socat, but that may still not be robust enough. |
| Comments |
| Comment by Claudio Nanni [ 2017-11-14 ] | ||||||||||||||||||||||||||||||||
|
Hi, Experiencing the same problem, nodes can't join on Ubuntu Xenial.
and socat, xbstream, wsrep_sst_xtrabackup-v2 keep running, parenthood inherited by 'init'. As soon as you kill all the sst processes systemd restarts mysqld and the problems is back, mysqld stops, sst processes keep running. 10.1.28 seems not to contain this fix. In sql/wsrep_utils.cc:
| ||||||||||||||||||||||||||||||||
| Comment by Zdravelina Sokolovska (Inactive) [ 2018-01-22 ] | ||||||||||||||||||||||||||||||||
|
the same Error was observed on when joining new node to the cluster with srver 10.2.12 2018-01-22 15:25:21 140167331440384 [Note] WSREP: STATE EXCHANGE: got state msg: b1f7499a-ff77-11e7-85b9-ee24c1b0321e from 1 (t4w5) , 16): Address already in use 2018-01-22 15:25:21 140167331440384 [Warning] WSREP: 1.0 (t4w5): State transfer to 0.0 (t4w5) failed: -32 (Broken pipe) Note2 : , 16): Address already in use | ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-01-22 ] | ||||||||||||||||||||||||||||||||
|
winstone can you provide the log from where socat was first launched successfully? If this is repeatable and you are using systemd, can you try setting 'killmode=control-group' (https://www.freedesktop.org/software/systemd/man/systemd.kill.html#KillMode=) by following https://mariadb.com/kb/en/library/systemd/ . Please tell us if this corrects the problem. | ||||||||||||||||||||||||||||||||
| Comment by Zdravelina Sokolovska (Inactive) [ 2018-01-23 ] | ||||||||||||||||||||||||||||||||
|
actually the issue
was observed with both service or systemctl utilities ; miss to mention that it's was used wsrep_sst_method mariabackup ; and also that mysqld is restating endless after the received failure ; --A , 16): Address already in use --C A.
B. enable port 4444
C. start mysql service with option pouting out address of cluster active Node
then node is joining and updating db successfully
| ||||||||||||||||||||||||||||||||
| Comment by Zdravelina Sokolovska (Inactive) [ 2018-04-02 ] | ||||||||||||||||||||||||||||||||
|
problem Address already in use" on restart is observed again on 10.3.5 and the problem derives from
| ||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-04-02 ] | ||||||||||||||||||||||||||||||||
|
A good view of the current and previous mysqld processes will be required. Switching between init systems is bound to cause troubles as they both (should) prevent a duplicate instance in different ways. Related is a systemd bug I filed that can cause it on that side of things: https://github.com/systemd/systemd/issues/8630. SendSIGKILL=yes would be a workaround (https://mariadb.com/kb/en/mariadb/systemd/). Maybe for sysv init scripts - pkill --parent {mysqldpid}(before kiling mysqld otherwise the parent pid will go to 1) |