ErlyWeb 0.7 - strange crash

8 views
Skip to first unread message

Dmitrii 'Mamut' Dimandt

unread,
Dec 28, 2007, 9:03:20 AM12/28/07
to erl...@googlegroups.com
I've not given up on ErlyWeb yet :)

yaws.conf:
<server localhost>
    port = 81
    listen = 0.0.0.0
    docroot = /home/dmitriid/data/www/erlyweb
    dir_listings = true
    appmods = </, erlyweb>
    <opaque>
        appname = buktu
    </opaque>
</server>


Then:
erlyweb:create_app("buktu", "/home/dmitriid/data/www/erlyweb").
> all ok.
Then:
erlyweb:compile("/home/dmitriid/data/www/erlyweb/buktu", [{auto_compile, true}]).
> all ok.


Then navigate to http://localhost:81/ and:
Internal error, yaws code crashed

ERROR erlang  code  crashed:
File: appmod:0
Reason: {{badrecord,arg},
         [{yaws_arg,opaque,1},
          {erlyweb,get_app_name,1},
          {erlyweb,out,1},
          {yaws_server,deliver_dyn_part,8},
          {yaws_server,aloop,3},
          {yaws_server,acceptor0,2},
          {proc_lib,init_p,5}]}
Req: {http_request,'GET',{abs_path,"/"},{1,1}}


Once again I'm lost :)

Kevin A. Smith

unread,
Dec 28, 2007, 9:14:26 AM12/28/07
to erl...@googlegroups.com
Is this a case of yaws changing its record format again? I know that
this has been a problem in the past.

--Kevin

Dmitrii 'Mamut' Dimandt

unread,
Dec 28, 2007, 9:56:44 AM12/28/07
to erl...@googlegroups.com
I totally forgot to mention that I see this behaviour on
Ubuntu 7.10
Yaws 1.68-3ubuntu1

Yariv Sadan

unread,
Dec 28, 2007, 12:45:02 PM12/28/07
to erl...@googlegroups.com
Ugh, you must be using a different version of Yaws than the one I
compiled against. I compiled against 1.73. You can either recompile
ErlyWeb yourself against your Yaws installation or upgrade Yaws.

Dmitrii 'Mamut' Dimandt

unread,
Dec 29, 2007, 5:45:38 AM12/29/07
to erl...@googlegroups.com
Yariv Sadan wrote:
Ugh, you must be using a different version of Yaws than the one I
compiled against. I compiled against 1.73. You can either recompile
ErlyWeb yourself against your Yaws installation or upgrade Yaws.

  
I went the easy (?) way and installed yaws 1.73. Argh! I must be stupid or something:

<server dmitriid>

        port = 81
        listen = 0.0.0.0
        docroot = /home/dmitriid/data/www/erlyweb/buktu/www/

        appmods = </, erlyweb>
        <opaque>
            appname = buktu
        </opaque>
</server>

When I navigate to http://localhost:81/ I get:
ERROR erlang  code  crashed:
 File: appmod:0
Reason: {no_application_data,"Did you forget to call erlyweb:compile(AppDir)
or add the app's previously compiled .beam files to the Erlang code path?"}

Req: {http_request,'GET',{abs_path,"/"},{1,1}}

Even though I did compile it:
> erlyweb:compile("/home/dmitriid/data/www/erlyweb/buktu", [{auto_compile, true}]).
debug:erlyweb_compile:382: Compiling Erlang file "buktu_app_controller"
debug:erlyweb_compile:377: Compiling ErlTL file "html_container_view"
debug:erlyweb_compile:382: Compiling Erlang file "html_container_controller"
{ok,{{2007,12,29},{12,33,47}}}

However, if I change the appmod in yaws.conf to
appmods = </buktu, erlyweb>
and navigate to http://localhost:81/, I get erlyweb's welcome screen. Now, if I create a, say, view_controller.erl and try to navigate to http://localhost:81/view, I get a 404 Not Found error. If I navigate to http://localhost:81/buktu/view, I get a "no-application_data" error (same as above).

:(

andrewfromfly

unread,
Dec 29, 2007, 5:20:12 PM12/29/07
to erlyweb
"and navigate to http://localhost:81/, I get erlyweb's welcome screen.
"

you get that because the docroot is www and there is an index.html
file in there. It's just straight up yaws webserver, No Erlyweb is
being called.

Dmitrii Dimandt

unread,
Dec 30, 2007, 8:22:42 AM12/30/07
to erl...@googlegroups.com
It's like "doh, should've guessed myself" :)))))))) Must be the New Year's Eve closing in on me :)

Then I still don't understand why ErlyWeb crashes, because everything is ready and set up (or so it seems)

Reply all
Reply to author
Forward
0 new messages