a production ready neko server

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

a production ready neko server

theRemix
Hi List,

        I've been experimenting with tora without any luck, because i don't have apache. And if all else fails, i'll go and install apache since it seems to be the only thing i can find online that should work.

        Anyway, i have nginx, i just installed lighttpd, i finally got neko 1.8.1 compiled and running pretty well on my gentoo system, it was difficult.
        i also patched lighty with diffs from the old posts from Kaalh
        http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
        http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
        and that compiled fine, and is installed on my server.

        is there a way, fcgi, or other, to use neko/tora with nginx/lighttpd ?
        if so, could someone please help me out here with some, even basic, working configuration and instructions?

        i also saw blackdog's hxnode, nodejs port  and i guess before i resort to working with apache, i'll give hxnode a shot and maybe make my own http server with it.

        also, if you rolled your own neko server somehow, please share, i'm very interested.


        so i got really far with lighttpd. a request to a neko.n file resulted in a  long unresponsive request (nothing was returned) and here's why.
        i tailed the lighttpd error.log and got these, until it finally timed out.

mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 1
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 2
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 2
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 3
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 4
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 5
mod_proxy_core.c.2342: (trace) connecting backends timed out, retry limit reached: 5
mod_proxy_core.c.2308: (trace) connecting backends timed out, retry limit reached: 6

i'm not sure what else i have to do to get it to work.

any help would be greatly appreciated, i've been developing for a while locally on osx using nekotools server, and it works great. i'd really love to use it.

thanks in advance.


「the.remix」


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

alexander.konotop
В Sun, 24 Apr 2011 10:09:38 -1000
theRemix <[hidden email]> пишет:

> Hi List,
>
> I've been experimenting with tora without any luck, because i
> don't have apache. And if all else fails, i'll go and install apache
> since it seems to be the only thing i can find online that should
> work.
>
> Anyway, i have nginx, i just installed lighttpd, i finally
> got neko 1.8.1 compiled and running pretty well on my gentoo system,
> it was difficult. i also patched lighty with diffs from the old posts
> from Kaalh
> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> and that compiled fine, and is installed on my server.
>
> is there a way, fcgi, or other, to use neko/tora with
> nginx/lighttpd ? if so, could someone please help me out here with
> some, even basic, working configuration and instructions?
>
> i also saw blackdog's hxnode, nodejs port  and i guess before
> i resort to working with apache, i'll give hxnode a shot and maybe
> make my own http server with it.
>
> also, if you rolled your own neko server somehow, please
> share, i'm very interested.
>
>
> so i got really far with lighttpd. a request to a neko.n file
> resulted in a  long unresponsive request (nothing was returned) and
> here's why. i tailed the lighttpd error.log and got these, until it
> finally timed out.
>
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 1
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 2
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 2
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 3
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 4
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> addresses are down, putting /server.n (6) into the backlog, retry = 5
> mod_proxy_core.c.2342: (trace) connecting backends timed out, retry
> limit reached: 5 mod_proxy_core.c.2308: (trace) connecting backends
> timed out, retry limit reached: 6
>
> i'm not sure what else i have to do to get it to work.
>
> any help would be greatly appreciated, i've been developing for a
> while locally on osx using nekotools server, and it works great. i'd
> really love to use it.
>
> thanks in advance.
>
>
> 「the.remix」
>
>

In December I had the same problem. With the help of people from
maillist I found some information and now I'm temporarily running neko
in CGI mode (not FCGI). But it's available to use it in FCGI mode also.

At first there are a lot of unimplemented methods (for CGI) in
neko/Web.hx class. I've implemented those which make availability to
work with GET/POST data. If You wanna try it - look at issue #311 at
http://code.google.com/p/haxe/issues/list. But it's still unavailable
for example to read and write cookies but I think I'll make this
available during May.

At second there is a way to run neko as FCGI. Look here:
https://github.com/TheHippo/hxfcgi.
I tried to run it but unfortunately I had to run neko with lighttpd as
soon as possible, so I decided at first to implement methods in Web.hx
which make availability to run it in usual CGI mode because I found
this way easier. So, I had to defer my thoughts about FCGI to summer,
when we'll really need performance. If You are REALLY interested in
finishing hxfcgi project - we can contribute both faster, because I'm
really interested in it, but I don't need it very soon.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

Philipp Klose-2


On 25.04.2011 11:32, Alexander Konotop wrote:

> В Sun, 24 Apr 2011 10:09:38 -1000
> theRemix<[hidden email]>  пишет:
>
>> Hi List,
>>
>> I've been experimenting with tora without any luck, because i
>> don't have apache. And if all else fails, i'll go and install apache
>> since it seems to be the only thing i can find online that should
>> work.
>>
>> Anyway, i have nginx, i just installed lighttpd, i finally
>> got neko 1.8.1 compiled and running pretty well on my gentoo system,
>> it was difficult. i also patched lighty with diffs from the old posts
>> from Kaalh
>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>> and that compiled fine, and is installed on my server.
>>
>> is there a way, fcgi, or other, to use neko/tora with
>> nginx/lighttpd ? if so, could someone please help me out here with
>> some, even basic, working configuration and instructions?
>>
>> i also saw blackdog's hxnode, nodejs port  and i guess before
>> i resort to working with apache, i'll give hxnode a shot and maybe
>> make my own http server with it.
>>
>> also, if you rolled your own neko server somehow, please
>> share, i'm very interested.
>>
>>
>> so i got really far with lighttpd. a request to a neko.n file
>> resulted in a  long unresponsive request (nothing was returned) and
>> here's why. i tailed the lighttpd error.log and got these, until it
>> finally timed out.
>>
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 1
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 3
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 4
>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>> addresses are down, putting /server.n (6) into the backlog, retry = 5
>> mod_proxy_core.c.2342: (trace) connecting backends timed out, retry
>> limit reached: 5 mod_proxy_core.c.2308: (trace) connecting backends
>> timed out, retry limit reached: 6
>>
>> i'm not sure what else i have to do to get it to work.
>>
>> any help would be greatly appreciated, i've been developing for a
>> while locally on osx using nekotools server, and it works great. i'd
>> really love to use it.
>>
>> thanks in advance.
>>
>>
>> 「the.remix」
>>
>>
> In December I had the same problem. With the help of people from
> maillist I found some information and now I'm temporarily running neko
> in CGI mode (not FCGI). But it's available to use it in FCGI mode also.
>
> At first there are a lot of unimplemented methods (for CGI) in
> neko/Web.hx class. I've implemented those which make availability to
> work with GET/POST data. If You wanna try it - look at issue #311 at
> http://code.google.com/p/haxe/issues/list. But it's still unavailable
> for example to read and write cookies but I think I'll make this
> available during May.
>
> At second there is a way to run neko as FCGI. Look here:
> https://github.com/TheHippo/hxfcgi.
> I tried to run it but unfortunately I had to run neko with lighttpd as
> soon as possible, so I decided at first to implement methods in Web.hx
> which make availability to run it in usual CGI mode because I found
> this way easier. So, I had to defer my thoughts about FCGI to summer,
> when we'll really need performance. If You are REALLY interested in
> finishing hxfcgi project - we can contribute both faster, because I'm
> really interested in it, but I don't need it very soon.
I started the hxfcgi project a while ago just as a proof of concept. (It
runs as cgi or fcgi!) A while ago someone nearly finished this project
(it is currently in a extra branch, or check out the forks of the
project). The 2 multipart function of the Web API are the only things
missing, all other functions have been implemented. Feel free to test
and to contribute :-)

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
ok i cloned and compiled the test for hxfcgi

and i'm not exactly clear on how i'm supposed to use it.

mostly, the lighttpd config, can you please share a simple cgi/fcgi lighttpd config?

i'm guessing once lighty is configured, i should use the neko/Web.hx and neko/Lib.hx then wrap my application same as the Test example, and compile (using nekotools boot) into a .fcgi file. correct?

just not sure how to deploy it.




「the.remix」

On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:

>
>
> On 25.04.2011 11:32, Alexander Konotop wrote:
>> В Sun, 24 Apr 2011 10:09:38 -1000
>> theRemix<[hidden email]>  пишет:
>>
>>> Hi List,
>>>
>>> I've been experimenting with tora without any luck, because i
>>> don't have apache. And if all else fails, i'll go and install apache
>>> since it seems to be the only thing i can find online that should
>>> work.
>>>
>>> Anyway, i have nginx, i just installed lighttpd, i finally
>>> got neko 1.8.1 compiled and running pretty well on my gentoo system,
>>> it was difficult. i also patched lighty with diffs from the old posts
>>> from Kaalh
>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>> and that compiled fine, and is installed on my server.
>>>
>>> is there a way, fcgi, or other, to use neko/tora with
>>> nginx/lighttpd ? if so, could someone please help me out here with
>>> some, even basic, working configuration and instructions?
>>>
>>> i also saw blackdog's hxnode, nodejs port  and i guess before
>>> i resort to working with apache, i'll give hxnode a shot and maybe
>>> make my own http server with it.
>>>
>>> also, if you rolled your own neko server somehow, please
>>> share, i'm very interested.
>>>
>>>
>>> so i got really far with lighttpd. a request to a neko.n file
>>> resulted in a  long unresponsive request (nothing was returned) and
>>> here's why. i tailed the lighttpd error.log and got these, until it
>>> finally timed out.
>>>
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 1
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 3
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 4
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 5
>>> mod_proxy_core.c.2342: (trace) connecting backends timed out, retry
>>> limit reached: 5 mod_proxy_core.c.2308: (trace) connecting backends
>>> timed out, retry limit reached: 6
>>>
>>> i'm not sure what else i have to do to get it to work.
>>>
>>> any help would be greatly appreciated, i've been developing for a
>>> while locally on osx using nekotools server, and it works great. i'd
>>> really love to use it.
>>>
>>> thanks in advance.
>>>
>>>
>>> 「the.remix」
>>>
>>>
>> In December I had the same problem. With the help of people from
>> maillist I found some information and now I'm temporarily running neko
>> in CGI mode (not FCGI). But it's available to use it in FCGI mode also.
>>
>> At first there are a lot of unimplemented methods (for CGI) in
>> neko/Web.hx class. I've implemented those which make availability to
>> work with GET/POST data. If You wanna try it - look at issue #311 at
>> http://code.google.com/p/haxe/issues/list. But it's still unavailable
>> for example to read and write cookies but I think I'll make this
>> available during May.
>>
>> At second there is a way to run neko as FCGI. Look here:
>> https://github.com/TheHippo/hxfcgi.
>> I tried to run it but unfortunately I had to run neko with lighttpd as
>> soon as possible, so I decided at first to implement methods in Web.hx
>> which make availability to run it in usual CGI mode because I found
>> this way easier. So, I had to defer my thoughts about FCGI to summer,
>> when we'll really need performance. If You are REALLY interested in
>> finishing hxfcgi project - we can contribute both faster, because I'm
>> really interested in it, but I don't need it very soon.
> I started the hxfcgi project a while ago just as a proof of concept. (It runs as cgi or fcgi!) A while ago someone nearly finished this project (it is currently in a extra branch, or check out the forks of the project). The 2 multipart function of the Web API are the only things missing, all other functions have been implemented. Feel free to test and to contribute :-)
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

alexander.konotop
В Mon, 25 Apr 2011 04:33:04 -1000
theRemix <[hidden email]> пишет:

> ok i cloned and compiled the test for hxfcgi
>
> and i'm not exactly clear on how i'm supposed to use it.
>
> mostly, the lighttpd config, can you please share a simple cgi/fcgi
> lighttpd config?
>
> i'm guessing once lighty is configured, i should use the neko/Web.hx
> and neko/Lib.hx then wrap my application same as the Test example,
> and compile (using nekotools boot) into a .fcgi file. correct?
>
> just not sure how to deploy it.
>
>
>
>
> 「the.remix」
>
> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>
> >
> >
> > On 25.04.2011 11:32, Alexander Konotop wrote:
> >> В Sun, 24 Apr 2011 10:09:38 -1000
> >> theRemix<[hidden email]>  пишет:
> >>
> >>> Hi List,
> >>>
> >>> I've been experimenting with tora without any luck,
> >>> because i don't have apache. And if all else fails, i'll go and
> >>> install apache since it seems to be the only thing i can find
> >>> online that should work.
> >>>
> >>> Anyway, i have nginx, i just installed lighttpd, i finally
> >>> got neko 1.8.1 compiled and running pretty well on my gentoo
> >>> system, it was difficult. i also patched lighty with diffs from
> >>> the old posts from Kaalh
> >>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> >>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> >>> and that compiled fine, and is installed on my server.
> >>>
> >>> is there a way, fcgi, or other, to use neko/tora with
> >>> nginx/lighttpd ? if so, could someone please help me out here with
> >>> some, even basic, working configuration and instructions?
> >>>
> >>> i also saw blackdog's hxnode, nodejs port  and i guess
> >>> before i resort to working with apache, i'll give hxnode a shot
> >>> and maybe make my own http server with it.
> >>>
> >>> also, if you rolled your own neko server somehow, please
> >>> share, i'm very interested.
> >>>
> >>>
> >>> so i got really far with lighttpd. a request to a neko.n
> >>> file resulted in a  long unresponsive request (nothing was
> >>> returned) and here's why. i tailed the lighttpd error.log and got
> >>> these, until it finally timed out.
> >>>
> >>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> >>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> >>> addresses are down, putting /server.n (6) into the backlog, retry
> >>> = 1 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
> >>> all addresses are down, putting /server.n (6) into the backlog,
> >>> retry = 2 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>> refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>> backlog: all addresses are down, putting /server.n (6) into the
> >>> backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
> >>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>> mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
> >>> putting /server.n (6) into the backlog, retry = 3
> >>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
> >>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
> >>> addresses are down, putting /server.n (6) into the backlog, retry
> >>> = 4 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
> >>> all addresses are down, putting /server.n (6) into the backlog,
> >>> retry = 5 mod_proxy_core.c.2342: (trace) connecting backends
> >>> timed out, retry limit reached: 5 mod_proxy_core.c.2308: (trace)
> >>> connecting backends timed out, retry limit reached: 6
> >>>
> >>> i'm not sure what else i have to do to get it to work.
> >>>
> >>> any help would be greatly appreciated, i've been developing for a
> >>> while locally on osx using nekotools server, and it works great.
> >>> i'd really love to use it.
> >>>
> >>> thanks in advance.
> >>>
> >>>
> >>> 「the.remix」
> >>>
> >>>
> >> In December I had the same problem. With the help of people from
> >> maillist I found some information and now I'm temporarily running
> >> neko in CGI mode (not FCGI). But it's available to use it in FCGI
> >> mode also.
> >>
> >> At first there are a lot of unimplemented methods (for CGI) in
> >> neko/Web.hx class. I've implemented those which make availability
> >> to work with GET/POST data. If You wanna try it - look at issue
> >> #311 at http://code.google.com/p/haxe/issues/list. But it's still
> >> unavailable for example to read and write cookies but I think I'll
> >> make this available during May.
> >>
> >> At second there is a way to run neko as FCGI. Look here:
> >> https://github.com/TheHippo/hxfcgi.
> >> I tried to run it but unfortunately I had to run neko with
> >> lighttpd as soon as possible, so I decided at first to implement
> >> methods in Web.hx which make availability to run it in usual CGI
> >> mode because I found this way easier. So, I had to defer my
> >> thoughts about FCGI to summer, when we'll really need performance.
> >> If You are REALLY interested in finishing hxfcgi project - we can
> >> contribute both faster, because I'm really interested in it, but I
> >> don't need it very soon.
> > I started the hxfcgi project a while ago just as a proof of
> > concept. (It runs as cgi or fcgi!) A while ago someone nearly
> > finished this project (it is currently in a extra branch, or check
> > out the forks of the project). The 2 multipart function of the Web
> > API are the only things missing, all other functions have been
> > implemented. Feel free to test and to contribute :-)
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>
>

