Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238963 - www-apache/mod_caucho + www-servers/resin-3.{0,1}.* does not dispatch requests to resin
Summary: www-apache/mod_caucho + www-servers/resin-3.{0,1}.* does not dispatch request...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-28 17:56 UTC by Alexander Hoogerhuis
Modified: 2009-03-21 22:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Hoogerhuis 2008-09-28 17:56:54 UTC
I've tested mod_caucho (and matching www-servers/resin) with versions 3.0.2[456], and 3.1.[567] and using the recommended config it seems to be dead as a dodo, not dispatching requests in apache to resin. tcpdump on resin server (when seperated onto two servers shows no traffic to port 6800).

Reproducible: Always

Steps to Reproduce:
1. On server A: emerge resin, modify /etc/resin/resin.conf to listen to eth0's IP
2. On server B: emerge apache mod_caucho, modify /etc/apache2/modules.d/88_mod_caucho.conf to load module and "ResinConfigServer server-a-ip 6800".
3. Aim client at http://serverb/index.jsp

Actual Results:  
Serving apaches dirindex or 404, dpeending on config, request not passed into mod_caucho

Expected Results:  
Seeing resin's default home page, not apache's local file system

- I have created a server C, running CentOS 5 (apache 2.2 also), installed mod_caucho on that server and aimed it at server A's port 6800 and it serves resin's home page just fine, config's are identlical wrt to mod_caucho
- tcpdump of eth0 on server A (resin app server) show's 0 (NILL) packets from server B, normal traffic from server C (CentOS).

- Server A, B and C are available for login for debugging.
Comment 1 Alexander Hoogerhuis 2008-09-28 20:39:06 UTC
Further digging from the logs and compiøing the module with --enable-debug shows that resin_config_server_command() is not called when parsing the config files. Here's my relevant config:

ServerName      servera.somewhere.com
DirectoryIndex  index.jsp

ResinConfigServer servera.somewhere.com 6800
CauchoConfigCacheDirectory /tmp
CauchoStatus yes

resin-3.1.6/modules/c/src/apache2/mod_caucho.c with patched with this:

--- mod_caucho.c        2008-09-28 22:27:14.000000000 +0200
+++ mod_caucho.c.dist   2008-09-28 22:05:11.000000000 +0200
@@ -74,7 +74,7 @@
   int pid;
   FILE *file;

-  file = fopen("/tmp/mod_caucho.log", "a");
+  file = fopen("/tmp/mod_caucho.log", "w+");

   pid = (int) getpid();

@@ -295,13 +295,9 @@
   config_t *config = pconfig; /* cse_get_server_config(cmd->server); */
   int port = port_arg ? atoi(port_arg) : DEFAULT_PORT;

-  LOG(("%s:%d:resin_config_server_command(): entry\n", __FILE__, __LINE__,));
-
   if (! config)
     return 0;

-  LOG(("%s:%d:resin_config_server_command(): has config\n", __FILE__, __LINE__,));
-
   config->has_config = 1;

   /*


shows that this function is never called. Exactly same source on CentOS 5 gives /tmp/mod_caucho.log containing:

[09/Sep/2008:00:32:16 +0200] 15727_-1208522992: mod_caucho.c:298:resin_config_server_command(): entry
[09/Sep/2008:00:32:16 +0200] 15727_-1208522992: mod_caucho.c:303:resin_config_server_command(): has config

I.e. it parses the file.

-A
Comment 2 Alexander Hoogerhuis 2008-09-28 20:42:25 UTC
Bah, the patch is backwrds, apply with --reverse or just add the few lines by hand.

-A
Comment 3 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-01-08 22:23:27 UTC
Looks like Apache configuration problem. Could you try using ResinHost ?
Comment 4 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-02-22 13:41:24 UTC
No reporter action for over a month.
Comment 5 Alexander Hoogerhuis 2009-02-22 13:42:52 UTC
Same results with ResinHost.

-A
Comment 6 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-02-22 13:49:02 UTC
Could you please attach complete mod_caucho config file & VHost definition where you use SetHandler caucho-request