Bug #60781 | Shutting down mysql proxy does not remove listening socket | ||
---|---|---|---|
Submitted: | 6 Apr 2011 15:31 | Modified: | 14 Jun 2012 18:56 |
Reporter: | Jacek Osiecki | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Proxy: Core | Severity: | S2 (Serious) |
Version: | 0.8.1 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | listening on socket, proxy, shutdown |
[6 Apr 2011 15:31]
Jacek Osiecki
[5 May 2011 19:58]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior. How do you shut down MySQL Proxy?
[6 May 2011 9:27]
Jacek Osiecki
Hi Sveta, Since there is no standard procedure of stopping mysql-proxy (like mysqladmin shutdown for the mysql server), my scripts are simply killing the mysql-proxy process. By saying that you can't repeat this behaviour, do you mean that: a) mysql-proxy after being killed removes the unix socket b) mysql-proxy starts even when the socket exists? Actually (b) is much more important, since this might prevent mysql-proxy from starting after unexpected system crash due to ex. power failure...
[11 May 2011 11:32]
Sveta Smirnova
Thank you for the feedback. > a) mysql-proxy after being killed removes the unix socket Yes, mysql-proxy removes socket after killing, but I use kill [mysql-proxy-id], not kill -9 or so. Which signal do you use?
[11 Jun 2011 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[13 Jun 2012 8:20]
milo bodewes
On a debian system using version 8.0 this behavoir is shown using the default init script. I tried sending custom signals (9) but to no effect. It doesn't delete the socket. I also noticed it sets permissions to 755 and user root (running as mysql) disallowing other users access.
[13 Jun 2012 8:28]
Jacek Osiecki
For me, it's still an error that mysql_proxy crashes if socket exists - even though the process does not. Proxy should check if the socket is still alive and if not - replace it with new, proper one.
[13 Jun 2012 8:31]
milo bodewes
Bit more info Config file used: [mysql-proxy] proxy-address=/var/run/mysqld/mysqld.sock log-file=/var/log/mysql/mysql_proxy.log log-level=debug user=mysql proxy-backend-addresses=127.0.0.1:3307 proxy-read-only-backend-addresses = 10.0.101.11:3306
[13 Jun 2012 8:34]
milo bodewes
Jacek Osiecki: agreed. I also think it should respect the "run as user setting" and set proper permisssions.
[14 Jun 2012 18:56]
Sveta Smirnova
Thank you for the report. > On a debian system using version 8.0 this behavoir is shown using the default init script. What do you mean by behavior shown by default init script? kill <MYSQL_PROXY_PID> removes socket, kill - 9 does not. I can verify the fact mysql-proxy does not start if old unused socket exists, although other MySQL products, such as server, do it. This should be fixed.
[18 Dec 2013 17:27]
Paul DuBois
Noted in 0.8.4 changelog. If MySQL Proxy was configured to listen on a Unix socket file, it failed to remove the file when exiting, causing the next Proxy instance to fail at startup.