CGI config is very simple.
Here it is for lighttpd:

1. Swith cgi module on:
  server.modules += ( "mod_cgi" )
2. assign filetype:
  cgi.assign = ( ".n" => "/usr/bin/neko" )
3. patch Web.hx (implement some missing for CGI-mode methods)

Unfortunately, I can say nothing about FCGI.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
ok i got a 500 error

Called from neko/Web.hx line 39
Called from neko/Web.hx line 312
Called from neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
        /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)

i also did MXCPP_M64=true make all
with same results


i'm on OSX
uname -a
Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)


any ideas?

On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:

> В Mon, 25 Apr 2011 04:33:04 -1000
> theRemix <[hidden email]> пишет:
>
>> ok i cloned and compiled the test for hxfcgi
>>
>> and i'm not exactly clear on how i'm supposed to use it.
>>
>> mostly, the lighttpd config, can you please share a simple cgi/fcgi
>> lighttpd config?
>>
>> i'm guessing once lighty is configured, i should use the neko/Web.hx
>> and neko/Lib.hx then wrap my application same as the Test example,
>> and compile (using nekotools boot) into a .fcgi file. correct?
>>
>> just not sure how to deploy it.
>>
>>
>>
>>
>> 「the.remix」
>>
>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>>
>>>
>>>
>>> On 25.04.2011 11:32, Alexander Konotop wrote:
>>>> В Sun, 24 Apr 2011 10:09:38 -1000
>>>> theRemix<[hidden email]>  пишет:
>>>>
>>>>> Hi List,
>>>>>
>>>>> I've been experimenting with tora without any luck,
>>>>> because i don't have apache. And if all else fails, i'll go and
>>>>> install apache since it seems to be the only thing i can find
>>>>> online that should work.
>>>>>
>>>>> Anyway, i have nginx, i just installed lighttpd, i finally
>>>>> got neko 1.8.1 compiled and running pretty well on my gentoo
>>>>> system, it was difficult. i also patched lighty with diffs from
>>>>> the old posts from Kaalh
>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>>>> and that compiled fine, and is installed on my server.
>>>>>
>>>>> is there a way, fcgi, or other, to use neko/tora with
>>>>> nginx/lighttpd ? if so, could someone please help me out here with
>>>>> some, even basic, working configuration and instructions?
>>>>>
>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
>>>>> before i resort to working with apache, i'll give hxnode a shot
>>>>> and maybe make my own http server with it.
>>>>>
>>>>> also, if you rolled your own neko server somehow, please
>>>>> share, i'm very interested.
>>>>>
>>>>>
>>>>> so i got really far with lighttpd. a request to a neko.n
>>>>> file resulted in a  long unresponsive request (nothing was
>>>>> returned) and here's why. i tailed the lighttpd error.log and got
>>>>> these, until it finally timed out.
>>>>>
>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>>>> addresses are down, putting /server.n (6) into the backlog, retry
>>>>> = 1 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
>>>>> all addresses are down, putting /server.n (6) into the backlog,
>>>>> retry = 2 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
>>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>> backlog: all addresses are down, putting /server.n (6) into the
>>>>> backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
>>>>> putting /server.n (6) into the backlog, retry = 3
>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>>>> addresses are down, putting /server.n (6) into the backlog, retry
>>>>> = 4 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
>>>>> all addresses are down, putting /server.n (6) into the backlog,
>>>>> retry = 5 mod_proxy_core.c.2342: (trace) connecting backends
>>>>> timed out, retry limit reached: 5 mod_proxy_core.c.2308: (trace)
>>>>> connecting backends timed out, retry limit reached: 6
>>>>>
>>>>> i'm not sure what else i have to do to get it to work.
>>>>>
>>>>> any help would be greatly appreciated, i've been developing for a
>>>>> while locally on osx using nekotools server, and it works great.
>>>>> i'd really love to use it.
>>>>>
>>>>> thanks in advance.
>>>>>
>>>>>
>>>>> 「the.remix」
>>>>>
>>>>>
>>>> In December I had the same problem. With the help of people from
>>>> maillist I found some information and now I'm temporarily running
>>>> neko in CGI mode (not FCGI). But it's available to use it in FCGI
>>>> mode also.
>>>>
>>>> At first there are a lot of unimplemented methods (for CGI) in
>>>> neko/Web.hx class. I've implemented those which make availability
>>>> to work with GET/POST data. If You wanna try it - look at issue
>>>> #311 at http://code.google.com/p/haxe/issues/list. But it's still
>>>> unavailable for example to read and write cookies but I think I'll
>>>> make this available during May.
>>>>
>>>> At second there is a way to run neko as FCGI. Look here:
>>>> https://github.com/TheHippo/hxfcgi.
>>>> I tried to run it but unfortunately I had to run neko with
>>>> lighttpd as soon as possible, so I decided at first to implement
>>>> methods in Web.hx which make availability to run it in usual CGI
>>>> mode because I found this way easier. So, I had to defer my
>>>> thoughts about FCGI to summer, when we'll really need performance.
>>>> If You are REALLY interested in finishing hxfcgi project - we can
>>>> contribute both faster, because I'm really interested in it, but I
>>>> don't need it very soon.
>>> I started the hxfcgi project a while ago just as a proof of
>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
>>> finished this project (it is currently in a extra branch, or check
>>> out the forks of the project). The 2 multipart function of the Web
>>> API are the only things missing, all other functions have been
>>> implemented. Feel free to test and to contribute :-)
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>>
>
> CGI config is very simple.
> Here it is for lighttpd:
>
> 1. Swith cgi module on:
>  server.modules += ( "mod_cgi" )
> 2. assign filetype:
>  cgi.assign = ( ".n" => "/usr/bin/neko" )
> 3. patch Web.hx (implement some missing for CGI-mode methods)
>
> Unfortunately, I can say nothing about FCGI.
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

alexander.konotop
В Mon, 25 Apr 2011 06:30:57 -1000
theRemix <[hidden email]> пишет:

> ok i got a 500 error
>
> Called from neko/Web.hx line 39
> Called from neko/Web.hx line 312
> Called from neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load
> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
> mach-o, but wrong architecture)
>
> i also did MXCPP_M64=true make all
> with same results
>
>
> i'm on OSX
> uname -a
> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
> Using built-in specs.
> Target: i686-apple-darwin10
> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
> --disable-checking --enable-werror --prefix=/usr --mandir=/share/man
> --enable-languages=c,objc,c++,obj-c++
> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
> --with-slibdir=/usr/lib --build=i686-apple-darwin10
> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
> --target=i686-apple-darwin10
> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
> version 4.2.1 (Apple Inc. build 5666) (dot 3)
>
>
> any ideas?
>
> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
>
> > В Mon, 25 Apr 2011 04:33:04 -1000
> > theRemix <[hidden email]> пишет:
> >
> >> ok i cloned and compiled the test for hxfcgi
> >>
> >> and i'm not exactly clear on how i'm supposed to use it.
> >>
> >> mostly, the lighttpd config, can you please share a simple cgi/fcgi
> >> lighttpd config?
> >>
> >> i'm guessing once lighty is configured, i should use the
> >> neko/Web.hx and neko/Lib.hx then wrap my application same as the
> >> Test example, and compile (using nekotools boot) into a .fcgi
> >> file. correct?
> >>
> >> just not sure how to deploy it.
> >>
> >>
> >>
> >>
> >> 「the.remix」
> >>
> >> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
> >>
> >>>
> >>>
> >>> On 25.04.2011 11:32, Alexander Konotop wrote:
> >>>> В Sun, 24 Apr 2011 10:09:38 -1000
> >>>> theRemix<[hidden email]>  пишет:
> >>>>
> >>>>> Hi List,
> >>>>>
> >>>>> I've been experimenting with tora without any luck,
> >>>>> because i don't have apache. And if all else fails, i'll go and
> >>>>> install apache since it seems to be the only thing i can find
> >>>>> online that should work.
> >>>>>
> >>>>> Anyway, i have nginx, i just installed lighttpd, i
> >>>>> finally got neko 1.8.1 compiled and running pretty well on my
> >>>>> gentoo system, it was difficult. i also patched lighty with
> >>>>> diffs from the old posts from Kaalh
> >>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> >>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> >>>>> and that compiled fine, and is installed on my server.
> >>>>>
> >>>>> is there a way, fcgi, or other, to use neko/tora with
> >>>>> nginx/lighttpd ? if so, could someone please help me out here
> >>>>> with some, even basic, working configuration and instructions?
> >>>>>
> >>>>> i also saw blackdog's hxnode, nodejs port  and i guess
> >>>>> before i resort to working with apache, i'll give hxnode a shot
> >>>>> and maybe make my own http server with it.
> >>>>>
> >>>>> also, if you rolled your own neko server somehow, please
> >>>>> share, i'm very interested.
> >>>>>
> >>>>>
> >>>>> so i got really far with lighttpd. a request to a neko.n
> >>>>> file resulted in a  long unresponsive request (nothing was
> >>>>> returned) and here's why. i tailed the lighttpd error.log and
> >>>>> got these, until it finally timed out.
> >>>>>
> >>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
> >>>>> all addresses are down, putting /server.n (6) into the backlog,
> >>>>> retry = 1 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>>>> backlog: all addresses are down, putting /server.n (6) into the
> >>>>> backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
> >>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
> >>>>> putting /server.n (6) into the backlog, retry = 2
> >>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
> >>>>> all addresses are down, putting /server.n (6) into the backlog,
> >>>>> retry = 3 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>>>> backlog: all addresses are down, putting /server.n (6) into the
> >>>>> backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
> >>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
> >>>>> putting /server.n (6) into the backlog, retry = 5
> >>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
> >>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
> >>>>> connecting backends timed out, retry limit reached: 6
> >>>>>
> >>>>> i'm not sure what else i have to do to get it to work.
> >>>>>
> >>>>> any help would be greatly appreciated, i've been developing for
> >>>>> a while locally on osx using nekotools server, and it works
> >>>>> great. i'd really love to use it.
> >>>>>
> >>>>> thanks in advance.
> >>>>>
> >>>>>
> >>>>> 「the.remix」
> >>>>>
> >>>>>
> >>>> In December I had the same problem. With the help of people from
> >>>> maillist I found some information and now I'm temporarily running
> >>>> neko in CGI mode (not FCGI). But it's available to use it in FCGI
> >>>> mode also.
> >>>>
> >>>> At first there are a lot of unimplemented methods (for CGI) in
> >>>> neko/Web.hx class. I've implemented those which make availability
> >>>> to work with GET/POST data. If You wanna try it - look at issue
> >>>> #311 at http://code.google.com/p/haxe/issues/list. But it's still
> >>>> unavailable for example to read and write cookies but I think
> >>>> I'll make this available during May.
> >>>>
> >>>> At second there is a way to run neko as FCGI. Look here:
> >>>> https://github.com/TheHippo/hxfcgi.
> >>>> I tried to run it but unfortunately I had to run neko with
> >>>> lighttpd as soon as possible, so I decided at first to implement
> >>>> methods in Web.hx which make availability to run it in usual CGI
> >>>> mode because I found this way easier. So, I had to defer my
> >>>> thoughts about FCGI to summer, when we'll really need
> >>>> performance. If You are REALLY interested in finishing hxfcgi
> >>>> project - we can contribute both faster, because I'm really
> >>>> interested in it, but I don't need it very soon.
> >>> I started the hxfcgi project a while ago just as a proof of
> >>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
> >>> finished this project (it is currently in a extra branch, or check
> >>> out the forks of the project). The 2 multipart function of the Web
> >>> API are the only things missing, all other functions have been
> >>> implemented. Feel free to test and to contribute :-)
> >>>
> >>> --
> >>> haXe - an open source web programming language
> >>> http://haxe.org
> >>
> >>
> >
> > CGI config is very simple.
> > Here it is for lighttpd:
> >
> > 1. Swith cgi module on:
> >  server.modules += ( "mod_cgi" )
> > 2. assign filetype:
> >  cgi.assign = ( ".n" => "/usr/bin/neko" )
> > 3. patch Web.hx (implement some missing for CGI-mode methods)
> >
> > Unfortunately, I can say nothing about FCGI.
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>
>

Couldn't You reproduce Your steps to compile and run it in a few words?
As I understood - You run it in a way, similar to running ruby as fcgi?

Best regards
Alexander

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
sure, i'm not sure if what i'm doing is correct though, this is what i did.

cd hxfcgi
make all

# output
rm -f bin/hxfcgi.ndll rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/request.o src/request.cpp g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o src/basic.cpp g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o src/data.cpp g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi
 
# test
neko bin/test.n
Called from neko/Web.hx line 39
Called from neko/Web.hx line 312
Called from neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)


# lighty configuration

sudo port install lighttpd

