← Back to team overview

mysql-proxy-discuss team mailing list archive

Re: LUA script path not recognized?

 

Hi!

On May 29, 2009, at 4:05 PM, manohar s wrote:

I have a LUA script in *"sbin"* folder. In my 32 bit Fedora core 3, If I start the proxy, no problem, starts fine. But when I try to connect through
a client I am getting this

*error:*

*2009-05-29 19:22:50: (critical) network-mysqld-lua.c:232:
lua_load_file(/root/mysql-proxy-0.7.1-linux-rhel4-x86-32bit/ MONyog.lua)
failed: lua-scope.c:244:
stat(/root/mysql-proxy-0.7.1-linux-rhel4-x86-32bit/MONyog.lua) failed: No
such file or directory (2)*

I have attached the screenshot of the error thrown.

*Command:*
./mysql-proxy --proxy-address=192.168.1.3:4043 --proxy-backend- addresses=
192.168.1.5:3306 --proxy-lua-script=Test.lua

Am I doing anything wrong here?

If I keep the Test.lua one folder up, i.e in
'mysql-proxy-0.7.1-linux-rhel4-x86-32bit' folder, it works fine with the
same command !

All relative paths are interpreted being relative to the "root" directory of the installation, unless you give proxy a basedir with the corresponding option. This is being done to reliably find the shared libraries and such, and we extended it to all relative paths to be at least consistent internally.

If you do use basedir, beware that proxy might not be able to find the shared libraries it needs! I would work around this problem by using either absolute paths or making sure the to always remember that it's install-dir relative.

cheers,
-k

--
Kay Roepke
Software Engineer, MySQL Enterprise Tools

Sun Microsystems GmbH    Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer:    Thomas Schroeder,  Wolfang Engels,  Wolf Frenkel
Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028




References