[erlang-questions] error msg in http:request

caox caox@REDACTED
Wed Mar 31 11:27:14 CEST 2010


The request URL was indeed invalid, as I referred. But I am just  
wondering whether a common request failure should cause a server  
process to shutdown.

在 2010-3-31,下午5:19, Gleb Peregud 写道:

> I don't think it is a bug. Looks like it is trying to connect to  
> 127.0.0.1:3002 but TCP connection is being refused by a server. Try  
> running `nmap -p 3002 127.0.0.1` and check if the port is indeed open.
>
> On Wed, Mar 31, 2010 at 09:25, caox <caox@REDACTED> wrote:
> After updated erlang version to R13B04, I found unexpected error  
> messages prompted when using http:request to call an invalid URL. Is  
> this reasonable?
>
>  (ewp@REDACTED)1> Url="http://127.0.0.1:3002/mobilebank/srvStatus.jsp".
> "http://127.0.0.1:3002/mobilebank/srvStatus.jsp"
> (ewp@REDACTED)2> http:request(Url).
> {error,{error,{connect_failed,{#Ref<0.0.0.271>,
>                               {error,econnrefused}}}}}
> (ewp@REDACTED)3>
> =ERROR REPORT==== 31-Mar-2010::14:39:49 ===
> ** Generic server <0.103.0> terminating
> ** Last message in was {connect_and_send,
>                           {request,#Ref<0.0.0.271>,<0.44.0>,0,http,
>                               {"127.0.0.1",3002},
>                               "/mobilebank/srvStatus.jsp",[],get,
>                               {http_request_h,undefined,"keep-alive",
>                                    
> undefined,undefined,undefined,undefined,
>                                    
> undefined,undefined,undefined,undefined,
>                                    
> undefined,undefined,undefined,undefined,
>                                    
> undefined,undefined,"127.0.0.1:3002",
>                                    
> undefined,undefined,undefined,undefined,
>                                    
> undefined,undefined,undefined,undefined,
>                                   undefined, 
> [],undefined,undefined,undefined,
>                                   undefined,"0",undefined,undefined,
>                                    
> undefined,undefined,undefined,undefined,[]},
>                               {[],[]},
>                               {http_options,"HTTP/1.1",infinity,true, 
> [],
>                                   undefined,false,infinity},
> "http://127.0.0.1:3002/mobilebank/srvStatus.jsp",
>                               [],none,[], 
> 1270017589276,undefined,undefined}}
> ** When Server state == {state,
>                            {request,#Ref<0.0.0.271>,<0.44.0>,0,http,
>                                {"127.0.0.1",3002},
>                                "/mobilebank/srvStatus.jsp",[],get,
>                                {http_request_h,undefined,"keep-alive",
>                                     
> undefined,undefined,undefined,undefined,
>                                     
> undefined,undefined,undefined,undefined,
>                                     
> undefined,undefined,undefined,undefined,
>                                     
> undefined,undefined,"127.0.0.1:3002",
>                                     
> undefined,undefined,undefined,undefined,
>                                     
> undefined,undefined,undefined,undefined,
>                                    undefined,[],undefined,undefined,
>                                    undefined,undefined,"0",undefined,
>                                     
> undefined,undefined,undefined,undefined,
>                                    undefined,[]},
>                                {[],[]},
>                                {http_options,"HTTP/ 
> 1.1",infinity,true,[],
>                                    undefined,false,infinity},
> "http://127.0.0.1:3002/mobilebank/srvStatus.jsp",
>                                [],none,[], 
> 1270017589276,undefined,undefined},
>                             
> undefined,undefined,undefined,undefined,undefined,
>                            {[],[]},
>                            {[],[]},
>                            undefined,[],nolimit,nolimit,
>                            {options,
>                                {undefined,[]},
>                                 
> 0,2,5,120000,2,disabled,false,inet,default,
>                                default,[]},
>                            {timers,[],undefined},
>                            httpc_manager,undefined}
> ** Reason for termination ==
> ** {error,{connect_failed,{#Ref<0.0.0.271>,{error,econnrefused}}}}
>
> =ERROR REPORT==== 31-Mar-2010::14:39:49 ===
> HTTPC-MANAGER<httpc_manager> handler (<0.103.0>, started) failed to  
> connect and/or send request #Ref<0.0.0.271>
>   Result: {error,{connect_failed,{#Ref<0.0.0.271>, 
> {error,econnrefused}}}}
>
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>



More information about the erlang-questions mailing list