/opt/local/etc/lighttpd/lighttpd.conf :
server.port = 8008
server.bind = "localhost"
server.document-root = "/Users/remix/Projects/hxfcgi/bin"
static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi", ".scgi" )
server.modules = ( "mod_access", "mod_cgi" )
cgi.assign                 = ( ".n" => "/usr/bin/neko" )

# omitted some other default configs

# started lighty
# testing
--2011-04-25 08:12:06--  http://localhost:8008/test.n
Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8008... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2011-04-25 08:12:06 ERROR 500: Internal Server Error.

# from lighty terminal, where i have it running
Called from neko/Web.hx line 39
Called from neko/Web.hx line 312
Called from neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)




from the looks of the error, "wrong architecture", maybe i did not compile/configure this correctly.
does this give enough details? i feel like i'm close though.


「the.remix」

On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:

В Mon, 25 Apr 2011 06:30:57 -1000
theRemix <[hidden email]> пишет:

ok i got a 500 error

Called from neko/Web.hx line 39
Called from neko/Web.hx line 312
Called from neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load
library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
(dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
mach-o, but wrong architecture)

i also did MXCPP_M64=true make all
with same results


i'm on OSX
uname -a
Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
--disable-checking --enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin10
--program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
--target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
version 4.2.1 (Apple Inc. build 5666) (dot 3)


any ideas?

On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:

В Mon, 25 Apr 2011 04:33:04 -1000
theRemix <[hidden email]> пишет:

ok i cloned and compiled the test for hxfcgi

and i'm not exactly clear on how i'm supposed to use it.

mostly, the lighttpd config, can you please share a simple cgi/fcgi
lighttpd config?

i'm guessing once lighty is configured, i should use the
neko/Web.hx and neko/Lib.hx then wrap my application same as the
Test example, and compile (using nekotools boot) into a .fcgi
file. correct?

just not sure how to deploy it.




「the.remix」

On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:



On 25.04.2011 11:32, Alexander Konotop wrote:
В Sun, 24 Apr 2011 10:09:38 -1000
theRemix<[hidden email]>  пишет:

Hi List,

I've been experimenting with tora without any luck,
because i don't have apache. And if all else fails, i'll go and
install apache since it seems to be the only thing i can find
online that should work.

Anyway, i have nginx, i just installed lighttpd, i
finally got neko 1.8.1 compiled and running pretty well on my
gentoo system, it was difficult. i also patched lighty with
diffs from the old posts from Kaalh
http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
and that compiled fine, and is installed on my server.

is there a way, fcgi, or other, to use neko/tora with
nginx/lighttpd ? if so, could someone please help me out here
with some, even basic, working configuration and instructions?

i also saw blackdog's hxnode, nodejs port  and i guess
before i resort to working with apache, i'll give hxnode a shot
and maybe make my own http server with it.

also, if you rolled your own neko server somehow, please
share, i'm very interested.


so i got really far with lighttpd. a request to a neko.n
file resulted in a  long unresponsive request (nothing was
returned) and here's why. i tailed the lighttpd error.log and
got these, until it finally timed out.

mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
all addresses are down, putting /server.n (6) into the backlog,
retry = 1 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
backlog: all addresses are down, putting /server.n (6) into the
backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
putting /server.n (6) into the backlog, retry = 2
mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
us, disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog:
all addresses are down, putting /server.n (6) into the backlog,
retry = 3 mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
refused us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
backlog: all addresses are down, putting /server.n (6) into the
backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
127.0.0.1:6666 refused us, disabling for 2 sec
mod_proxy_core.c.2336: (trace) backlog: all addresses are down,
putting /server.n (6) into the backlog, retry = 5
mod_proxy_core.c.2342: (trace) connecting backends timed out,
retry limit reached: 5 mod_proxy_core.c.2308: (trace)
connecting backends timed out, retry limit reached: 6

i'm not sure what else i have to do to get it to work.

any help would be greatly appreciated, i've been developing for
a while locally on osx using nekotools server, and it works
great. i'd really love to use it.

thanks in advance.


「the.remix」


In December I had the same problem. With the help of people from
maillist I found some information and now I'm temporarily running
neko in CGI mode (not FCGI). But it's available to use it in FCGI
mode also.

At first there are a lot of unimplemented methods (for CGI) in
neko/Web.hx class. I've implemented those which make availability
to work with GET/POST data. If You wanna try it - look at issue
#311 at http://code.google.com/p/haxe/issues/list. But it's still
unavailable for example to read and write cookies but I think
I'll make this available during May.

At second there is a way to run neko as FCGI. Look here:
https://github.com/TheHippo/hxfcgi.
I tried to run it but unfortunately I had to run neko with
lighttpd as soon as possible, so I decided at first to implement
methods in Web.hx which make availability to run it in usual CGI
mode because I found this way easier. So, I had to defer my
thoughts about FCGI to summer, when we'll really need
performance. If You are REALLY interested in finishing hxfcgi
project - we can contribute both faster, because I'm really
interested in it, but I don't need it very soon.
I started the hxfcgi project a while ago just as a proof of
concept. (It runs as cgi or fcgi!) A while ago someone nearly
finished this project (it is currently in a extra branch, or check
out the forks of the project). The 2 multipart function of the Web
API are the only things missing, all other functions have been
implemented. Feel free to test and to contribute :-)

--
haXe - an open source web programming language
http://haxe.org



CGI config is very simple.
Here it is for lighttpd:

1. Swith cgi module on:
server.modules += ( "mod_cgi" )
2. assign filetype:
cgi.assign = ( ".n" => "/usr/bin/neko" )
3. patch Web.hx (implement some missing for CGI-mode methods)

Unfortunately, I can say nothing about FCGI.

--
haXe - an open source web programming language
http://haxe.org



Couldn't You reproduce Your steps to compile and run it in a few words?
As I understood - You run it in a way, similar to running ruby as fcgi?

Best regards
Alexander

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

alexander.konotop
В Mon, 25 Apr 2011 08:14:32 -1000
theRemix <[hidden email]> пишет:

> sure, i'm not sure if what i'm doing is correct though, this is what
> i did.
>
> git clone https://github.com/TheHippo/hxfcgi.git
> cd hxfcgi
> make all
>
> # output
> rm -f bin/hxfcgi.ndll
> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp
> -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
> src/request.o src/request.cpp g++ -Wall -shared
> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o
> src/basic.cpp g++ -Wall -shared
> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
> src/data.cpp g++ -Wall -shared
> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi # test
> neko bin/test.n Called from neko/Web.hx line 39
> Called from neko/Web.hx line 312
> Called from neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load
> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)
>
>
> # lighty configuration
>
> sudo port install lighttpd
>
> /opt/local/etc/lighttpd/lighttpd.conf :
> server.port = 8008
> server.bind = "localhost"
> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
>
> # omitted some other default configs
>
> # started lighty
> # testing
> wget http://localhost:8008/test.n
> --2011-04-25 08:12:06--  http://localhost:8008/test.n
> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
> Connecting to localhost (localhost)|::1|:8008... connected.
> HTTP request sent, awaiting response... 500 Internal Server Error
> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
>
> # from lighty terminal, where i have it running
> Called from neko/Web.hx line 39
> Called from neko/Web.hx line 312
> Called from neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load
> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
> mach-o, but wrong architecture)
>
>
>
>
> from the looks of the error, "wrong architecture", maybe i did not
> compile/configure this correctly. does this give enough details? i
> feel like i'm close though.
>
>
> 「the.remix」
>
> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
>
> > В Mon, 25 Apr 2011 06:30:57 -1000
> > theRemix <[hidden email]> пишет:
> >
> >> ok i got a 500 error
> >>
> >> Called from neko/Web.hx line 39
> >> Called from neko/Web.hx line 312
> >> Called from neko/Lib.hx line 33
> >> Uncaught exception - load.c(232) : Failed to load
> >> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> >> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
> >> suitable image found.  Did
> >> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
> >> wrong architecture)
> >>
> >> i also did MXCPP_M64=true make all
> >> with same results
> >>
> >>
> >> i'm on OSX
> >> uname -a
> >> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
> >> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
> >> Using built-in specs.
> >> Target: i686-apple-darwin10
> >> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
> >> --disable-checking --enable-werror --prefix=/usr
> >> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
> >> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
> >> --with-slibdir=/usr/lib --build=i686-apple-darwin10
> >> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
> >> --target=i686-apple-darwin10
> >> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
> >> version 4.2.1 (Apple Inc. build 5666) (dot 3)
> >>
> >>
> >> any ideas?
> >>
> >> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
> >>
> >>> В Mon, 25 Apr 2011 04:33:04 -1000
> >>> theRemix <[hidden email]> пишет:
> >>>
> >>>> ok i cloned and compiled the test for hxfcgi
> >>>>
> >>>> and i'm not exactly clear on how i'm supposed to use it.
> >>>>
> >>>> mostly, the lighttpd config, can you please share a simple
> >>>> cgi/fcgi lighttpd config?
> >>>>
> >>>> i'm guessing once lighty is configured, i should use the
> >>>> neko/Web.hx and neko/Lib.hx then wrap my application same as the
> >>>> Test example, and compile (using nekotools boot) into a .fcgi
> >>>> file. correct?
> >>>>
> >>>> just not sure how to deploy it.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> 「the.remix」
> >>>>
> >>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
> >>>>
> >>>>>
> >>>>>
> >>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
> >>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
> >>>>>> theRemix<[hidden email]>  пишет:
> >>>>>>
> >>>>>>> Hi List,
> >>>>>>>
> >>>>>>> I've been experimenting with tora without any luck,
> >>>>>>> because i don't have apache. And if all else fails, i'll go
> >>>>>>> and install apache since it seems to be the only thing i can
> >>>>>>> find online that should work.
> >>>>>>>
> >>>>>>> Anyway, i have nginx, i just installed lighttpd, i
> >>>>>>> finally got neko 1.8.1 compiled and running pretty well on my
> >>>>>>> gentoo system, it was difficult. i also patched lighty with
> >>>>>>> diffs from the old posts from Kaalh
> >>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> >>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> >>>>>>> and that compiled fine, and is installed on my server.
> >>>>>>>
> >>>>>>> is there a way, fcgi, or other, to use neko/tora with
> >>>>>>> nginx/lighttpd ? if so, could someone please help me out here
> >>>>>>> with some, even basic, working configuration and instructions?
> >>>>>>>
> >>>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
> >>>>>>> before i resort to working with apache, i'll give hxnode a
> >>>>>>> shot and maybe make my own http server with it.
> >>>>>>>
> >>>>>>> also, if you rolled your own neko server somehow,
> >>>>>>> please share, i'm very interested.
> >>>>>>>
> >>>>>>>
> >>>>>>> so i got really far with lighttpd. a request to a
> >>>>>>> neko.n file resulted in a  long unresponsive request (nothing
> >>>>>>> was returned) and here's why. i tailed the lighttpd error.log
> >>>>>>> and got these, until it finally timed out.
> >>>>>>>
> >>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>>>>>> backlog: all addresses are down, putting /server.n (6) into
> >>>>>>> the backlog, retry = 1 mod_proxy_core.c.1495: (trace) address
> >>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
> >>>>>>> down, putting /server.n (6) into the backlog, retry = 2
> >>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>>>>>> backlog: all addresses are down, putting /server.n (6) into
> >>>>>>> the backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
> >>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
> >>>>>>> down, putting /server.n (6) into the backlog, retry = 3
> >>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
> >>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
> >>>>>>> backlog: all addresses are down, putting /server.n (6) into
> >>>>>>> the backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
> >>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
> >>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
> >>>>>>> down, putting /server.n (6) into the backlog, retry = 5
> >>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
> >>>>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
> >>>>>>> connecting backends timed out, retry limit reached: 6
> >>>>>>>
> >>>>>>> i'm not sure what else i have to do to get it to work.
> >>>>>>>
> >>>>>>> any help would be greatly appreciated, i've been developing
> >>>>>>> for a while locally on osx using nekotools server, and it
> >>>>>>> works great. i'd really love to use it.
> >>>>>>>
> >>>>>>> thanks in advance.
> >>>>>>>
> >>>>>>>
> >>>>>>> 「the.remix」
> >>>>>>>
> >>>>>>>
> >>>>>> In December I had the same problem. With the help of people
> >>>>>> from maillist I found some information and now I'm temporarily
> >>>>>> running neko in CGI mode (not FCGI). But it's available to use
> >>>>>> it in FCGI mode also.
> >>>>>>
> >>>>>> At first there are a lot of unimplemented methods (for CGI) in
> >>>>>> neko/Web.hx class. I've implemented those which make
> >>>>>> availability to work with GET/POST data. If You wanna try it -
> >>>>>> look at issue #311 at
> >>>>>> http://code.google.com/p/haxe/issues/list. But it's still
> >>>>>> unavailable for example to read and write cookies but I think
> >>>>>> I'll make this available during May.
> >>>>>>
> >>>>>> At second there is a way to run neko as FCGI. Look here:
> >>>>>> https://github.com/TheHippo/hxfcgi.
> >>>>>> I tried to run it but unfortunately I had to run neko with
> >>>>>> lighttpd as soon as possible, so I decided at first to
> >>>>>> implement methods in Web.hx which make availability to run it
> >>>>>> in usual CGI mode because I found this way easier. So, I had
> >>>>>> to defer my thoughts about FCGI to summer, when we'll really
> >>>>>> need performance. If You are REALLY interested in finishing
> >>>>>> hxfcgi project - we can contribute both faster, because I'm
> >>>>>> really interested in it, but I don't need it very soon.
> >>>>> I started the hxfcgi project a while ago just as a proof of
> >>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
> >>>>> finished this project (it is currently in a extra branch, or
> >>>>> check out the forks of the project). The 2 multipart function
> >>>>> of the Web API are the only things missing, all other functions
> >>>>> have been implemented. Feel free to test and to contribute :-)
> >>>>>
> >>>>> --
> >>>>> haXe - an open source web programming language
> >>>>> http://haxe.org
> >>>>
> >>>>
> >>>
> >>> CGI config is very simple.
> >>> Here it is for lighttpd:
> >>>
> >>> 1. Swith cgi module on:
> >>> server.modules += ( "mod_cgi" )
> >>> 2. assign filetype:
> >>> cgi.assign = ( ".n" => "/usr/bin/neko" )
> >>> 3. patch Web.hx (implement some missing for CGI-mode methods)
> >>>
> >>> Unfortunately, I can say nothing about FCGI.
> >>>
> >>> --
> >>> haXe - an open source web programming language
> >>> http://haxe.org
> >>
> >>
> >
> > Couldn't You reproduce Your steps to compile and run it in a few
> > words? As I understood - You run it in a way, similar to running
> > ruby as fcgi?
> >
> > Best regards
> > Alexander
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

