I can't seem to find any information on how to actually get Thin
working with Swiftiply? I see there is the -y argument for Thin. I
tried it out and seems to start up something.... But Apache (load
balancer) is not able to connect to the ports I specified in my
thin.yml config file. Is there something I'm missing?
> I can't seem to find any information on how to actually get Thin
> working with Swiftiply? I see there is the -y argument for Thin. I
> tried it out and seems to start up something.... But Apache (load
> balancer) is not able to connect to the ports I specified in my
> thin.yml config file. Is there something I'm missing?
Bah, no such luck. I've tried it before and the result is always the
same, my thin servers log "!! Invalid request" over and over.
Swiftiply seems to gobble up the first header. For example, given the
configs:
$ telnet 0 4000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /test/testing HTTP/1.1
Host: testapp
Which causes the thin log to scroll "!! Invalid request" repeatedly.
I've hacked up that part of the code to simply puts the e (exception)
and data (the request that came in from swiftiply) variables to the
log, and it the log then reads:
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp\r\n"
!! Invalid request
repeatedly. It looks like Swiftiply never passes the GET request to
the thin server. You ever see something like this before? Also, please
note that the prefix: and rackup: stuff is from some testing I'm doing
and doesn't affect the behaviour of Swiftiply (it doesn't work
regardless).
I've read there's currently a bug in EventMachine that causes
Swiftiply to crash unexpectedly. The bug is supposedly fixed in
eventmachine 0.11.0 , but that gem isn't out yet. Regardless, I can't
wait until Swiftiply is more mature so I can put it into production.
--George
On Mar 27, 1:31 pm, macournoyer <macourno...@gmail.com> wrote:
> then start swiftiply:
> swiftiply -c /path/to/your/swiftiply/config.yml
> then start your thins:
> thin start -s3 -p5555 -y
> If you wanna put this behind Apache, proxy to the swiftiply cluster
> port (3333 in this case)
> Hope this helps!
> Marc
> On Mar 27, 11:11 am, matt mitchell <goodie...@gmail.com> wrote:
> > Hi,
> > I can't seem to find any information on how to actually get Thin
> > working with Swiftiply? I see there is the -y argument for Thin. I
> > tried it out and seems to start up something.... But Apache (load
> > balancer) is not able to connect to the ports I specified in my
> > thin.yml config file. Is there something I'm missing?
> Bah, no such luck. I've tried it before and the result is always the
> same, my thin servers log "!! Invalid request" over and over.
> Swiftiply seems to gobble up the first header. For example, given the
> configs:
> $ telnet 0 4000
> Trying 0.0.0.0...
> Connected to 0.
> Escape character is '^]'.
> GET /test/testing HTTP/1.1
> Host: testapp
> Which causes the thin log to scroll "!! Invalid request" repeatedly.
> I've hacked up that part of the code to simply puts the e (exception)
> and data (the request that came in from swiftiply) variables to the
> log, and it the log then reads:
> !! Invalid request
> e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> data is "Host: testapp\r\n"
> !! Invalid request
> e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> data is "Host: testapp\r\n"
> !! Invalid request
> e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> data is "Host: testapp\r\n"
> !! Invalid request
> e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> data is "Host: testapp\r\n"
> !! Invalid request
> e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> data is "Host: testapp\r\n"
> !! Invalid request
> repeatedly. It looks like Swiftiply never passes the GET request to
> the thin server. You ever see something like this before? Also, please
> note that the prefix: and rackup: stuff is from some testing I'm doing
> and doesn't affect the behaviour of Swiftiply (it doesn't work
> regardless).
> I've read there's currently a bug in EventMachine that causes
> Swiftiply to crash unexpectedly. The bug is supposedly fixed in
> eventmachine 0.11.0 , but that gem isn't out yet. Regardless, I can't
> wait until Swiftiply is more mature so I can put it into production.
> --George
> On Mar 27, 1:31 pm, macournoyer <macourno...@gmail.com> wrote:
> > hey matt,
> > First you need to install & setup a swiftiply config file:
> > gem install swiftiply
> > then start swiftiply:
> > swiftiply -c /path/to/your/swiftiply/config.yml
> > then start your thins:
> > thin start -s3 -p5555 -y
> > If you wanna put this behind Apache, proxy to the swiftiply cluster
> > port (3333 in this case)
> > Hope this helps!
> > Marc
> > On Mar 27, 11:11 am, matt mitchell <goodie...@gmail.com> wrote:
> > > Hi,
> > > I can't seem to find any information on how to actually get Thin
> > > working with Swiftiply? I see there is the -y argument for Thin. I
> > > tried it out and seems to start up something.... But Apache (load
> > > balancer) is not able to connect to the ports I specified in my
> > > thin.yml config file. Is there something I'm missing?
I'm using swiftiply 0.6.1.1 and thin 0.7.1 . And you're correct - I
was surprised to find that it in fact does work in a browser. I played
around with it some more and found that it responds via cURL requests
as well, but it still doesn't like an interactive telnet request. If I
telnet to the swiftiply port and copy/paste:
GET /test/user/login HTTP/1.1
Host: testapp:4000
Accept: */*
Then it responds properly - however if I type the same thing, it
doesn't, and thin trips out with:
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n"
!! Invalid request
e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n"
I guess I'm used to testing services by telnet-ing to them, however
that doesn't seem to work with Swiftiply. I'm assuming there's some
sort of timeout that occurs while I'm ever so slowly (compared to a
copy/paste) typing my request in. Regardless, I stand corrected and
can confirm that at least through a browser, my Swiftiply and Thin
play together nicely.
I still don't think I'm going to go with Swiftiply in production until
it's more mature, though it looks promising!
--George
On Apr 2, 7:33 pm, macournoyer <macourno...@gmail.com> wrote:
> does it work from a browser, also what version of switiply are you
> using?
> On Apr 2, 6:04 pm, gpop <gpop2...@gmail.com> wrote:
> > Bah, no such luck. I've tried it before and the result is always the
> > same, my thin servers log "!! Invalid request" over and over.
> > Swiftiply seems to gobble up the first header. For example, given the
> > configs:
> > $ telnet 0 4000
> > Trying 0.0.0.0...
> > Connected to 0.
> > Escape character is '^]'.
> > GET /test/testing HTTP/1.1
> > Host: testapp
> > Which causes the thin log to scroll "!! Invalid request" repeatedly.
> > I've hacked up that part of the code to simply puts the e (exception)
> > and data (the request that came in from swiftiply) variables to the
> > log, and it the log then reads:
> > !! Invalid request
> > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> > data is "Host: testapp\r\n"
> > !! Invalid request
> > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> > data is "Host: testapp\r\n"
> > !! Invalid request
> > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> > data is "Host: testapp\r\n"
> > !! Invalid request
> > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> > data is "Host: testapp\r\n"
> > !! Invalid request
> > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.>
> > data is "Host: testapp\r\n"
> > !! Invalid request
> > repeatedly. It looks like Swiftiply never passes the GET request to
> > the thin server. You ever see something like this before? Also, please
> > note that the prefix: and rackup: stuff is from some testing I'm doing
> > and doesn't affect the behaviour of Swiftiply (it doesn't work
> > regardless).
> > I've read there's currently a bug in EventMachine that causes
> > Swiftiply to crash unexpectedly. The bug is supposedly fixed in
> > eventmachine 0.11.0 , but that gem isn't out yet. Regardless, I can't
> > wait until Swiftiply is more mature so I can put it into production.
> > --George
> > On Mar 27, 1:31 pm, macournoyer <macourno...@gmail.com> wrote:
> > > hey matt,
> > > First you need to install & setup a swiftiply config file:
> > > gem install swiftiply
> > > then start your thins:
> > > thin start -s3 -p5555 -y
> > > If you wanna put this behind Apache, proxy to the swiftiply cluster
> > > port (3333 in this case)
> > > Hope this helps!
> > > Marc
> > > On Mar 27, 11:11 am, matt mitchell <goodie...@gmail.com> wrote:
> > > > Hi,
> > > > I can't seem to find any information on how to actually get Thin
> > > > working with Swiftiply? I see there is the -y argument for Thin. I
> > > > tried it out and seems to start up something.... But Apache (load
> > > > balancer) is not able to connect to the ports I specified in my
> > > > thin.yml config file. Is there something I'm missing?
On Thu, Apr 3, 2008 at 10:19 PM, gpop <gpop2...@gmail.com> wrote:
> I'm using swiftiply 0.6.1.1 and thin 0.7.1 . And you're correct - I > was surprised to find that it in fact does work in a browser. I played > around with it some more and found that it responds via cURL requests > as well, but it still doesn't like an interactive telnet request. If I > telnet to the swiftiply port and copy/paste:
> GET /test/user/login HTTP/1.1 > Host: testapp:4000 > Accept: */*
> Then it responds properly - however if I type the same thing, it > doesn't, and thin trips out with:
> !! Invalid request > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n" > !! Invalid request > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n" > !! Invalid request > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > data is "Host: testapp:4000\r\nAccept: */*\r\n\r\n\r\n\r\n"
> I guess I'm used to testing services by telnet-ing to them, however > that doesn't seem to work with Swiftiply. I'm assuming there's some > sort of timeout that occurs while I'm ever so slowly (compared to a > copy/paste) typing my request in. Regardless, I stand corrected and > can confirm that at least through a browser, my Swiftiply and Thin > play together nicely.
> I still don't think I'm going to go with Swiftiply in production until > it's more mature, though it looks promising!
> --George
> On Apr 2, 7:33 pm, macournoyer <macourno...@gmail.com> wrote: > > does it work from a browser, also what version of switiply are you > > using?
> > On Apr 2, 6:04 pm, gpop <gpop2...@gmail.com> wrote:
> > > Bah, no such luck. I've tried it before and the result is always the > > > same, my thin servers log "!! Invalid request" over and over. > > > Swiftiply seems to gobble up the first header. For example, given the > > > configs:
> > > $ telnet 0 4000 > > > Trying 0.0.0.0... > > > Connected to 0. > > > Escape character is '^]'. > > > GET /test/testing HTTP/1.1 > > > Host: testapp
> > > Which causes the thin log to scroll "!! Invalid request" repeatedly. > > > I've hacked up that part of the code to simply puts the e (exception) > > > and data (the request that came in from swiftiply) variables to the > > > log, and it the log then reads:
> > > !! Invalid request > > > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > > > data is "Host: testapp\r\n" > > > !! Invalid request > > > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > > > data is "Host: testapp\r\n" > > > !! Invalid request > > > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > > > data is "Host: testapp\r\n" > > > !! Invalid request > > > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > > > data is "Host: testapp\r\n" > > > !! Invalid request > > > e is #<Thin::InvalidRequest: Invalid HTTP format, parsing fails.> > > > data is "Host: testapp\r\n" > > > !! Invalid request
> > > repeatedly. It looks like Swiftiply never passes the GET request to > > > the thin server. You ever see something like this before? Also, please > > > note that the prefix: and rackup: stuff is from some testing I'm doing > > > and doesn't affect the behaviour of Swiftiply (it doesn't work > > > regardless).
> > > I've read there's currently a bug in EventMachine that causes > > > Swiftiply to crash unexpectedly. The bug is supposedly fixed in > > > eventmachine 0.11.0 , but that gem isn't out yet. Regardless, I can't > > > wait until Swiftiply is more mature so I can put it into production.
> > > --George
> > > On Mar 27, 1:31 pm, macournoyer <macourno...@gmail.com> wrote:
> > > > hey matt,
> > > > First you need to install & setup a swiftiply config file: > > > > gem install swiftiply
> > > > then start your thins: > > > > thin start -s3 -p5555 -y
> > > > If you wanna put this behind Apache, proxy to the swiftiply cluster > > > > port (3333 in this case)
> > > > Hope this helps! > > > > Marc
> > > > On Mar 27, 11:11 am, matt mitchell <goodie...@gmail.com> wrote:
> > > > > Hi,
> > > > > I can't seem to find any information on how to actually get Thin > > > > > working with Swiftiply? I see there is the -y argument for Thin. I > > > > > tried it out and seems to start up something.... But Apache (load > > > > > balancer) is not able to connect to the ports I specified in my > > > > > thin.yml config file. Is there something I'm missing?
<reza.primardians...@gmail.com> wrote:
> Can it because of the CRLF separator ? Do you type it from windows ? I
> suspect Thin expects \n but you gave it \r\n
> Nope, it must be converted internally - did this on an Ubuntu Gutsy > box. I honestly wouldn't bother using Windows for any of this stuff.
I to thought it might be a CRLF issue with telnet. I hacked out a quick ruby direct socket server and confirmed that telnet (at least on OS X) actually sends CRLF, not just LF as I had _always_ assumed.
Does Thin expect LF? Browsers all, to my knowledge, send CRLF. HTTP specs require CRLF to separate headers[1]. Apparently at least some telnet clients send CRLF. I poked briefly at the Swiftiply source and it seems to use CRLF.
> > Nope, it must be converted internally - did this on an Ubuntu Gutsy
> > box. I honestly wouldn't bother using Windows for any of this stuff.
> I to thought it might be a CRLF issue with telnet. I hacked out a
> quick ruby direct socket server and confirmed that telnet (at least on
> OS X) actually sends CRLF, not just LF as I had _always_ assumed.
> Does Thin expect LF? Browsers all, to my knowledge, send CRLF. HTTP
> specs require CRLF to separate headers[1]. Apparently at least some
> telnet clients send CRLF. I poked briefly at the Swiftiply source and
> it seems to use CRLF.
I'm also getting the Invalid Request problem. a gazillion of them in
thin.x.log. Eventually, thin doesn't accept any request (the
processes are still up).
Is there a fix for that?
On Apr 2, 6:04 pm, gpop <gpop2...@gmail.com> wrote:
> Bah, no such luck. I've tried it before and the result is always the
> same, my thin servers log "!!Invalidrequest" over and over.
> Swiftiply seems to gobble up the first header. For example, given the
> configs: