Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

`bin/nitrogen console` errors with `rel_yaws` #43

Closed
Inaimathi opened this Issue · 3 comments

2 participants

@Inaimathi

Running Debian Wheezy with the latest pull from this github repo.

  1. use make rel_yaws to install (no errors)
  2. cd rel/nitrogen
  3. use bin/nitrogen console to start the server (prints some INFO messages, starts listening on 127.0.0.1:8000)
  4. visit http://localhost:8000 with a browser

Expected: the default demo app page with "Hello..." message and simple button postback.

Result: The browser displays

  Internal error, yaws code crashed

  ERROR erlang  code  crashed:
   File: appmod:0
  Reason: {{badrecord,headers},
           [{nitrogen_yaws,out,1,[{file,"src/nitrogen_yaws.erl"},{line,5}]},
            {yaws_server,deliver_dyn_part,8,
                         [{file,"src/yaws_server.erl"},{line,2652}]},
            {yaws_server,aloop,3,[{file,"src/yaws_server.erl"},{line,1167}]},
            {yaws_server,acceptor0,2,[{file,"src/yaws_server.erl"},{line,1025}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
  Req: {http_request,'GET',{abs_path,"/"},{1,1}}
  Stack: [{nitrogen_yaws,out,1,[{file,"src/nitrogen_yaws.erl"},{line,5}]},
          {yaws_server,deliver_dyn_part,8,
                       [{file,"src/yaws_server.erl"},{line,2652}]},
          {yaws_server,aloop,3,[{file,"src/yaws_server.erl"},{line,1167}]},
          {yaws_server,acceptor0,2,[{file,"src/yaws_server.erl"},{line,1025}]},
          {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]

The console provides the following error reports

  =ERROR REPORT==== 28-Apr-2012::17:44:53 ===
  Error in simple_bridge_request:make/2 - error - {badrecord,headers}
  [{yaws_request_bridge,headers,1,
       [{file,"src/yaws_bridge_modules/yaws_request_bridge.erl"},{line,44}]},
   {simple_bridge_request_wrapper,header,2,
       [{file,"src/simple_bridge_request_wrapper.erl"},{line,29}]},
   {simple_bridge_multipart,is_multipart_request,1,
       [{file,"src/simple_bridge_multipart.erl"},{line,55}]},
   {simple_bridge_multipart,parse,1,
       [{file,"src/simple_bridge_multipart.erl"},{line,49}]},
   {simple_bridge_request,make_nocatch,2,
       [{file,"src/simple_bridge_request.erl"},{line,23}]},
   {simple_bridge_request,make,2,
       [{file,"src/simple_bridge_request.erl"},{line,14}]},
   {nitrogen_yaws,out,1,[{file,"src/nitrogen_yaws.erl"},{line,5}]},
   {yaws_server,deliver_dyn_part,8,[{file,"src/yaws_server.erl"},{line,2652}]}]
  =ERROR REPORT==== 28-Apr-2012::17:44:53 ===
  Error in simple_bridge_request:make/2 - error - {badrecord,headers}
  [{yaws_request_bridge,headers,1,
       [{file,"src/yaws_bridge_modules/yaws_request_bridge.erl"},{line,44}]},
   {simple_bridge_request_wrapper,header,2,
       [{file,"src/simple_bridge_request_wrapper.erl"},{line,29}]},
   {simple_bridge_multipart,is_multipart_request,1,
       [{file,"src/simple_bridge_multipart.erl"},{line,55}]},
   {simple_bridge_multipart,parse,1,
       [{file,"src/simple_bridge_multipart.erl"},{line,49}]},
   {simple_bridge_request,make_nocatch,2,
       [{file,"src/simple_bridge_request.erl"},{line,23}]},
   {simple_bridge_request,make,2,
       [{file,"src/simple_bridge_request.erl"},{line,14}]},
   {nitrogen_yaws,out,1,[{file,"src/nitrogen_yaws.erl"},{line,5}]},
   {yaws_server,deliver_dyn_part,8,[{file,"src/yaws_server.erl"},{line,2652}]}]
@choptastic
Owner

I just did a quick pull from my repo to fix some of these yaws issues.

Here's my advice, clear out your deps/ directory, and then recompile. This should download the latest simple_bridge which should be fixing the yaws issues.

Let me know.

@Inaimathi

That did it. From the root nitrogen directory:

  rm -rf deps/*
  make rel_yaws
  cd rel/nitrogen
  bin/nitrogen console

It starts listening on local port 8000, and displays the page as expected. Postback works too :)

@choptastic
Owner
@choptastic choptastic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.