Same result. There's no hxfcgi.ndll after compilation. BTW, I compiled
in another way: added -D HXCPP_M64 to cpp.hxml and then run
"haxe cpp.hxml".

Seems like we're compiling not what we have to compile... :-)

Best regards
Alexander

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
i actually did get an hxfcgi.ndll, here are all the files that went in bin when i did make all

$ ls bin/
hxfcgi.ndll test.fcgi
nekoapi.ndll test.n


when i did $haxe cpp.hxml and $haxe.neko.hxml  i didn't get the hxfcgi.ndll either

i still think that it's just my compile flags, or compiler, is configured wrong which is why my error is saying,
Called from neko/Web.hx line 39
Called from neko/Web.hx line 312
Called from neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
        /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)



「the.remix」

On Apr 25, 2011, at 9:04 AM, Alexander Konotop wrote:

> В Mon, 25 Apr 2011 08:14:32 -1000
> theRemix <[hidden email]> пишет:
>
>> sure, i'm not sure if what i'm doing is correct though, this is what
>> i did.
>>
>> git clone https://github.com/TheHippo/hxfcgi.git
>> cd hxfcgi
>> make all
>>
>> # output
>> rm -f bin/hxfcgi.ndll
>> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
>> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp
>> -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
>> src/request.o src/request.cpp g++ -Wall -shared
>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o
>> src/basic.cpp g++ -Wall -shared
>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
>> src/data.cpp g++ -Wall -shared
>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
>> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
>> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi # test
>> neko bin/test.n Called from neko/Web.hx line 39
>> Called from neko/Web.hx line 312
>> Called from neko/Lib.hx line 33
>> Uncaught exception - load.c(232) : Failed to load
>> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
>> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)
>>
>>
>> # lighty configuration
>>
>> sudo port install lighttpd
>>
>> /opt/local/etc/lighttpd/lighttpd.conf :
>> server.port = 8008
>> server.bind = "localhost"
>> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
>> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
>> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
>> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
>>
>> # omitted some other default configs
>>
>> # started lighty
>> # testing
>> wget http://localhost:8008/test.n
>> --2011-04-25 08:12:06--  http://localhost:8008/test.n
>> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
>> Connecting to localhost (localhost)|::1|:8008... connected.
>> HTTP request sent, awaiting response... 500 Internal Server Error
>> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
>>
>> # from lighty terminal, where i have it running
>> Called from neko/Web.hx line 39
>> Called from neko/Web.hx line 312
>> Called from neko/Lib.hx line 33
>> Uncaught exception - load.c(232) : Failed to load
>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
>> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
>> mach-o, but wrong architecture)
>>
>>
>>
>>
>> from the looks of the error, "wrong architecture", maybe i did not
>> compile/configure this correctly. does this give enough details? i
>> feel like i'm close though.
>>
>>
>> 「the.remix」
>>
>> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
>>
>>> В Mon, 25 Apr 2011 06:30:57 -1000
>>> theRemix <[hidden email]> пишет:
>>>
>>>> ok i got a 500 error
>>>>
>>>> Called from neko/Web.hx line 39
>>>> Called from neko/Web.hx line 312
>>>> Called from neko/Lib.hx line 33
>>>> Uncaught exception - load.c(232) : Failed to load
>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
>>>> suitable image found.  Did
>>>> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
>>>> wrong architecture)
>>>>
>>>> i also did MXCPP_M64=true make all
>>>> with same results
>>>>
>>>>
>>>> i'm on OSX
>>>> uname -a
>>>> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
>>>> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
>>>> Using built-in specs.
>>>> Target: i686-apple-darwin10
>>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
>>>> --disable-checking --enable-werror --prefix=/usr
>>>> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
>>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
>>>> --with-slibdir=/usr/lib --build=i686-apple-darwin10
>>>> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
>>>> --target=i686-apple-darwin10
>>>> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
>>>> version 4.2.1 (Apple Inc. build 5666) (dot 3)
>>>>
>>>>
>>>> any ideas?
>>>>
>>>> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
>>>>
>>>>> В Mon, 25 Apr 2011 04:33:04 -1000
>>>>> theRemix <[hidden email]> пишет:
>>>>>
>>>>>> ok i cloned and compiled the test for hxfcgi
>>>>>>
>>>>>> and i'm not exactly clear on how i'm supposed to use it.
>>>>>>
>>>>>> mostly, the lighttpd config, can you please share a simple
>>>>>> cgi/fcgi lighttpd config?
>>>>>>
>>>>>> i'm guessing once lighty is configured, i should use the
>>>>>> neko/Web.hx and neko/Lib.hx then wrap my application same as the
>>>>>> Test example, and compile (using nekotools boot) into a .fcgi
>>>>>> file. correct?
>>>>>>
>>>>>> just not sure how to deploy it.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 「the.remix」
>>>>>>
>>>>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
>>>>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
>>>>>>>> theRemix<[hidden email]>  пишет:
>>>>>>>>
>>>>>>>>> Hi List,
>>>>>>>>>
>>>>>>>>> I've been experimenting with tora without any luck,
>>>>>>>>> because i don't have apache. And if all else fails, i'll go
>>>>>>>>> and install apache since it seems to be the only thing i can
>>>>>>>>> find online that should work.
>>>>>>>>>
>>>>>>>>> Anyway, i have nginx, i just installed lighttpd, i
>>>>>>>>> finally got neko 1.8.1 compiled and running pretty well on my
>>>>>>>>> gentoo system, it was difficult. i also patched lighty with
>>>>>>>>> diffs from the old posts from Kaalh
>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>>>>>>>> and that compiled fine, and is installed on my server.
>>>>>>>>>
>>>>>>>>> is there a way, fcgi, or other, to use neko/tora with
>>>>>>>>> nginx/lighttpd ? if so, could someone please help me out here
>>>>>>>>> with some, even basic, working configuration and instructions?
>>>>>>>>>
>>>>>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
>>>>>>>>> before i resort to working with apache, i'll give hxnode a
>>>>>>>>> shot and maybe make my own http server with it.
>>>>>>>>>
>>>>>>>>> also, if you rolled your own neko server somehow,
>>>>>>>>> please share, i'm very interested.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> so i got really far with lighttpd. a request to a
>>>>>>>>> neko.n file resulted in a  long unresponsive request (nothing
>>>>>>>>> was returned) and here's why. i tailed the lighttpd error.log
>>>>>>>>> and got these, until it finally timed out.
>>>>>>>>>
>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>> the backlog, retry = 1 mod_proxy_core.c.1495: (trace) address
>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 2
>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>> the backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 3
>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>> the backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 5
>>>>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
>>>>>>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
>>>>>>>>> connecting backends timed out, retry limit reached: 6
>>>>>>>>>
>>>>>>>>> i'm not sure what else i have to do to get it to work.
>>>>>>>>>
>>>>>>>>> any help would be greatly appreciated, i've been developing
>>>>>>>>> for a while locally on osx using nekotools server, and it
>>>>>>>>> works great. i'd really love to use it.
>>>>>>>>>
>>>>>>>>> thanks in advance.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 「the.remix」
>>>>>>>>>
>>>>>>>>>
>>>>>>>> In December I had the same problem. With the help of people
>>>>>>>> from maillist I found some information and now I'm temporarily
>>>>>>>> running neko in CGI mode (not FCGI). But it's available to use
>>>>>>>> it in FCGI mode also.
>>>>>>>>
>>>>>>>> At first there are a lot of unimplemented methods (for CGI) in
>>>>>>>> neko/Web.hx class. I've implemented those which make
>>>>>>>> availability to work with GET/POST data. If You wanna try it -
>>>>>>>> look at issue #311 at
>>>>>>>> http://code.google.com/p/haxe/issues/list. But it's still
>>>>>>>> unavailable for example to read and write cookies but I think
>>>>>>>> I'll make this available during May.
>>>>>>>>
>>>>>>>> At second there is a way to run neko as FCGI. Look here:
>>>>>>>> https://github.com/TheHippo/hxfcgi.
>>>>>>>> I tried to run it but unfortunately I had to run neko with
>>>>>>>> lighttpd as soon as possible, so I decided at first to
>>>>>>>> implement methods in Web.hx which make availability to run it
>>>>>>>> in usual CGI mode because I found this way easier. So, I had
>>>>>>>> to defer my thoughts about FCGI to summer, when we'll really
>>>>>>>> need performance. If You are REALLY interested in finishing
>>>>>>>> hxfcgi project - we can contribute both faster, because I'm
>>>>>>>> really interested in it, but I don't need it very soon.
>>>>>>> I started the hxfcgi project a while ago just as a proof of
>>>>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
>>>>>>> finished this project (it is currently in a extra branch, or
>>>>>>> check out the forks of the project). The 2 multipart function
>>>>>>> of the Web API are the only things missing, all other functions
>>>>>>> have been implemented. Feel free to test and to contribute :-)
>>>>>>>
>>>>>>> --
>>>>>>> haXe - an open source web programming language
>>>>>>> http://haxe.org
>>>>>>
>>>>>>
>>>>>
>>>>> CGI config is very simple.
>>>>> Here it is for lighttpd:
>>>>>
>>>>> 1. Swith cgi module on:
>>>>> server.modules += ( "mod_cgi" )
>>>>> 2. assign filetype:
>>>>> cgi.assign = ( ".n" => "/usr/bin/neko" )
>>>>> 3. patch Web.hx (implement some missing for CGI-mode methods)
>>>>>
>>>>> Unfortunately, I can say nothing about FCGI.
>>>>>
>>>>> --
>>>>> haXe - an open source web programming language
>>>>> http://haxe.org
>>>>
>>>>
>>>
>>> Couldn't You reproduce Your steps to compile and run it in a few
>>> words? As I understood - You run it in a way, similar to running
>>> ruby as fcgi?
>>>
>>> Best regards
>>> Alexander
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>
> Same result. There's no hxfcgi.ndll after compilation. BTW, I compiled
> in another way: added -D HXCPP_M64 to cpp.hxml and then run
> "haxe cpp.hxml".
>
> Seems like we're compiling not what we have to compile... :-)
>
> Best regards
> Alexander
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
lipo says X86_64


$lipo -info bin/hxfcgi.ndll
Non-fat file: hxfcgi.ndll is architecture: x86_64


could it be that my /usr/bin/neko is 32bit? and messing it up?

$lipo -info /usr/bin/neko
Architectures in the fat file: /usr/bin/neko are: ppc i386


$lipo -info /usr/bin/haxe
Non-fat file: /usr/bin/haxe is architecture: i386


「the.remix」

On Apr 25, 2011, at 10:41 AM, theRemix wrote:

> i actually did get an hxfcgi.ndll, here are all the files that went in bin when i did make all
>
> $ ls bin/
> hxfcgi.ndll test.fcgi
> nekoapi.ndll test.n
>
>
> when i did $haxe cpp.hxml and $haxe.neko.hxml  i didn't get the hxfcgi.ndll either
>
> i still think that it's just my compile flags, or compiler, is configured wrong which is why my error is saying,
> Called from neko/Web.hx line 39
> Called from neko/Web.hx line 312
> Called from neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
> /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)
>
>
>
> 「the.remix」
>
> On Apr 25, 2011, at 9:04 AM, Alexander Konotop wrote:
>
>> В Mon, 25 Apr 2011 08:14:32 -1000
>> theRemix <[hidden email]> пишет:
>>
>>> sure, i'm not sure if what i'm doing is correct though, this is what
>>> i did.
>>>
>>> git clone https://github.com/TheHippo/hxfcgi.git
>>> cd hxfcgi
>>> make all
>>>
>>> # output
>>> rm -f bin/hxfcgi.ndll
>>> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
>>> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp
>>> -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
>>> src/request.o src/request.cpp g++ -Wall -shared
>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o
>>> src/basic.cpp g++ -Wall -shared
>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
>>> src/data.cpp g++ -Wall -shared
>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
>>> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
>>> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi # test
>>> neko bin/test.n Called from neko/Web.hx line 39
>>> Called from neko/Web.hx line 312
>>> Called from neko/Lib.hx line 33
>>> Uncaught exception - load.c(232) : Failed to load
>>> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
>>> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)
>>>
>>>
>>> # lighty configuration
>>>
>>> sudo port install lighttpd
>>>
>>> /opt/local/etc/lighttpd/lighttpd.conf :
>>> server.port = 8008
>>> server.bind = "localhost"
>>> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
>>> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
>>> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
>>> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
>>>
>>> # omitted some other default configs
>>>
>>> # started lighty
>>> # testing
>>> wget http://localhost:8008/test.n
>>> --2011-04-25 08:12:06--  http://localhost:8008/test.n
>>> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
>>> Connecting to localhost (localhost)|::1|:8008... connected.
>>> HTTP request sent, awaiting response... 500 Internal Server Error
>>> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
>>>
>>> # from lighty terminal, where i have it running
>>> Called from neko/Web.hx line 39
>>> Called from neko/Web.hx line 312
>>> Called from neko/Lib.hx line 33
>>> Uncaught exception - load.c(232) : Failed to load
>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
>>> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
>>> mach-o, but wrong architecture)
>>>
>>>
>>>
>>>
>>> from the looks of the error, "wrong architecture", maybe i did not
>>> compile/configure this correctly. does this give enough details? i
>>> feel like i'm close though.
>>>
>>>
>>> 「the.remix」
>>>
>>> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
>>>
>>>> В Mon, 25 Apr 2011 06:30:57 -1000
>>>> theRemix <[hidden email]> пишет:
>>>>
>>>>> ok i got a 500 error
>>>>>
>>>>> Called from neko/Web.hx line 39
>>>>> Called from neko/Web.hx line 312
>>>>> Called from neko/Lib.hx line 33
>>>>> Uncaught exception - load.c(232) : Failed to load
>>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
>>>>> suitable image found.  Did
>>>>> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
>>>>> wrong architecture)
>>>>>
>>>>> i also did MXCPP_M64=true make all
>>>>> with same results
>>>>>
>>>>>
>>>>> i'm on OSX
>>>>> uname -a
>>>>> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
>>>>> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
>>>>> Using built-in specs.
>>>>> Target: i686-apple-darwin10
>>>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
>>>>> --disable-checking --enable-werror --prefix=/usr
>>>>> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
>>>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
>>>>> --with-slibdir=/usr/lib --build=i686-apple-darwin10
>>>>> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
>>>>> --target=i686-apple-darwin10
>>>>> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
>>>>> version 4.2.1 (Apple Inc. build 5666) (dot 3)
>>>>>
>>>>>
>>>>> any ideas?
>>>>>
>>>>> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
>>>>>
>>>>>> В Mon, 25 Apr 2011 04:33:04 -1000
>>>>>> theRemix <[hidden email]> пишет:
>>>>>>
>>>>>>> ok i cloned and compiled the test for hxfcgi
>>>>>>>
>>>>>>> and i'm not exactly clear on how i'm supposed to use it.
>>>>>>>
>>>>>>> mostly, the lighttpd config, can you please share a simple
>>>>>>> cgi/fcgi lighttpd config?
>>>>>>>
>>>>>>> i'm guessing once lighty is configured, i should use the
>>>>>>> neko/Web.hx and neko/Lib.hx then wrap my application same as the
>>>>>>> Test example, and compile (using nekotools boot) into a .fcgi
>>>>>>> file. correct?
>>>>>>>
>>>>>>> just not sure how to deploy it.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 「the.remix」
>>>>>>>
>>>>>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
>>>>>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
>>>>>>>>> theRemix<[hidden email]>  пишет:
>>>>>>>>>
>>>>>>>>>> Hi List,
>>>>>>>>>>
>>>>>>>>>> I've been experimenting with tora without any luck,
>>>>>>>>>> because i don't have apache. And if all else fails, i'll go
>>>>>>>>>> and install apache since it seems to be the only thing i can
>>>>>>>>>> find online that should work.
>>>>>>>>>>
>>>>>>>>>> Anyway, i have nginx, i just installed lighttpd, i
>>>>>>>>>> finally got neko 1.8.1 compiled and running pretty well on my
>>>>>>>>>> gentoo system, it was difficult. i also patched lighty with
>>>>>>>>>> diffs from the old posts from Kaalh
>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>>>>>>>>> and that compiled fine, and is installed on my server.
>>>>>>>>>>
>>>>>>>>>> is there a way, fcgi, or other, to use neko/tora with
>>>>>>>>>> nginx/lighttpd ? if so, could someone please help me out here
>>>>>>>>>> with some, even basic, working configuration and instructions?
>>>>>>>>>>
>>>>>>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
>>>>>>>>>> before i resort to working with apache, i'll give hxnode a
>>>>>>>>>> shot and maybe make my own http server with it.
>>>>>>>>>>
>>>>>>>>>> also, if you rolled your own neko server somehow,
>>>>>>>>>> please share, i'm very interested.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> so i got really far with lighttpd. a request to a
>>>>>>>>>> neko.n file resulted in a  long unresponsive request (nothing
>>>>>>>>>> was returned) and here's why. i tailed the lighttpd error.log
>>>>>>>>>> and got these, until it finally timed out.
>>>>>>>>>>
>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>> the backlog, retry = 1 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 2
>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>> the backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 3
>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>> the backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 5
>>>>>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
>>>>>>>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
>>>>>>>>>> connecting backends timed out, retry limit reached: 6
>>>>>>>>>>
>>>>>>>>>> i'm not sure what else i have to do to get it to work.
>>>>>>>>>>
>>>>>>>>>> any help would be greatly appreciated, i've been developing
>>>>>>>>>> for a while locally on osx using nekotools server, and it
>>>>>>>>>> works great. i'd really love to use it.
>>>>>>>>>>
>>>>>>>>>> thanks in advance.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 「the.remix」
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> In December I had the same problem. With the help of people
>>>>>>>>> from maillist I found some information and now I'm temporarily
>>>>>>>>> running neko in CGI mode (not FCGI). But it's available to use
>>>>>>>>> it in FCGI mode also.
>>>>>>>>>
>>>>>>>>> At first there are a lot of unimplemented methods (for CGI) in
>>>>>>>>> neko/Web.hx class. I've implemented those which make
>>>>>>>>> availability to work with GET/POST data. If You wanna try it -
>>>>>>>>> look at issue #311 at
>>>>>>>>> http://code.google.com/p/haxe/issues/list. But it's still
>>>>>>>>> unavailable for example to read and write cookies but I think
>>>>>>>>> I'll make this available during May.
>>>>>>>>>
>>>>>>>>> At second there is a way to run neko as FCGI. Look here:
>>>>>>>>> https://github.com/TheHippo/hxfcgi.
>>>>>>>>> I tried to run it but unfortunately I had to run neko with
>>>>>>>>> lighttpd as soon as possible, so I decided at first to
>>>>>>>>> implement methods in Web.hx which make availability to run it
>>>>>>>>> in usual CGI mode because I found this way easier. So, I had
>>>>>>>>> to defer my thoughts about FCGI to summer, when we'll really
>>>>>>>>> need performance. If You are REALLY interested in finishing
>>>>>>>>> hxfcgi project - we can contribute both faster, because I'm
>>>>>>>>> really interested in it, but I don't need it very soon.
>>>>>>>> I started the hxfcgi project a while ago just as a proof of
>>>>>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
>>>>>>>> finished this project (it is currently in a extra branch, or
>>>>>>>> check out the forks of the project). The 2 multipart function
>>>>>>>> of the Web API are the only things missing, all other functions
>>>>>>>> have been implemented. Feel free to test and to contribute :-)
>>>>>>>>
>>>>>>>> --
>>>>>>>> haXe - an open source web programming language
>>>>>>>> http://haxe.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> CGI config is very simple.
>>>>>> Here it is for lighttpd:
>>>>>>
>>>>>> 1. Swith cgi module on:
>>>>>> server.modules += ( "mod_cgi" )
>>>>>> 2. assign filetype:
>>>>>> cgi.assign = ( ".n" => "/usr/bin/neko" )
>>>>>> 3. patch Web.hx (implement some missing for CGI-mode methods)
>>>>>>
>>>>>> Unfortunately, I can say nothing about FCGI.
>>>>>>
>>>>>> --
>>>>>> haXe - an open source web programming language
>>>>>> http://haxe.org
>>>>>
>>>>>
>>>>
>>>> Couldn't You reproduce Your steps to compile and run it in a few
>>>> words? As I understood - You run it in a way, similar to running
>>>> ruby as fcgi?
>>>>
>>>> Best regards
>>>> Alexander
>>>>
>>>> --
>>>> haXe - an open source web programming language
>>>> http://haxe.org
>>>
>>
>> Same result. There's no hxfcgi.ndll after compilation. BTW, I compiled
>> in another way: added -D HXCPP_M64 to cpp.hxml and then run
>> "haxe cpp.hxml".
>>
>> Seems like we're compiling not what we have to compile... :-)
>>
>> Best regards
>> Alexander
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
so in my attempt to get hxfcgi.ndll working, i compiled it into i386 this way
Makefile: CFLAGS = -Wall -shared -I$(HXCPP_INCLUDE) -D hxcpp -DHX_MACOS -m32
make all

then $lipo -info bin/hxfcgi.ndll
Non-fat file: bin/hxfcgi.ndll is architecture: i386

cd bin/

./test.fcgi
Could not link plugin to process (hxCFFILoader.h 171)

neko test.n
Could not link plugin to process (hxCFFILoader.h 171)



less errors, not sure if this is a good sign.
of course, lighttpd shows the same errors via mod_cgi


「the.remix」

On Apr 25, 2011, at 4:19 PM, theRemix wrote:

> lipo says X86_64
>
>
> $lipo -info bin/hxfcgi.ndll
> Non-fat file: hxfcgi.ndll is architecture: x86_64
>
>
> could it be that my /usr/bin/neko is 32bit? and messing it up?
>
> $lipo -info /usr/bin/neko
> Architectures in the fat file: /usr/bin/neko are: ppc i386
>
>
> $lipo -info /usr/bin/haxe
> Non-fat file: /usr/bin/haxe is architecture: i386
>
>
> 「the.remix」
>
> On Apr 25, 2011, at 10:41 AM, theRemix wrote:
>
>> i actually did get an hxfcgi.ndll, here are all the files that went in bin when i did make all
>>
>> $ ls bin/
>> hxfcgi.ndll test.fcgi
>> nekoapi.ndll test.n
>>
>>
>> when i did $haxe cpp.hxml and $haxe.neko.hxml  i didn't get the hxfcgi.ndll either
>>
>> i still think that it's just my compile flags, or compiler, is configured wrong which is why my error is saying,
>> Called from neko/Web.hx line 39
>> Called from neko/Web.hx line 312
>> Called from neko/Lib.hx line 33
>> Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
>> /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)
>>
>>
>>
>> 「the.remix」
>>
>> On Apr 25, 2011, at 9:04 AM, Alexander Konotop wrote:
>>
>>> В Mon, 25 Apr 2011 08:14:32 -1000
>>> theRemix <[hidden email]> пишет:
>>>
>>>> sure, i'm not sure if what i'm doing is correct though, this is what
>>>> i did.
>>>>
>>>> git clone https://github.com/TheHippo/hxfcgi.git
>>>> cd hxfcgi
>>>> make all
>>>>
>>>> # output
>>>> rm -f bin/hxfcgi.ndll
>>>> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
>>>> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp
>>>> -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
>>>> src/request.o src/request.cpp g++ -Wall -shared
>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o
>>>> src/basic.cpp g++ -Wall -shared
>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
>>>> src/data.cpp g++ -Wall -shared
>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
>>>> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
>>>> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi # test
>>>> neko bin/test.n Called from neko/Web.hx line 39
>>>> Called from neko/Web.hx line 312
>>>> Called from neko/Lib.hx line 33
>>>> Uncaught exception - load.c(232) : Failed to load
>>>> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
>>>> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)
>>>>
>>>>
>>>> # lighty configuration
>>>>
>>>> sudo port install lighttpd
>>>>
>>>> /opt/local/etc/lighttpd/lighttpd.conf :
>>>> server.port = 8008
>>>> server.bind = "localhost"
>>>> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
>>>> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
>>>> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
>>>> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
>>>>
>>>> # omitted some other default configs
>>>>
>>>> # started lighty
>>>> # testing
>>>> wget http://localhost:8008/test.n
>>>> --2011-04-25 08:12:06--  http://localhost:8008/test.n
>>>> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
>>>> Connecting to localhost (localhost)|::1|:8008... connected.
>>>> HTTP request sent, awaiting response... 500 Internal Server Error
>>>> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
>>>>
>>>> # from lighty terminal, where i have it running
>>>> Called from neko/Web.hx line 39
>>>> Called from neko/Web.hx line 312
>>>> Called from neko/Lib.hx line 33
>>>> Uncaught exception - load.c(232) : Failed to load
>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
>>>> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
>>>> mach-o, but wrong architecture)
>>>>
>>>>
>>>>
>>>>
>>>> from the looks of the error, "wrong architecture", maybe i did not
>>>> compile/configure this correctly. does this give enough details? i
>>>> feel like i'm close though.
>>>>
>>>>
>>>> 「the.remix」
>>>>
>>>> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
>>>>
>>>>> В Mon, 25 Apr 2011 06:30:57 -1000
>>>>> theRemix <[hidden email]> пишет:
>>>>>
>>>>>> ok i got a 500 error
>>>>>>
>>>>>> Called from neko/Web.hx line 39
>>>>>> Called from neko/Web.hx line 312
>>>>>> Called from neko/Lib.hx line 33
>>>>>> Uncaught exception - load.c(232) : Failed to load
>>>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
>>>>>> suitable image found.  Did
>>>>>> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
>>>>>> wrong architecture)
>>>>>>
>>>>>> i also did MXCPP_M64=true make all
>>>>>> with same results
>>>>>>
>>>>>>
>>>>>> i'm on OSX
>>>>>> uname -a
>>>>>> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
>>>>>> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
>>>>>> Using built-in specs.
>>>>>> Target: i686-apple-darwin10
>>>>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
>>>>>> --disable-checking --enable-werror --prefix=/usr
>>>>>> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
>>>>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
>>>>>> --with-slibdir=/usr/lib --build=i686-apple-darwin10
>>>>>> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
>>>>>> --target=i686-apple-darwin10
>>>>>> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
>>>>>> version 4.2.1 (Apple Inc. build 5666) (dot 3)
>>>>>>
>>>>>>
>>>>>> any ideas?
>>>>>>
>>>>>> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
>>>>>>
>>>>>>> В Mon, 25 Apr 2011 04:33:04 -1000
>>>>>>> theRemix <[hidden email]> пишет:
>>>>>>>
>>>>>>>> ok i cloned and compiled the test for hxfcgi
>>>>>>>>
>>>>>>>> and i'm not exactly clear on how i'm supposed to use it.
>>>>>>>>
>>>>>>>> mostly, the lighttpd config, can you please share a simple
>>>>>>>> cgi/fcgi lighttpd config?
>>>>>>>>
>>>>>>>> i'm guessing once lighty is configured, i should use the
>>>>>>>> neko/Web.hx and neko/Lib.hx then wrap my application same as the
>>>>>>>> Test example, and compile (using nekotools boot) into a .fcgi
>>>>>>>> file. correct?
>>>>>>>>
>>>>>>>> just not sure how to deploy it.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 「the.remix」
>>>>>>>>
>>>>>>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
>>>>>>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
>>>>>>>>>> theRemix<[hidden email]>  пишет:
>>>>>>>>>>
>>>>>>>>>>> Hi List,
>>>>>>>>>>>
>>>>>>>>>>> I've been experimenting with tora without any luck,
>>>>>>>>>>> because i don't have apache. And if all else fails, i'll go
>>>>>>>>>>> and install apache since it seems to be the only thing i can
>>>>>>>>>>> find online that should work.
>>>>>>>>>>>
>>>>>>>>>>> Anyway, i have nginx, i just installed lighttpd, i
>>>>>>>>>>> finally got neko 1.8.1 compiled and running pretty well on my
>>>>>>>>>>> gentoo system, it was difficult. i also patched lighty with
>>>>>>>>>>> diffs from the old posts from Kaalh
>>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>>>>>>>>>> and that compiled fine, and is installed on my server.
>>>>>>>>>>>
>>>>>>>>>>> is there a way, fcgi, or other, to use neko/tora with
>>>>>>>>>>> nginx/lighttpd ? if so, could someone please help me out here
>>>>>>>>>>> with some, even basic, working configuration and instructions?
>>>>>>>>>>>
>>>>>>>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
>>>>>>>>>>> before i resort to working with apache, i'll give hxnode a
>>>>>>>>>>> shot and maybe make my own http server with it.
>>>>>>>>>>>
>>>>>>>>>>> also, if you rolled your own neko server somehow,
>>>>>>>>>>> please share, i'm very interested.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> so i got really far with lighttpd. a request to a
>>>>>>>>>>> neko.n file resulted in a  long unresponsive request (nothing
>>>>>>>>>>> was returned) and here's why. i tailed the lighttpd error.log
>>>>>>>>>>> and got these, until it finally timed out.
>>>>>>>>>>>
>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>> the backlog, retry = 1 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 2
>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>> the backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 3
>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>> the backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 5
>>>>>>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
>>>>>>>>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
>>>>>>>>>>> connecting backends timed out, retry limit reached: 6
>>>>>>>>>>>
>>>>>>>>>>> i'm not sure what else i have to do to get it to work.
>>>>>>>>>>>
>>>>>>>>>>> any help would be greatly appreciated, i've been developing
>>>>>>>>>>> for a while locally on osx using nekotools server, and it
>>>>>>>>>>> works great. i'd really love to use it.
>>>>>>>>>>>
>>>>>>>>>>> thanks in advance.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 「the.remix」
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> In December I had the same problem. With the help of people
>>>>>>>>>> from maillist I found some information and now I'm temporarily
>>>>>>>>>> running neko in CGI mode (not FCGI). But it's available to use
>>>>>>>>>> it in FCGI mode also.
>>>>>>>>>>
>>>>>>>>>> At first there are a lot of unimplemented methods (for CGI) in
>>>>>>>>>> neko/Web.hx class. I've implemented those which make
>>>>>>>>>> availability to work with GET/POST data. If You wanna try it -
>>>>>>>>>> look at issue #311 at
>>>>>>>>>> http://code.google.com/p/haxe/issues/list. But it's still
>>>>>>>>>> unavailable for example to read and write cookies but I think
>>>>>>>>>> I'll make this available during May.
>>>>>>>>>>
>>>>>>>>>> At second there is a way to run neko as FCGI. Look here:
>>>>>>>>>> https://github.com/TheHippo/hxfcgi.
>>>>>>>>>> I tried to run it but unfortunately I had to run neko with
>>>>>>>>>> lighttpd as soon as possible, so I decided at first to
>>>>>>>>>> implement methods in Web.hx which make availability to run it
>>>>>>>>>> in usual CGI mode because I found this way easier. So, I had
>>>>>>>>>> to defer my thoughts about FCGI to summer, when we'll really
>>>>>>>>>> need performance. If You are REALLY interested in finishing
>>>>>>>>>> hxfcgi project - we can contribute both faster, because I'm
>>>>>>>>>> really interested in it, but I don't need it very soon.
>>>>>>>>> I started the hxfcgi project a while ago just as a proof of
>>>>>>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
>>>>>>>>> finished this project (it is currently in a extra branch, or
>>>>>>>>> check out the forks of the project). The 2 multipart function
>>>>>>>>> of the Web API are the only things missing, all other functions
>>>>>>>>> have been implemented. Feel free to test and to contribute :-)
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> haXe - an open source web programming language
>>>>>>>>> http://haxe.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> CGI config is very simple.
>>>>>>> Here it is for lighttpd:
>>>>>>>
>>>>>>> 1. Swith cgi module on:
>>>>>>> server.modules += ( "mod_cgi" )
>>>>>>> 2. assign filetype:
>>>>>>> cgi.assign = ( ".n" => "/usr/bin/neko" )
>>>>>>> 3. patch Web.hx (implement some missing for CGI-mode methods)
>>>>>>>
>>>>>>> Unfortunately, I can say nothing about FCGI.
>>>>>>>
>>>>>>> --
>>>>>>> haXe - an open source web programming language
>>>>>>> http://haxe.org
>>>>>>
>>>>>>
>>>>>
>>>>> Couldn't You reproduce Your steps to compile and run it in a few
>>>>> words? As I understood - You run it in a way, similar to running
>>>>> ruby as fcgi?
>>>>>
>>>>> Best regards
>>>>> Alexander
>>>>>
>>>>> --
>>>>> haXe - an open source web programming language
>>>>> http://haxe.org
>>>>
>>>
>>> Same result. There's no hxfcgi.ndll after compilation. BTW, I compiled
>>> in another way: added -D HXCPP_M64 to cpp.hxml and then run
>>> "haxe cpp.hxml".
>>>
>>> Seems like we're compiling not what we have to compile... :-)
>>>
>>> Best regards
>>> Alexander
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

