Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cowboy_protocol error #54

Closed
gerep opened this issue Dec 2, 2015 · 10 comments
Closed

cowboy_protocol error #54

gerep opened this issue Dec 2, 2015 · 10 comments

Comments

@gerep
Copy link

gerep commented Dec 2, 2015

I just checked my logs, Poxa is running and working but I see this often, what is it telling me? 😄

02:14:33.906 [error] Error in process #PID<0.1599.1> on node :"poxa@127.0.0.1" with exit value:
{:function_clause,
 [{:cowboy_protocol, :parse_method,
   ["",
    {:state, #Port<0.35795>, :ranch_tcp, [:cowboy_router, :cowboy_handler],
     false,
     [listener: :http,
      dispatch: [{:_, [],
        [{["ping"], [], Poxa.PingHandler, []},
         {["console"], [], Poxa.Console.WSHandler, []},
         {[], [], :cowboy_static, {:priv_file, :poxa, 'index.html'}},
         {["static", :...], [], :cowboy_static, {:priv_dir, :poxa, 'static'}},
         {["apps", :app_id, "events"], [], Poxa.EventHandler, []},
         {["apps", :app_id, "channels"], [], Poxa.ChannelsHandler, []},
         {["apps", :app_id, "channels", :channel_name], [],
          Poxa.ChannelsHandler, []},
         {["apps", :app_id, "channels", :channel_name, "users"], [],
          Poxa.UsersHandler, []},
         {["app", :app_key], [], Poxa.WebsocketHandler, []}]}]], :undefined,
     :undefined, 5, 1, 100, 4096, 64, 4096, 100, 5000, 1448936078905},
    <<1, 100, 101, 102, 97, 117, 108, 116, 10>>],
   [file: 'src/cowboy_protocol.erl', line: 168]}]}


02:14:33.907 [error] Ranch listener :http had connection process started with :cowboy_protocol:start_link/4 at #PID<0.1599.
1> exit with reason: {:function_clause, [{:cowboy_protocol, :parse_method, ["", {:state, #Port<0.35795>, :ranch_tcp, [:cowb
oy_router, :cowboy_handler], false, [listener: :http, dispatch: [{:_, [], [{["ping"], [], Poxa.PingHandler, []}, {["console
"], [], Poxa.Console.WSHandler, []}, {[], [], :cowboy_static, {:priv_file, :poxa, 'index.html'}}, {["static", :...], [], :c
owboy_static, {:priv_dir, :poxa, 'static'}}, {["apps", :app_id, "events"], [], Poxa.EventHandler, []}, {["apps", :app_id, "
channels"], [], Poxa.ChannelsHandler, []}, {["apps", :app_id, "channels", :channel_name], [], Poxa.ChannelsHandler, []}, {[
"apps", :app_id, "channels", :channel_name, "users"], [], Poxa.UsersHandler, []}, {["app", :app_key], [], Poxa.WebsocketHan
dler, []}]}]], :undefined, :undefined, 5, 1, 100, 4096, 64, 4096, 100, 5000, 1448936078905}, <<1, 100, 101, 102, 97, 117, 1
08, 116, 10>>], [file: 'src/cowboy_protocol.erl', line: 168]}]}
@edgurgel
Copy link
Owner

edgurgel commented Dec 3, 2015

Thanks for opening the issue. I will take a look soon! :)

@edgurgel
Copy link
Owner

edgurgel commented Dec 5, 2015

Well I'm keen to update cowboy/ranch so we can check if this may fix this weird error.

@daande
Copy link

daande commented Dec 13, 2015

I am seeing something similar.

