small medium large xlarge

Back to: All Forums  Other Stuff
Generic-user-small
21 Nov 2014, 08:57
Yuthear THY (1 post)

I’m a new for erlang and when execute the web_server:start_link(9999) and then it generates the errors as the following:

** exception exit: undef in function mochiweb_http:start/1 called as mochiweb_http:start([{port,9999}, {loop,#Fun}]) in call from web_server:init/1 (web_server.erl, line 19) in call from gen_server:init_it/6 (gen_server.erl, line 306) in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 237) 10> global:registered_name(). ** exception error: undefined function global:registered_name/0 11> global:registered_names().


The code I downloaded from pragprog.com/screencasts/v-kserl/source_code and I use the code in section: Episode 7: Writing Servers with gen_server. Locally, it works properly by running: 1) message_router:start_link(). 2) mucc:start_link() 3) web_server:start_link(9999). But when I deployed it to Amazon EC2, it doesn’t work with 3) web_server:start_link(9999) and generates error: ** exception exit: undef in function mochiweb_http:start/1 called as mochiweb_http:start([{port,9999}, {loop,#Fun}]) in call from web_server:init/1 (web_server.erl, line 19)…

You must be logged in to comment