Niel Drummond-3
In reply to this post by theRemix
On 04/24/11 22:09, theRemix wrote:
> Hi List,
>
> I've been experimenting with tora without any luck, because i don't have apache. And if all else fails, i'll go and install apache since it seems to be the only thing i can find online that should work.
Hello,

If you don't have any luck with fcgi, there is an open source tora
server written by a member on IRC 'sality', who is a little slow in
marketing his efforts, spending most of his time coding the thing. A
link to an older version is (newer version has AVM scripting and RTMP):

http://lain.thelatticeteam.com/ltapplsrv-dev.tar.gz

I think it's currently used in production by a gambling site, and I've
tried it out to see if it works (it's very lightweight). Though, if you
need help, you'll need to get on irc..

- Niel

> Anyway, i have nginx, i just installed lighttpd, i finally got neko 1.8.1 compiled and running pretty well on my gentoo system, it was difficult.
> i also patched lighty with diffs from the old posts from Kaalh
> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> and that compiled fine, and is installed on my server.
>
> is there a way, fcgi, or other, to use neko/tora with nginx/lighttpd ?
> if so, could someone please help me out here with some, even basic, working configuration and instructions?
>
> i also saw blackdog's hxnode, nodejs port  and i guess before i resort to working with apache, i'll give hxnode a shot and maybe make my own http server with it.
>
> also, if you rolled your own neko server somehow, please share, i'm very interested.
>
>
> so i got really far with lighttpd. a request to a neko.n file resulted in a  long unresponsive request (nothing was returned) and here's why.
> i tailed the lighttpd error.log and got these, until it finally timed out.
>
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 1
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 2
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 2
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 3
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 4
> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us, disabling for 2 sec
> mod_proxy_core.c.2336: (trace) backlog: all addresses are down, putting /server.n (6) into the backlog, retry = 5
> mod_proxy_core.c.2342: (trace) connecting backends timed out, retry limit reached: 5
> mod_proxy_core.c.2308: (trace) connecting backends timed out, retry limit reached: 6
>
> i'm not sure what else i have to do to get it to work.
>
> any help would be greatly appreciated, i've been developing for a while locally on osx using nekotools server, and it works great. i'd really love to use it.
>
> thanks in advance.
>
>
> 「the.remix」
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

KaalH!
In reply to this post by Philipp Klose-2

Le 25 avr. 2011 à 16:02, Philipp Klose a écrit :

>
>
> On 25.04.2011 11:32, Alexander Konotop wrote:
>> В Sun, 24 Apr 2011 10:09:38 -1000
>> theRemix<[hidden email]>  пишет:
>>
>>> Hi List,
>>>
>>> I've been experimenting with tora without any luck, because i
>>> don't have apache. And if all else fails, i'll go and install apache
>>> since it seems to be the only thing i can find online that should
>>> work.
>>>
>>> Anyway, i have nginx, i just installed lighttpd, i finally
>>> got neko 1.8.1 compiled and running pretty well on my gentoo system,
>>> it was difficult. i also patched lighty with diffs from the old posts
>>> from Kaalh
>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>> and that compiled fine, and is installed on my server.

great :)

>>>
>>> is there a way, fcgi, or other, to use neko/tora with
>>> nginx/lighttpd ? if so, could someone please help me out here with
>>> some, even basic, working configuration and instructions?
>>>
>>> i also saw blackdog's hxnode, nodejs port  and i guess before
>>> i resort to working with apache, i'll give hxnode a shot and maybe
>>> make my own http server with it.
>>>
>>> also, if you rolled your own neko server somehow, please
>>> share, i'm very interested.
>>>
>>>
>>> so i got really far with lighttpd. a request to a neko.n file
>>> resulted in a  long unresponsive request (nothing was returned) and
>>> here's why. i tailed the lighttpd error.log and got these, until it
>>> finally timed out.
>>>
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 1
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 2
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 3
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 4
>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused us,
>>> disabling for 2 sec mod_proxy_core.c.2336: (trace) backlog: all
>>> addresses are down, putting /server.n (6) into the backlog, retry = 5
>>> mod_proxy_core.c.2342: (trace) connecting backends timed out, retry
>>> limit reached: 5 mod_proxy_core.c.2308: (trace) connecting backends
>>> timed out, retry limit reached: 6
>>>
>>> i'm not sure what else i have to do to get it to work.
>>>
>>> any help would be greatly appreciated, i've been developing for a
>>> while locally on osx using nekotools server, and it works great. i'd
>>> really love to use it.
>>>
>>> thanks in advance.
>>>
>>>
>>> 「the.remix」
>>>
>>>
>> In December I had the same problem. With the help of people from
>> maillist I found some information and now I'm temporarily running neko
>> in CGI mode (not FCGI). But it's available to use it in FCGI mode also.
>>
>> At first there are a lot of unimplemented methods (for CGI) in
>> neko/Web.hx class. I've implemented those which make availability to
>> work with GET/POST data. If You wanna try it - look at issue #311 at
>> http://code.google.com/p/haxe/issues/list. But it's still unavailable
>> for example to read and write cookies but I think I'll make this
>> available during May.
>>
>> At second there is a way to run neko as FCGI. Look here:
>> https://github.com/TheHippo/hxfcgi.
>> I tried to run it but unfortunately I had to run neko with lighttpd as
>> soon as possible, so I decided at first to implement methods in Web.hx
>> which make availability to run it in usual CGI mode because I found
>> this way easier. So, I had to defer my thoughts about FCGI to summer,
>> when we'll really need performance. If You are REALLY interested in
>> finishing hxfcgi project - we can contribute both faster, because I'm
>> really interested in it, but I don't need it very soon.
> I started the hxfcgi project a while ago just as a proof of concept. (It runs as cgi or fcgi!) A while ago someone nearly finished this project (it is currently in a extra branch, or check out the forks of the project). The 2 multipart function of the Web API are the only things missing, all other functions have been implemented. Feel free to test and to contribute :-)
>

I am the "someone" ;)
I've implemented multipart functions (unfortunately only for cpp target, some neko buffer implementation are missing in hxcpp), and converted headers to be compatible with mod_neko.
Still have a blocking bug, I will push as soon as fixed.

I think having a cpp powered cgi/fastcgi implementation is a killer feature for haxe, a php alternative without installing anything on the production server, it's scalable, fast and furious^Wcompatible with all webservers.

Kaalh

> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

KaalH!
In reply to this post by theRemix

Le 26 avr. 2011 à 04:35, theRemix a écrit :

> so in my attempt to get hxfcgi.ndll working, i compiled it into i386 this way
> Makefile: CFLAGS = -Wall -shared -I$(HXCPP_INCLUDE) -D hxcpp -DHX_MACOS -m32
> make all
>
> then $lipo -info bin/hxfcgi.ndll
> Non-fat file: bin/hxfcgi.ndll is architecture: i386
>
> cd bin/
>
> ./test.fcgi
> Could not link plugin to process (hxCFFILoader.h 171)
>
> neko test.n
> Could not link plugin to process (hxCFFILoader.h 171)
>
>
>
> less errors, not sure if this is a good sign.
> of course, lighttpd shows the same errors via mod_cgi
>

cp /usr/lib/haxe/lib/hxcpp/2,07,0/bin/Mac/nekoapi.ndll bin/

