Problems getting mysql-proxy working from SVN trunk.
Posted by:
Gerry Reno
Date: April 18, 2008 07:50AM
Testing on Fedora 7 32-bit.
could not get a usable rpm built from SVN so I installed the tarball version built from SVN. I setup the /etc/init.d/mysql-proxy control and put all the mysql-proxy option into /etc/sysconfig/mysql-proxy.
I start the proxy and it reports ...running.
When I access the host and port for the proxy I see one of several things:
[root@grp-01-60-50 trunk]# mysql -h 127.0.0.1 -P 4040 -u root -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[root@grp-01-60-50 trunk]#
in /var/log/messages:
Apr 18 09:39:26 grp-01-60-50 kernel: mysql-proxy[17850]: segfault at 00000000 eip 002a25ec esp bfc0a84c error 4
(this happens if you have the path typo to the lua script; better if the proxy would tell you this at startup instead of letting daemon segfault)
OR
[root@grp-01-60-50 network-scripts]# mysql -h 127.0.0.1 -P 4040 -u root -p
Enter password:
2008-04-18 09:19:27: (critical) (lua-error) [/usr/local/share/mysql-proxy/rw-splitting.lua]
[string "/usr/local/share/mysql-proxy/rw-splitting.l..."]:30: module 'proxy.commands' not found:
no field package.preload['proxy.commands']
no file './proxy/commands.lua'
no file '/usr/share/lua/5.1/proxy/commands.lua'
no file '/usr/share/lua/5.1/proxy/commands/init.lua'
no file '/usr/lib/lua/5.1/proxy/commands.lua'
no file '/usr/lib/lua/5.1/proxy/commands/init.lua'
no file './proxy/commands.so'
no file '/usr/lib/lua/5.1/proxy/commands.so'
no file '/usr/lib/lua/5.1/loadall.so'
no file './proxy.so'
no file '/usr/lib/lua/5.1/proxy.so'
no file '/usr/lib/lua/5.1/loadall.so'
So I try searching for proxy.commands:
[root@grp-01-60-50 trunk]# find /usr/local -name "commands*"
/usr/local/share/mysql-proxy/proxy/commands.lua
[root@grp-01-60-50 trunk]#
Here is my /etc/sysconfig/mysql-proxy:
PROXY_OPTIONS="--daemon --proxy-lua-script=/usr/local/share/mysql-proxy/rw-splitting.lua --proxy-address=127.0.0.1:4040 --proxy-backend-addresses=192.168.1.245:3306 --proxy-read-only-backend-addresses=192.168.1.246:3306"
What am I missing here?
????
Gerry
Edited 2 time(s). Last edit at 04/18/2008 10:11AM by Gerry Reno.
Subject
Views
Written By
Posted
Problems getting mysql-proxy working from SVN trunk.
4418
April 18, 2008 07:50AM
2616
April 18, 2008 08:00AM
3047
April 18, 2008 09:16AM
4715
April 18, 2008 10:04AM
2604
April 21, 2008 03:39PM
2547
April 21, 2008 08:27PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.