[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket 2.0b2 troubles
- From: Mike Pall <mikelu-0408@...>
- Date: Fri, 27 Aug 2004 13:35:42 +0200
Hi,
Adam D. Moss wrote:
> Hello! LuaSocket looks great, but I'm having a bit of trouble
> with it and I was wondering if I was alone... this is on
> linux/x86 (glibc 2.2.4, kernel 2.4.25, lua 5.0.2):
This is a pretty common configuration and should not have any problems.
> Meanwhile I don't think that testsrvr.lua has ever
> returned from its initial server:accept() call.
> [...]
> * hangs (well, timeouts) when it should get a successful
> connection. Apache server doesn't register a connection in its
> log (so we didn't get as far as issuing a GET, I think).
Sounds like trouble with the connect() syscall or the completion wait
(with select() or poll()). Here are a few wild guesses:
- Have you linked in some other library that redefines connect() or select()?
- Is your firewalling too restrictive?
Please try something like
strace lua -e 'http=require("http"); print(http.request("http://www.lua.org/index.html"));'
and look for the connect() call. It should be something like: connect(),
gettimeofday(), select() (or poll() if you compiled with HAVE_POLL) and
then a few send() and recv() calls.
> I am doing one maybe-unusual thing: I have made minor tweaks to
> statically link and initialise LuaSocket in my binary, but I don't
> expect that to have affected such a 'deep' error (but then, computers
> are strange).
I did this with a previous version for easier profiling and encountered
no problems.
Bye,
Mike