>
> 「the.remix」
>
> On Apr 25, 2011, at 4:19 PM, theRemix wrote:
>
>> lipo says X86_64
>>
>>
>> $lipo -info bin/hxfcgi.ndll
>> Non-fat file: hxfcgi.ndll is architecture: x86_64
>>
>>
>> could it be that my /usr/bin/neko is 32bit? and messing it up?
>>
>> $lipo -info /usr/bin/neko
>> Architectures in the fat file: /usr/bin/neko are: ppc i386
>>
>>
>> $lipo -info /usr/bin/haxe
>> Non-fat file: /usr/bin/haxe is architecture: i386
>>
>>
>> 「the.remix」
>>
>> On Apr 25, 2011, at 10:41 AM, theRemix wrote:
>>
>>> i actually did get an hxfcgi.ndll, here are all the files that went in bin when i did make all
>>>
>>> $ ls bin/
>>> hxfcgi.ndll test.fcgi
>>> nekoapi.ndll test.n
>>>
>>>
>>> when i did $haxe cpp.hxml and $haxe.neko.hxml  i didn't get the hxfcgi.ndll either
>>>
>>> i still think that it's just my compile flags, or compiler, is configured wrong which is why my error is saying,
>>> Called from neko/Web.hx line 39
>>> Called from neko/Web.hx line 312
>>> Called from neko/Lib.hx line 33
>>> Uncaught exception - load.c(232) : Failed to load library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable image found.  Did find:
>>> /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but wrong architecture)
>>>
>>>
>>>
>>> 「the.remix」
>>>
>>> On Apr 25, 2011, at 9:04 AM, Alexander Konotop wrote:
>>>
>>>> В Mon, 25 Apr 2011 08:14:32 -1000
>>>> theRemix <[hidden email]> пишет:
>>>>
>>>>> sure, i'm not sure if what i'm doing is correct though, this is what
>>>>> i did.
>>>>>
>>>>> git clone https://github.com/TheHippo/hxfcgi.git
>>>>> cd hxfcgi
>>>>> make all
>>>>>
>>>>> # output
>>>>> rm -f bin/hxfcgi.ndll
>>>>> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
>>>>> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp
>>>>> -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
>>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
>>>>> src/request.o src/request.cpp g++ -Wall -shared
>>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/basic.o
>>>>> src/basic.cpp g++ -Wall -shared
>>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
>>>>> src/data.cpp g++ -Wall -shared
>>>>> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
>>>>> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
>>>>> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi # test
>>>>> neko bin/test.n Called from neko/Web.hx line 39
>>>>> Called from neko/Web.hx line 312
>>>>> Called from neko/Lib.hx line 33
>>>>> Uncaught exception - load.c(232) : Failed to load
>>>>> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
>>>>> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not found)
>>>>>
>>>>>
>>>>> # lighty configuration
>>>>>
>>>>> sudo port install lighttpd
>>>>>
>>>>> /opt/local/etc/lighttpd/lighttpd.conf :
>>>>> server.port = 8008
>>>>> server.bind = "localhost"
>>>>> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
>>>>> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
>>>>> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
>>>>> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
>>>>>
>>>>> # omitted some other default configs
>>>>>
>>>>> # started lighty
>>>>> # testing
>>>>> wget http://localhost:8008/test.n
>>>>> --2011-04-25 08:12:06--  http://localhost:8008/test.n
>>>>> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
>>>>> Connecting to localhost (localhost)|::1|:8008... connected.
>>>>> HTTP request sent, awaiting response... 500 Internal Server Error
>>>>> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
>>>>>
>>>>> # from lighty terminal, where i have it running
>>>>> Called from neko/Web.hx line 39
>>>>> Called from neko/Web.hx line 312
>>>>> Called from neko/Lib.hx line 33
>>>>> Uncaught exception - load.c(232) : Failed to load
>>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
>>>>> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
>>>>> mach-o, but wrong architecture)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> from the looks of the error, "wrong architecture", maybe i did not
>>>>> compile/configure this correctly. does this give enough details? i
>>>>> feel like i'm close though.
>>>>>
>>>>>
>>>>> 「the.remix」
>>>>>
>>>>> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
>>>>>
>>>>>> В Mon, 25 Apr 2011 06:30:57 -1000
>>>>>> theRemix <[hidden email]> пишет:
>>>>>>
>>>>>>> ok i got a 500 error
>>>>>>>
>>>>>>> Called from neko/Web.hx line 39
>>>>>>> Called from neko/Web.hx line 312
>>>>>>> Called from neko/Lib.hx line 33
>>>>>>> Uncaught exception - load.c(232) : Failed to load
>>>>>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
>>>>>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
>>>>>>> suitable image found.  Did
>>>>>>> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
>>>>>>> wrong architecture)
>>>>>>>
>>>>>>> i also did MXCPP_M64=true make all
>>>>>>> with same results
>>>>>>>
>>>>>>>
>>>>>>> i'm on OSX
>>>>>>> uname -a
>>>>>>> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
>>>>>>> 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc -v
>>>>>>> Using built-in specs.
>>>>>>> Target: i686-apple-darwin10
>>>>>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
>>>>>>> --disable-checking --enable-werror --prefix=/usr
>>>>>>> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
>>>>>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
>>>>>>> --with-slibdir=/usr/lib --build=i686-apple-darwin10
>>>>>>> --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
>>>>>>> --target=i686-apple-darwin10
>>>>>>> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
>>>>>>> version 4.2.1 (Apple Inc. build 5666) (dot 3)
>>>>>>>
>>>>>>>
>>>>>>> any ideas?
>>>>>>>
>>>>>>> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
>>>>>>>
>>>>>>>> В Mon, 25 Apr 2011 04:33:04 -1000
>>>>>>>> theRemix <[hidden email]> пишет:
>>>>>>>>
>>>>>>>>> ok i cloned and compiled the test for hxfcgi
>>>>>>>>>
>>>>>>>>> and i'm not exactly clear on how i'm supposed to use it.
>>>>>>>>>
>>>>>>>>> mostly, the lighttpd config, can you please share a simple
>>>>>>>>> cgi/fcgi lighttpd config?
>>>>>>>>>
>>>>>>>>> i'm guessing once lighty is configured, i should use the
>>>>>>>>> neko/Web.hx and neko/Lib.hx then wrap my application same as the
>>>>>>>>> Test example, and compile (using nekotools boot) into a .fcgi
>>>>>>>>> file. correct?
>>>>>>>>>
>>>>>>>>> just not sure how to deploy it.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 「the.remix」
>>>>>>>>>
>>>>>>>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
>>>>>>>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
>>>>>>>>>>> theRemix<[hidden email]>  пишет:
>>>>>>>>>>>
>>>>>>>>>>>> Hi List,
>>>>>>>>>>>>
>>>>>>>>>>>> I've been experimenting with tora without any luck,
>>>>>>>>>>>> because i don't have apache. And if all else fails, i'll go
>>>>>>>>>>>> and install apache since it seems to be the only thing i can
>>>>>>>>>>>> find online that should work.
>>>>>>>>>>>>
>>>>>>>>>>>> Anyway, i have nginx, i just installed lighttpd, i
>>>>>>>>>>>> finally got neko 1.8.1 compiled and running pretty well on my
>>>>>>>>>>>> gentoo system, it was difficult. i also patched lighty with
>>>>>>>>>>>> diffs from the old posts from Kaalh
>>>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
>>>>>>>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
>>>>>>>>>>>> and that compiled fine, and is installed on my server.
>>>>>>>>>>>>
>>>>>>>>>>>> is there a way, fcgi, or other, to use neko/tora with
>>>>>>>>>>>> nginx/lighttpd ? if so, could someone please help me out here
>>>>>>>>>>>> with some, even basic, working configuration and instructions?
>>>>>>>>>>>>
>>>>>>>>>>>> i also saw blackdog's hxnode, nodejs port  and i guess
>>>>>>>>>>>> before i resort to working with apache, i'll give hxnode a
>>>>>>>>>>>> shot and maybe make my own http server with it.
>>>>>>>>>>>>
>>>>>>>>>>>> also, if you rolled your own neko server somehow,
>>>>>>>>>>>> please share, i'm very interested.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> so i got really far with lighttpd. a request to a
>>>>>>>>>>>> neko.n file resulted in a  long unresponsive request (nothing
>>>>>>>>>>>> was returned) and here's why. i tailed the lighttpd error.log
>>>>>>>>>>>> and got these, until it finally timed out.
>>>>>>>>>>>>
>>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>>> the backlog, retry = 1 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 2
>>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>>> the backlog, retry = 2 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 3
>>>>>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666 refused
>>>>>>>>>>>> us, disabling for 2 sec mod_proxy_core.c.2336: (trace)
>>>>>>>>>>>> backlog: all addresses are down, putting /server.n (6) into
>>>>>>>>>>>> the backlog, retry = 4 mod_proxy_core.c.1495: (trace) address
>>>>>>>>>>>> 127.0.0.1:6666 refused us, disabling for 2 sec
>>>>>>>>>>>> mod_proxy_core.c.2336: (trace) backlog: all addresses are
>>>>>>>>>>>> down, putting /server.n (6) into the backlog, retry = 5
>>>>>>>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed out,
>>>>>>>>>>>> retry limit reached: 5 mod_proxy_core.c.2308: (trace)
>>>>>>>>>>>> connecting backends timed out, retry limit reached: 6
>>>>>>>>>>>>
>>>>>>>>>>>> i'm not sure what else i have to do to get it to work.
>>>>>>>>>>>>
>>>>>>>>>>>> any help would be greatly appreciated, i've been developing
>>>>>>>>>>>> for a while locally on osx using nekotools server, and it
>>>>>>>>>>>> works great. i'd really love to use it.
>>>>>>>>>>>>
>>>>>>>>>>>> thanks in advance.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 「the.remix」
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> In December I had the same problem. With the help of people
>>>>>>>>>>> from maillist I found some information and now I'm temporarily
>>>>>>>>>>> running neko in CGI mode (not FCGI). But it's available to use
>>>>>>>>>>> it in FCGI mode also.
>>>>>>>>>>>
>>>>>>>>>>> At first there are a lot of unimplemented methods (for CGI) in
>>>>>>>>>>> neko/Web.hx class. I've implemented those which make
>>>>>>>>>>> availability to work with GET/POST data. If You wanna try it -
>>>>>>>>>>> look at issue #311 at
>>>>>>>>>>> http://code.google.com/p/haxe/issues/list. But it's still
>>>>>>>>>>> unavailable for example to read and write cookies but I think
>>>>>>>>>>> I'll make this available during May.
>>>>>>>>>>>
>>>>>>>>>>> At second there is a way to run neko as FCGI. Look here:
>>>>>>>>>>> https://github.com/TheHippo/hxfcgi.
>>>>>>>>>>> I tried to run it but unfortunately I had to run neko with
>>>>>>>>>>> lighttpd as soon as possible, so I decided at first to
>>>>>>>>>>> implement methods in Web.hx which make availability to run it
>>>>>>>>>>> in usual CGI mode because I found this way easier. So, I had
>>>>>>>>>>> to defer my thoughts about FCGI to summer, when we'll really
>>>>>>>>>>> need performance. If You are REALLY interested in finishing
>>>>>>>>>>> hxfcgi project - we can contribute both faster, because I'm
>>>>>>>>>>> really interested in it, but I don't need it very soon.
>>>>>>>>>> I started the hxfcgi project a while ago just as a proof of
>>>>>>>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
>>>>>>>>>> finished this project (it is currently in a extra branch, or
>>>>>>>>>> check out the forks of the project). The 2 multipart function
>>>>>>>>>> of the Web API are the only things missing, all other functions
>>>>>>>>>> have been implemented. Feel free to test and to contribute :-)
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> haXe - an open source web programming language
>>>>>>>>>> http://haxe.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> CGI config is very simple.
>>>>>>>> Here it is for lighttpd:
>>>>>>>>
>>>>>>>> 1. Swith cgi module on:
>>>>>>>> server.modules += ( "mod_cgi" )
>>>>>>>> 2. assign filetype:
>>>>>>>> cgi.assign = ( ".n" => "/usr/bin/neko" )
>>>>>>>> 3. patch Web.hx (implement some missing for CGI-mode methods)
>>>>>>>>
>>>>>>>> Unfortunately, I can say nothing about FCGI.
>>>>>>>>
>>>>>>>> --
>>>>>>>> haXe - an open source web programming language
>>>>>>>> http://haxe.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Couldn't You reproduce Your steps to compile and run it in a few
>>>>>> words? As I understood - You run it in a way, similar to running
>>>>>> ruby as fcgi?
>>>>>>
>>>>>> Best regards
>>>>>> Alexander
>>>>>>
>>>>>> --
>>>>>> haXe - an open source web programming language
>>>>>> http://haxe.org
>>>>>
>>>>
>>>> Same result. There's no hxfcgi.ndll after compilation. BTW, I compiled
>>>> in another way: added -D HXCPP_M64 to cpp.hxml and then run
>>>> "haxe cpp.hxml".
>>>>
>>>> Seems like we're compiling not what we have to compile... :-)
>>>>
>>>> Best regards
>>>> Alexander
>>>>
>>>> --
>>>> haXe - an open source web programming language
>>>> http://haxe.org
>>>
>>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

Franco Ponticelli
In reply to this post by KaalH!
I think having a cpp powered cgi/fastcgi implementation is a killer feature for haxe, a php alternative without installing anything on the production server, it's scalable, fast and furious^Wcompatible with all webservers.

I totally agree ... I've thought many times about that but never found the time to implement it, so I am really curious to see what you will come out with.

Franco 


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
In reply to this post by theRemix


cp /usr/lib/haxe/lib/hxcpp/2,07,0/bin/Mac/nekoapi.ndll bin/


$neko test.n 
Called from ? line 1
Called from Test.hx line 16
Called from neko/Web.hx line 259
Called from Test.hx line 21
Called from neko/Web.hx line 138
Uncaught exception - hxfcgi.cpp(15) : invalid kind


hxfcgi.cpp
14. inline hxfcgi::Request* get_request(value hreq) {
15. val_check_kind(hreq,hxRequest);
16. return (hxfcgi::Request*)val_data(hreq);
17. }



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

theRemix
In reply to this post by Niel Drummond-3
On Apr 25, 2011, at 8:21 PM, Niel Drummond wrote:

> On 04/24/11 22:09, theRemix wrote:
>> Hi List,
>>
>> I've been experimenting with tora without any luck, because i don't have apache. And if all else fails, i'll go and install apache since it seems to be the only thing i can find online that should work.
> Hello,
>
> If you don't have any luck with fcgi, there is an open source tora
> server written by a member on IRC 'sality', who is a little slow in
> marketing his efforts, spending most of his time coding the thing. A
> link to an older version is (newer version has AVM scripting and RTMP):
>
> http://lain.thelatticeteam.com/ltapplsrv-dev.tar.gz
>
> I think it's currently used in production by a gambling site, and I've
> tried it out to see if it works (it's very lightweight). Though, if you
> need help, you'll need to get on irc..
>
> - Niel

hey i remember seeing sality on #haXe. i will bug him about it ;)  is he also KaalH! ?

http://lain.thelatticeteam.com/ltapplsrv-dev.tar.gz  is 404

「the.remix」


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

alexander.konotop
In reply to this post by theRemix
В Mon, 25 Apr 2011 10:41:23 -1000
theRemix <[hidden email]> пишет:

> i actually did get an hxfcgi.ndll, here are all the files that went
> in bin when i did make all
>
> $ ls bin/
> hxfcgi.ndll test.fcgi
> nekoapi.ndll test.n
>
>
> when i did $haxe cpp.hxml and $haxe.neko.hxml  i didn't get the
> hxfcgi.ndll either
>
> i still think that it's just my compile flags, or compiler, is
> configured wrong which is why my error is saying, Called from
> neko/Web.hx line 39 Called from neko/Web.hx line 312
> Called from neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load
> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no suitable
> image found.  Did find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll:
> mach-o, but wrong architecture)
>
>
>
> 「the.remix」
>
> On Apr 25, 2011, at 9:04 AM, Alexander Konotop wrote:
>
> > В Mon, 25 Apr 2011 08:14:32 -1000
> > theRemix <[hidden email]> пишет:
> >
> >> sure, i'm not sure if what i'm doing is correct though, this is
> >> what i did.
> >>
> >> git clone https://github.com/TheHippo/hxfcgi.git
> >> cd hxfcgi
> >> make all
> >>
> >> # output
> >> rm -f bin/hxfcgi.ndll
> >> rm -f src/hxfcgi.o src/request.o src/basic.o src/data.o
> >> g++ -Wall -shared -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D
> >> hxcpp -c -o src/hxfcgi.o src/hxfcgi.cpp g++ -Wall -shared
> >> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
> >> src/request.o src/request.cpp g++ -Wall -shared
> >> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o
> >> src/basic.o src/basic.cpp g++ -Wall -shared
> >> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp -c -o src/data.o
> >> src/data.cpp g++ -Wall -shared
> >> -I/usr/lib/haxe/lib/hxcpp/2,07,0/include/ -D hxcpp src/hxfcgi.o
> >> src/request.o src/basic.o src/data.o -o bin/hxfcgi.ndll -lfcgi haxe
> >> neko.hxml nekotools boot bin/test.n mv bin/test bin/test.fcgi #
> >> test neko bin/test.n Called from neko/Web.hx line 39
> >> Called from neko/Web.hx line 312
> >> Called from neko/Lib.hx line 33
> >> Uncaught exception - load.c(232) : Failed to load
> >> library : /Users/remix/Projects/hxfcgi/hxfcgi.ndll
> >> (dlopen(/Users/remix/Projects/hxfcgi/hxfcgi.ndll, 1): image not
> >> found)
> >>
> >>
> >> # lighty configuration
> >>
> >> sudo port install lighttpd
> >>
> >> /opt/local/etc/lighttpd/lighttpd.conf :
> >> server.port = 8008
> >> server.bind = "localhost"
> >> server.document-root = "/Users/remix/Projects/hxfcgi/bin"
> >> static-file.exclude-extensions = ( ".n", ".php", ".pl", ".fcgi",
> >> ".scgi" ) server.modules = ( "mod_access", "mod_cgi" )
> >> cgi.assign                 = ( ".n" => "/usr/bin/neko" )
> >>
> >> # omitted some other default configs
> >>
> >> # started lighty
> >> # testing
> >> wget http://localhost:8008/test.n
> >> --2011-04-25 08:12:06--  http://localhost:8008/test.n
> >> Resolving localhost (localhost)... ::1, fe80::1, 127.0.0.1
> >> Connecting to localhost (localhost)|::1|:8008... connected.
> >> HTTP request sent, awaiting response... 500 Internal Server Error
> >> 2011-04-25 08:12:06 ERROR 500: Internal Server Error.
> >>
> >> # from lighty terminal, where i have it running
> >> Called from neko/Web.hx line 39
> >> Called from neko/Web.hx line 312
> >> Called from neko/Lib.hx line 33
> >> Uncaught exception - load.c(232) : Failed to load
> >> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> >> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
> >> suitable image found.  Did
> >> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
> >> wrong architecture)
> >>
> >>
> >>
> >>
> >> from the looks of the error, "wrong architecture", maybe i did not
> >> compile/configure this correctly. does this give enough details? i
> >> feel like i'm close though.
> >>
> >>
> >> 「the.remix」
> >>
> >> On Apr 25, 2011, at 6:46 AM, Alexander Konotop wrote:
> >>
> >>> В Mon, 25 Apr 2011 06:30:57 -1000
> >>> theRemix <[hidden email]> пишет:
> >>>
> >>>> ok i got a 500 error
> >>>>
> >>>> Called from neko/Web.hx line 39
> >>>> Called from neko/Web.hx line 312
> >>>> Called from neko/Lib.hx line 33
> >>>> Uncaught exception - load.c(232) : Failed to load
> >>>> library : /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll
> >>>> (dlopen(/Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll, 1): no
> >>>> suitable image found.  Did
> >>>> find: /Users/remix/Projects/hxfcgi/bin/hxfcgi.ndll: mach-o, but
> >>>> wrong architecture)
> >>>>
> >>>> i also did MXCPP_M64=true make all
> >>>> with same results
> >>>>
> >>>>
> >>>> i'm on OSX
> >>>> uname -a
> >>>> Darwin Aether.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan
> >>>> 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 gcc
> >>>> -v Using built-in specs.
> >>>> Target: i686-apple-darwin10
> >>>> Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
> >>>> --disable-checking --enable-werror --prefix=/usr
> >>>> --mandir=/share/man --enable-languages=c,objc,c++,obj-c++
> >>>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
> >>>> --with-slibdir=/usr/lib --build=i686-apple-darwin10
> >>>> --program-prefix=i686-apple-darwin10-
> >>>> --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
> >>>> --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc
> >>>> version 4.2.1 (Apple Inc. build 5666) (dot 3)
> >>>>
> >>>>
> >>>> any ideas?
> >>>>
> >>>> On Apr 25, 2011, at 4:44 AM, Alexander Konotop wrote:
> >>>>
> >>>>> В Mon, 25 Apr 2011 04:33:04 -1000
> >>>>> theRemix <[hidden email]> пишет:
> >>>>>
> >>>>>> ok i cloned and compiled the test for hxfcgi
> >>>>>>
> >>>>>> and i'm not exactly clear on how i'm supposed to use it.
> >>>>>>
> >>>>>> mostly, the lighttpd config, can you please share a simple
> >>>>>> cgi/fcgi lighttpd config?
> >>>>>>
> >>>>>> i'm guessing once lighty is configured, i should use the
> >>>>>> neko/Web.hx and neko/Lib.hx then wrap my application same as
> >>>>>> the Test example, and compile (using nekotools boot) into
> >>>>>> a .fcgi file. correct?
> >>>>>>
> >>>>>> just not sure how to deploy it.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> 「the.remix」
> >>>>>>
> >>>>>> On Apr 25, 2011, at 4:02 AM, Philipp Klose wrote:
> >>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On 25.04.2011 11:32, Alexander Konotop wrote:
> >>>>>>>> В Sun, 24 Apr 2011 10:09:38 -1000
> >>>>>>>> theRemix<[hidden email]>  пишет:
> >>>>>>>>
> >>>>>>>>> Hi List,
> >>>>>>>>>
> >>>>>>>>> I've been experimenting with tora without any luck,
> >>>>>>>>> because i don't have apache. And if all else fails, i'll go
> >>>>>>>>> and install apache since it seems to be the only thing i can
> >>>>>>>>> find online that should work.
> >>>>>>>>>
> >>>>>>>>> Anyway, i have nginx, i just installed lighttpd, i
> >>>>>>>>> finally got neko 1.8.1 compiled and running pretty well on
> >>>>>>>>> my gentoo system, it was difficult. i also patched lighty
> >>>>>>>>> with diffs from the old posts from Kaalh
> >>>>>>>>> http://lists.motion-twin.com/pipermail/neko/2008-October/002371.html
> >>>>>>>>> http://lists.motion-twin.com/pipermail/neko/attachments/20081022/94f9a394/lighty_tora-0001.diff
> >>>>>>>>> and that compiled fine, and is installed on my server.
> >>>>>>>>>
> >>>>>>>>> is there a way, fcgi, or other, to use neko/tora
> >>>>>>>>> with nginx/lighttpd ? if so, could someone please help me
> >>>>>>>>> out here with some, even basic, working configuration and
> >>>>>>>>> instructions?
> >>>>>>>>>
> >>>>>>>>> i also saw blackdog's hxnode, nodejs port  and i
> >>>>>>>>> guess before i resort to working with apache, i'll give
> >>>>>>>>> hxnode a shot and maybe make my own http server with it.
> >>>>>>>>>
> >>>>>>>>> also, if you rolled your own neko server somehow,
> >>>>>>>>> please share, i'm very interested.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> so i got really far with lighttpd. a request to a
> >>>>>>>>> neko.n file resulted in a  long unresponsive request
> >>>>>>>>> (nothing was returned) and here's why. i tailed the
> >>>>>>>>> lighttpd error.log and got these, until it finally timed
> >>>>>>>>> out.
> >>>>>>>>>
> >>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>>>>>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336:
> >>>>>>>>> (trace) backlog: all addresses are down, putting /server.n
> >>>>>>>>> (6) into the backlog, retry = 1 mod_proxy_core.c.1495:
> >>>>>>>>> (trace) address 127.0.0.1:6666 refused us, disabling for 2
> >>>>>>>>> sec mod_proxy_core.c.2336: (trace) backlog: all addresses
> >>>>>>>>> are down, putting /server.n (6) into the backlog, retry = 2
> >>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>>>>>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336:
> >>>>>>>>> (trace) backlog: all addresses are down, putting /server.n
> >>>>>>>>> (6) into the backlog, retry = 2 mod_proxy_core.c.1495:
> >>>>>>>>> (trace) address 127.0.0.1:6666 refused us, disabling for 2
> >>>>>>>>> sec mod_proxy_core.c.2336: (trace) backlog: all addresses
> >>>>>>>>> are down, putting /server.n (6) into the backlog, retry = 3
> >>>>>>>>> mod_proxy_core.c.1495: (trace) address 127.0.0.1:6666
> >>>>>>>>> refused us, disabling for 2 sec mod_proxy_core.c.2336:
> >>>>>>>>> (trace) backlog: all addresses are down, putting /server.n
> >>>>>>>>> (6) into the backlog, retry = 4 mod_proxy_core.c.1495:
> >>>>>>>>> (trace) address 127.0.0.1:6666 refused us, disabling for 2
> >>>>>>>>> sec mod_proxy_core.c.2336: (trace) backlog: all addresses
> >>>>>>>>> are down, putting /server.n (6) into the backlog, retry = 5
> >>>>>>>>> mod_proxy_core.c.2342: (trace) connecting backends timed
> >>>>>>>>> out, retry limit reached: 5 mod_proxy_core.c.2308: (trace)
> >>>>>>>>> connecting backends timed out, retry limit reached: 6
> >>>>>>>>>
> >>>>>>>>> i'm not sure what else i have to do to get it to work.
> >>>>>>>>>
> >>>>>>>>> any help would be greatly appreciated, i've been developing
> >>>>>>>>> for a while locally on osx using nekotools server, and it
> >>>>>>>>> works great. i'd really love to use it.
> >>>>>>>>>
> >>>>>>>>> thanks in advance.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> 「the.remix」
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> In December I had the same problem. With the help of people
> >>>>>>>> from maillist I found some information and now I'm
> >>>>>>>> temporarily running neko in CGI mode (not FCGI). But it's
> >>>>>>>> available to use it in FCGI mode also.
> >>>>>>>>
> >>>>>>>> At first there are a lot of unimplemented methods (for CGI)
> >>>>>>>> in neko/Web.hx class. I've implemented those which make
> >>>>>>>> availability to work with GET/POST data. If You wanna try it
> >>>>>>>> - look at issue #311 at
> >>>>>>>> http://code.google.com/p/haxe/issues/list. But it's still
> >>>>>>>> unavailable for example to read and write cookies but I think
> >>>>>>>> I'll make this available during May.
> >>>>>>>>
> >>>>>>>> At second there is a way to run neko as FCGI. Look here:
> >>>>>>>> https://github.com/TheHippo/hxfcgi.
> >>>>>>>> I tried to run it but unfortunately I had to run neko with
> >>>>>>>> lighttpd as soon as possible, so I decided at first to
> >>>>>>>> implement methods in Web.hx which make availability to run it
> >>>>>>>> in usual CGI mode because I found this way easier. So, I had
> >>>>>>>> to defer my thoughts about FCGI to summer, when we'll really
> >>>>>>>> need performance. If You are REALLY interested in finishing
> >>>>>>>> hxfcgi project - we can contribute both faster, because I'm
> >>>>>>>> really interested in it, but I don't need it very soon.
> >>>>>>> I started the hxfcgi project a while ago just as a proof of
> >>>>>>> concept. (It runs as cgi or fcgi!) A while ago someone nearly
> >>>>>>> finished this project (it is currently in a extra branch, or
> >>>>>>> check out the forks of the project). The 2 multipart function
> >>>>>>> of the Web API are the only things missing, all other
> >>>>>>> functions have been implemented. Feel free to test and to
> >>>>>>> contribute :-)
> >>>>>>>
> >>>>>>> --
> >>>>>>> haXe - an open source web programming language
> >>>>>>> http://haxe.org
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> CGI config is very simple.
> >>>>> Here it is for lighttpd:
> >>>>>
> >>>>> 1. Swith cgi module on:
> >>>>> server.modules += ( "mod_cgi" )
> >>>>> 2. assign filetype:
> >>>>> cgi.assign = ( ".n" => "/usr/bin/neko" )
> >>>>> 3. patch Web.hx (implement some missing for CGI-mode methods)
> >>>>>
> >>>>> Unfortunately, I can say nothing about FCGI.
> >>>>>
> >>>>> --
> >>>>> haXe - an open source web programming language
> >>>>> http://haxe.org
> >>>>
> >>>>
> >>>
> >>> Couldn't You reproduce Your steps to compile and run it in a few
> >>> words? As I understood - You run it in a way, similar to running
> >>> ruby as fcgi?
> >>>
> >>> Best regards
> >>> Alexander
> >>>
> >>> --
> >>> haXe - an open source web programming language
> >>> http://haxe.org
> >>
> >
> > Same result. There's no hxfcgi.ndll after compilation. BTW, I
> > compiled in another way: added -D HXCPP_M64 to cpp.hxml and then run
> > "haxe cpp.hxml".
> >
> > Seems like we're compiling not what we have to compile... :-)
> >
> > Best regards
> > Alexander
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>
>

MXCPP_M64=true make all

/usr/bin/ld: src/hxfcgi.o: relocation R_X86_64_32 against `.rodata' can
not be used when making a shared object; recompile with -fPIC

But -fPIC already exists in Makefile...

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: a production ready neko server

KaalH!
In reply to this post by theRemix

Le 26 avr. 2011 à 13:25, theRemix a écrit :

> On Apr 25, 2011, at 8:21 PM, Niel Drummond wrote:
>
>> On 04/24/11 22:09, theRemix wrote:
>>> Hi List,
>>>
>>> I've been experimenting with tora without any luck, because i don't have apache. And if all else fails, i'll go and install apache since it seems to be the only thing i can find online that should work.
>> Hello,
>>
>> If you don't have any luck with fcgi, there is an open source tora
>> server written by a member on IRC 'sality', who is a little slow in
>> marketing his efforts, spending most of his time coding the thing. A
>> link to an older version is (newer version has AVM scripting and RTMP):
>>
>> http://lain.thelatticeteam.com/ltapplsrv-dev.tar.gz
>>
>> I think it's currently used in production by a gambling site, and I've
>> tried it out to see if it works (it's very lightweight). Though, if you
>> need help, you'll need to get on irc..
>>
>> - Niel
>
> hey i remember seeing sality on #haXe. i will bug him about it ;)  is he also KaalH! ?
>

Not this one :)

> http://lain.thelatticeteam.com/ltapplsrv-dev.tar.gz  is 404
>
> 「the.remix」
>
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
12