19:08:04.750 [error] Process #PID<0.288.0> raised an exception
** (FunctionClauseError) no function clause matching in :cowboy_protocol.parse_method/3
    (cowboy) src/cowboy_protocol.erl:168: :cowboy_protocol.parse_method("", {:state, #Port<0.6010>, :ranch_tcp, [:cowboy_router, :cowboy_handler], false, [listener: :http, dispatch: [{:_, [], [{["ping"], [], Poxa.PingHandler, []}, {["console"], [], Poxa.Console.WSHandler, []}, {[], [], :cowboy_static, {:priv_file, :poxa, 'index.html'}}, {["static", :...], [], :cowboy_static, {:priv_dir, :poxa, 'static'}}, {["apps", :app_id, "events"], [], Poxa.EventHandler, []}, {["apps", :app_id, "channels"], [], Poxa.ChannelsHandler, []}, {["apps", :app_id, "channels", :channel_name], [], Poxa.ChannelsHandler, []}, {["apps", :app_id, "channels", :channel_name, "users"], [], Poxa.UsersHandler, []}, {["app", :app_key], [], Poxa.WebsocketHandler, []}]}]], :undefined, :undefined, 5, 1, 100, 4096, 64, 4096, 100, 5000, 1450033689749}, <<22, 3, 1, 0, 155, 1, 0, 0, 151, 3, 1, 175, 119, 45, 240, 251, 205, 85, 128, 119, 147, 7, 23, 35, 75, 27, 155, 143, 63, 233, 48, 133, 220, 87, 186, 33, 60, 254, 68, 61, 139, 128, 57, 0, 0, 28, 192, 10, 192, 20, ...>>)

19:08:04.753 [error] Ranch listener :http had connection process started with :cowboy_protocol:start_link/4 at #PID<0.288.0> exit with reason: {:function_clause, [{:cowboy_protocol, :parse_method, ["", {:state, #Port<0.6010>, :ranch_tcp, [:cowboy_router, :cowboy_handler], false, [listener: :http, dispatch: [{:_, [], [{["ping"], [], Poxa.PingHandler, []}, {["console"], [], Poxa.Console.WSHandler, []}, {[], [], :cowboy_static, {:priv_file, :poxa, 'index.html'}}, {["static", :...], [], :cowboy_static, {:priv_dir, :poxa, 'static'}}, {["apps", :app_id, "events"], [], Poxa.EventHandler, []}, {["apps", :app_id, "channels"], [], Poxa.ChannelsHandler, []}, {["apps", :app_id, "channels", :channel_name], [], Poxa.ChannelsHandler, []}, {["apps", :app_id, "channels", :channel_name, "users"], [], Poxa.UsersHandler, []}, {["app", :app_key], [], Poxa.WebsocketHandler, []}]}]], :undefined, :undefined, 5, 1, 100, 4096, 64, 4096, 100, 5000, 1450033689749}, <<22, 3, 1, 0, 155, 1, 0, 0, 151, 3, 1, 175, 119, 45, 240, 251, 205, 85, 128, 119, 147, 7, 23, 35, 75, 27, 155, 143, 63, 233, 48, 133, 220, 87, 186, 33, 60, 254, 68, 61, 139, 128, 57, 0, ...>>], [file: 'src/cowboy_protocol.erl', line: 168]}]}

@edgurgel
Copy link
Owner

It feels like a faulty client that is sending an HTTP method that is not correctly parsed. I plan to update cowboy and ranch so we can see if this was some bug with our http server. I will release a new version with it soon!

@daande
Copy link

daande commented Dec 14, 2015

Okay thank you!

On Dec 13, 2015, at 7:30 PM, Eduardo Gurgel notifications@github.com wrote:

It feels like a faulty client that is sending an HTTP method that is not correctly parsed. I plan to update cowboy and ranch so we can see if this was some bug with our http server. I will release a new version with it soon!


Reply to this email directly or view it on GitHub.

@edgurgel
Copy link
Owner

Probably related: ninenines/cowboy#448

@edgurgel
Copy link
Owner

I'm afraid this is just a faulty client that does not send proper HTTP request, but I just released Poxa 0.5.0 updating cowboy and ranch. https://github.com/edgurgel/poxa/releases/tag/v0.5.0

It's something!

@Dian8
Copy link

Dian8 commented Jun 19, 2018

Similar cowboy_protocol error with poxa from docker image
edgurgel/poxa-automated:latest and pusher/pusher-php-server 3.0.4

@ilijastuden
Copy link

Similar error. Our logs are full of it.

Is there any way to track back this error message to the request that's casuing it? Anything that we could use to debug?

@edgurgel edgurgel reopened this Sep 13, 2018
@edgurgel
Copy link
Owner

Cowboy got upgrade. The next version should have fixed a lot of issues. Feel free to reopen if it's still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants