On request to Apache, mod_webkit [in mod_webkit.c/wksock_open()] complains:
   "Can not open socket connection to WebKit AppServer"
and [in mod_webkit.c/webkit_handler()]:
   "Couldn't connect to AppServer, attempt 1 or 10, sleeping 1 second(s)"
and after another 9 rounds of that with a final 
   "...-- giving up"

Normal-ish configurations, specifically in httpd.conf: 
       <Location /AB>
           WKServer localhost 9999
           SetHandler webkit-handler
       </Location>

The problem:
   apr_sockaddr_info_get() for 'localhost' creates an IPv6 socket on
[::1]:9999

Config: WebWare 0.8.1, mod_webkit2, Apache 2.0.48, on SuSE 8.1 (2.4.19) It's
an IPv4/v6 transition host; the DNS returns no IPv6 info, but the IFs
support v6. I operate no encapsulated IPv6, no IPv4-mapped v6, but do
operate v6--v6 services.

The easy fix:
   Don't use "localhost" in httpd.conf; substitute 127.0.0.1 (or your
defined loopback).
   (And for some configurations, could require a similar modification of the

    default in [mod_webkit.c/webkit_create_dir_config()]. )

The better fix (for my environment):
   To the calls to apr_sockaddr_info_get(), add APR_IPV4_ADDR_OK


My patch:
103c103
<     err = apr_sockaddr_info_get(&apraddr,
(char*)apr_pstrdup(cmd->server->process->pool, cfg->host), APR_UNSPEC,
cfg->port, 0, cmd->server->process->pool);
---
>     err = apr_sockaddr_info_get(&apraddr, 
> (char*)apr_pstrdup(cmd->server->process->pool, cfg->host), APR_UNSPEC,
cfg->port, APR_IPV4_ADDR_OK, cmd->server->process->pool);
179c179
<     rv=apr_sockaddr_info_get(&apraddr, cfg->host,APR_UNSPEC, cfg->port, 0,
p);
---
>     rv=apr_sockaddr_info_get(&apraddr, cfg->host,APR_UNSPEC, 
> cfg->port, APR_IPV4_ADDR_OK, p);

A further suggestion, if I may: Given the variety of challenges upcoming in
this area, might it be appropriate to fortify the error messages related to
these failures? For instance in mod_webkit and in ThreadedAppServer? E.g.,
with apr_sockaddr_t information? 

Thanks for a promising tool.

Best,
--Nick



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to