Re: tomcat and apache problem

2010-03-23 Thread ani
Hi,

   Go through this post 
http://blog.findasolution.in/2010/03/apache-tomcat-connectorintegrate-apache-with-tomcat/
hope this will help you.

On Feb 21, 6:10 am, dablack david.blackwell...@gmail.com wrote:
 I borrowed that connector configuration from a website I came across.
 I'm not sure why port=0 either. If I put more research into the NIO
 connector I could probably find out. Why don't you try adding the
 lines,

 enableLookups=false
 scheme=http

 to the NIO connector configuration in the server.xml file that I gave
 you earlier.

 As far as accessing the ajp service usinghttp://localhost:8009/servlet,
 that will not work. Your browser uses the http protocol and the 8009
 port is being serviced by the ajp protocol. You should still have your
 connector using the http protocol configured to listen on port 8081.

 Hopefully the scheme line above will help the NIO connector
 communicate back to Apache.

 On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote: I test your config, 
 dablack, but I cant connect to the servlet.
  With this config I cant access not even to:http://localhost:8009/servlet
  that is tomcat directly without apache

  On 20 feb, 23:36, Fran fra...@gmail.com wrote:

   I cant undestand why this config:

   Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
   channelNioSocket.maxThreads=
   150
     channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
     channelNioSocket.bufferSize=16384 /

   Why port 0 ?

   2010/2/20 dablack david.blackwell...@gmail.com

Fran,

I'm really not an expert on setting up the connection between Apache
and Tomcat but I believe that the connections only operate in two
protocols: http or ajp. NIO is a Tomcat connector that can communicate
in either http or ajp. Because of that, I don't see any reason that
the Apache mod_jk connector module couldn't communicate with the NIO
connector. Since I don't use an NIO connector I could be wrong, but
that is the way I see it. As a starting point, try these
configurations:

server.xml

Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /

(You seem to want to use port 8081 which should be fine, but the
standard ajp port is 8009. However, I wouldn't put it on port 8081 if
you are already using that port for another protocol such as http.)

httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.svc ajp13

(For the JkMount I use *.svc because I use the svc extension for my
GWT service target to differentiate service points from other files.)

(For example, in my web.xml file I will map my service something like
this to use the svc extension:
servlet
  servlet-nameMyService/servlet-name
  servlet-classcom.mysite.server.MyServiceImpl/servlet-class
/servlet
servlet-mapping
  servlet-nameMyService/servlet-name
  url-pattern/MyService.svc/usr-pattern
/servlet-mapping

And in my GWT code I create my service target like this:

target.setServiceEntryPoint( GWT.getModuleBaseURL() +
MyService.svc );

I did this because I had troubles with the 'JkMount /* ajp13' entry,
but when I used /*.svc the problems cleared up.)

workers.properties

workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
workers.java_home=/usr/java/jdk1.6.0_06
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13

(Of course, match the ajp port in the workers.property file to the
port you define in the server.xml file. Also, if your Tomcat is not on
the same server as your Apache you will need to change the localhost
host entry to the correct host URL.)

I hope this helps.

On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
 Bad notices.

 This dude has same problem that me and he was answered that mod_jk
 dont support NIO

 http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

 :(

 On 20 feb, 19:13, Fran fra...@gmail.com wrote:

  Here the error when I change the protocol of
  protocol=org.apache.coyote.http11.Http11NioProtocol to 
  protocol=AJP/
  1.3

  [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
  connection. No response has been sent to the client (yet)
  [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat 
  failed.

  On 20 feb, 19:04, Fran fra...@gmail.com wrote:

   

Re: tomcat and apache problem

2010-03-23 Thread Fran
Hi ani,

I read it but its the same problem. It dont work with comet.
I you read all the post, you can see that mod_jk dont work.

Thanks

2010/3/23 ani aneeshk...@gmail.com

 Hi,

   Go through this post
 http://blog.findasolution.in/2010/03/apache-tomcat-connectorintegrate-apache-with-tomcat/
 hope this will help you.

 On Feb 21, 6:10 am, dablack david.blackwell...@gmail.com wrote:
  I borrowed that connector configuration from a website I came across.
  I'm not sure why port=0 either. If I put more research into the NIO
  connector I could probably find out. Why don't you try adding the
  lines,
 
  enableLookups=false
  scheme=http
 
  to the NIO connector configuration in the server.xml file that I gave
  you earlier.
 
  As far as accessing the ajp service usinghttp://localhost:8009/servlet,
  that will not work. Your browser uses the http protocol and the 8009
  port is being serviced by the ajp protocol. You should still have your
  connector using the http protocol configured to listen on port 8081.
 
  Hopefully the scheme line above will help the NIO connector
  communicate back to Apache.
 
  On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote: I test your config,
 dablack, but I cant connect to the servlet.
   With this config I cant access not even to:
 http://localhost:8009/servlet
   that is tomcat directly without apache
 
   On 20 feb, 23:36, Fran fra...@gmail.com wrote:
 
I cant undestand why this config:
 
Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=
150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /
 
Why port 0 ?
 
2010/2/20 dablack david.blackwell...@gmail.com
 
 Fran,
 
 I'm really not an expert on setting up the connection between
 Apache
 and Tomcat but I believe that the connections only operate in two
 protocols: http or ajp. NIO is a Tomcat connector that can
 communicate
 in either http or ajp. Because of that, I don't see any reason that
 the Apache mod_jk connector module couldn't communicate with the
 NIO
 connector. Since I don't use an NIO connector I could be wrong, but
 that is the way I see it. As a starting point, try these
 configurations:
 
 server.xml
 
 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /
 
 (You seem to want to use port 8081 which should be fine, but the
 standard ajp port is 8009. However, I wouldn't put it on port 8081
 if
 you are already using that port for another protocol such as http.)
 
 httpd.conf
 
 LoadModule jk_module modules/mod_jk.so
 JkWorkersFile conf/workers.properties
 JkLogFile /var/log/httpd/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y]
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T
 JkMount /*.svc ajp13
 
 (For the JkMount I use *.svc because I use the svc extension for my
 GWT service target to differentiate service points from other
 files.)
 
 (For example, in my web.xml file I will map my service something
 like
 this to use the svc extension:
 servlet
   servlet-nameMyService/servlet-name
   servlet-classcom.mysite.server.MyServiceImpl/servlet-class
 /servlet
 servlet-mapping
   servlet-nameMyService/servlet-name
   url-pattern/MyService.svc/usr-pattern
 /servlet-mapping
 
 And in my GWT code I create my service target like this:
 
 target.setServiceEntryPoint( GWT.getModuleBaseURL() +
 MyService.svc );
 
 I did this because I had troubles with the 'JkMount /* ajp13'
 entry,
 but when I used /*.svc the problems cleared up.)
 
 workers.properties
 
 workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
 workers.java_home=/usr/java/jdk1.6.0_06
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp13
 
 (Of course, match the ajp port in the workers.property file to the
 port you define in the server.xml file. Also, if your Tomcat is not
 on
 the same server as your Apache you will need to change the
 localhost
 host entry to the correct host URL.)
 
 I hope this helps.
 
 On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
  Bad notices.
 
  This dude has same problem that me and he was answered that
 mod_jk
  dont support NIO
 
 
 http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html
 
  :(
 
  On 20 feb, 19:13, Fran fra...@gmail.com wrote:
 
   Here the error when I change the protocol of
   protocol=org.apache.coyote.http11.Http11NioProtocol to
 

Re: tomcat and apache problem

2010-02-24 Thread Ashar Lohmar
sorry i haven't read all the topic, the first question didn't said
anything about comet, from what I've understood by reading a few of
the answers I thought that the comet was given as an solution/
alternative.

i have no experience in working with comet, so i didn't use it.

On Feb 23, 6:58 pm, Fran fra...@gmail.com wrote:
 good question Chris

 2010/2/23 Chris Lercher cl_for_mail...@gmx.net

  Hi Ashar,

  the Tomcat documentation says, that AJP doesn't work with Comet/AIO:
 http://tomcat.apache.org/tomcat-6.0-doc/aio.html
  Are you using Comet?

  On Feb 23, 2:52 pm, Ashar Lohmar asharloh...@gmail.com wrote:
   i use appache(httpd)+Tomcat with AJP, these are my confs:

   httpd/conf/extra/httpd-vhosts.conf

   VirtualHost *:80
       ServerAdmin ad...@example.com
       DocumentRoot dummy_path_ussualy_the_default_httpd's_htdocs
       ErrorLog logs/app_error_log
       CustomLog logs/app-access_log common
       Location /
           ProxyPass ajp://127.0.0.1:8009/
           ProxyPassReverse ajp://127.0.0.1:8009/
       /Location
   /VirtualHost

   in httpd/conf/httpd.conf i've uncommented a include line as below
   # Virtual hosts
   Include conf/extra/httpd-vhosts.conf

   in my tomcat/conf/server.xml the ajp connector is defined as below
   Connector port=8009 protocol=AJP/1.3 redirectPort=8443
   address=127.0.0.1 /
   i also added the address=127.0.0.1 attribute to the others
   connector tags as i want my app to be reached from outside only
   through httpd.
   Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
   redirectPort=18443 address=127.0.0.1 /

   one more thing that you should have in mind is that i've compiled my
   httpd with the following params --enable-proxy --enable-proxy-ajp --
   enable-proxy-balancer --enable-ssl --with-included-apr and of course
   de --prefix param
   also i've installed the tomcat-native with --with-apr=$HOME/httpd/
   bin/apr-1-config --with-java-home=$HOME/java --with-ssl=yes and
   followed their instruction and added the lib in the LD_LIBRARY_PATH

   hope these will help you
   good luck

   On Feb 21, 2:00 am, Paul S paulsschw...@gmail.com wrote:

So basically you are trying to serve up 2 things. An app from Tomcat
and some other web content from Apache server? Firstly, can't the
other content be served from Tomcat too? That way you could just stop
your Apache server from running, then configure Tomcat to load up on
port 80 (default for http) and that way no one will every know they're
hitting a Tomcat server. Or, there is an Apache server module, I
forgot the name, but is allows you to specify that any normal request
goes to the http server and then any request at /j/* gets pushed along
to the Tomcat server. I'm hazy on the details but have seen it working
before and I don't think it's using a proxy in the way you are.

Could work?

On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:

 Hello,

 I need your help about GWT integration in apache and tomcat.

 I have a GWT aplication that has server side. This server side is
 listening in 8081 port at tomcat.
 I need that the client side be in apache that is listening in port
  80,
 so I need call server side at port 8081 of tomcat.
 How can I do?

 If I run the aplication int tomcat, its works fine. But If I run the
 aplication in apache, the server side dont work.

 Help me please
 Thanks

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-23 Thread Ashar Lohmar
i use appache(httpd)+Tomcat with AJP, these are my confs:

httpd/conf/extra/httpd-vhosts.conf

VirtualHost *:80
ServerAdmin ad...@example.com
DocumentRoot dummy_path_ussualy_the_default_httpd's_htdocs
ErrorLog logs/app_error_log
CustomLog logs/app-access_log common
Location /
ProxyPass ajp://127.0.0.1:8009/
ProxyPassReverse ajp://127.0.0.1:8009/
/Location
/VirtualHost

in httpd/conf/httpd.conf i've uncommented a include line as below
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

in my tomcat/conf/server.xml the ajp connector is defined as below
Connector port=8009 protocol=AJP/1.3 redirectPort=8443
address=127.0.0.1 /
i also added the address=127.0.0.1 attribute to the others
connector tags as i want my app to be reached from outside only
through httpd.
Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
redirectPort=18443 address=127.0.0.1 /


one more thing that you should have in mind is that i've compiled my
httpd with the following params --enable-proxy --enable-proxy-ajp --
enable-proxy-balancer --enable-ssl --with-included-apr and of course
de --prefix param
also i've installed the tomcat-native with --with-apr=$HOME/httpd/
bin/apr-1-config --with-java-home=$HOME/java --with-ssl=yes and
followed their instruction and added the lib in the LD_LIBRARY_PATH


hope these will help you
good luck










On Feb 21, 2:00 am, Paul S paulsschw...@gmail.com wrote:
 So basically you are trying to serve up 2 things. An app from Tomcat
 and some other web content from Apache server? Firstly, can't the
 other content be served from Tomcat too? That way you could just stop
 your Apache server from running, then configure Tomcat to load up on
 port 80 (default for http) and that way no one will every know they're
 hitting a Tomcat server. Or, there is an Apache server module, I
 forgot the name, but is allows you to specify that any normal request
 goes to the http server and then any request at /j/* gets pushed along
 to the Tomcat server. I'm hazy on the details but have seen it working
 before and I don't think it's using a proxy in the way you are.

 Could work?

 On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:

  Hello,

  I need your help about GWT integration in apache and tomcat.

  I have a GWT aplication that has server side. This server side is
  listening in 8081 port at tomcat.
  I need that the client side be in apache that is listening in port 80,
  so I need call server side at port 8081 of tomcat.
  How can I do?

  If I run the aplication int tomcat, its works fine. But If I run the
  aplication in apache, the server side dont work.

  Help me please
  Thanks



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-23 Thread Chris Lercher
Hi Ashar,

the Tomcat documentation says, that AJP doesn't work with Comet/AIO:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html
Are you using Comet?


On Feb 23, 2:52 pm, Ashar Lohmar asharloh...@gmail.com wrote:
 i use appache(httpd)+Tomcat with AJP, these are my confs:

 httpd/conf/extra/httpd-vhosts.conf

 VirtualHost *:80
     ServerAdmin ad...@example.com
     DocumentRoot dummy_path_ussualy_the_default_httpd's_htdocs
     ErrorLog logs/app_error_log
     CustomLog logs/app-access_log common
     Location /
         ProxyPass ajp://127.0.0.1:8009/
         ProxyPassReverse ajp://127.0.0.1:8009/
     /Location
 /VirtualHost

 in httpd/conf/httpd.conf i've uncommented a include line as below
 # Virtual hosts
 Include conf/extra/httpd-vhosts.conf

 in my tomcat/conf/server.xml the ajp connector is defined as below
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443
 address=127.0.0.1 /
 i also added the address=127.0.0.1 attribute to the others
 connector tags as i want my app to be reached from outside only
 through httpd.
 Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
 redirectPort=18443 address=127.0.0.1 /

 one more thing that you should have in mind is that i've compiled my
 httpd with the following params --enable-proxy --enable-proxy-ajp --
 enable-proxy-balancer --enable-ssl --with-included-apr and of course
 de --prefix param
 also i've installed the tomcat-native with --with-apr=$HOME/httpd/
 bin/apr-1-config --with-java-home=$HOME/java --with-ssl=yes and
 followed their instruction and added the lib in the LD_LIBRARY_PATH

 hope these will help you
 good luck

 On Feb 21, 2:00 am, Paul S paulsschw...@gmail.com wrote:



  So basically you are trying to serve up 2 things. An app from Tomcat
  and some other web content from Apache server? Firstly, can't the
  other content be served from Tomcat too? That way you could just stop
  your Apache server from running, then configure Tomcat to load up on
  port 80 (default for http) and that way no one will every know they're
  hitting a Tomcat server. Or, there is an Apache server module, I
  forgot the name, but is allows you to specify that any normal request
  goes to the http server and then any request at /j/* gets pushed along
  to the Tomcat server. I'm hazy on the details but have seen it working
  before and I don't think it's using a proxy in the way you are.

  Could work?

  On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:

   Hello,

   I need your help about GWT integration in apache and tomcat.

   I have a GWT aplication that has server side. This server side is
   listening in 8081 port at tomcat.
   I need that the client side be in apache that is listening in port 80,
   so I need call server side at port 8081 of tomcat.
   How can I do?

   If I run the aplication int tomcat, its works fine. But If I run the
   aplication in apache, the server side dont work.

   Help me please
   Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-23 Thread Fran
good question Chris

2010/2/23 Chris Lercher cl_for_mail...@gmx.net

 Hi Ashar,

 the Tomcat documentation says, that AJP doesn't work with Comet/AIO:
 http://tomcat.apache.org/tomcat-6.0-doc/aio.html
 Are you using Comet?


 On Feb 23, 2:52 pm, Ashar Lohmar asharloh...@gmail.com wrote:
  i use appache(httpd)+Tomcat with AJP, these are my confs:
 
  httpd/conf/extra/httpd-vhosts.conf
 
  VirtualHost *:80
  ServerAdmin ad...@example.com
  DocumentRoot dummy_path_ussualy_the_default_httpd's_htdocs
  ErrorLog logs/app_error_log
  CustomLog logs/app-access_log common
  Location /
  ProxyPass ajp://127.0.0.1:8009/
  ProxyPassReverse ajp://127.0.0.1:8009/
  /Location
  /VirtualHost
 
  in httpd/conf/httpd.conf i've uncommented a include line as below
  # Virtual hosts
  Include conf/extra/httpd-vhosts.conf
 
  in my tomcat/conf/server.xml the ajp connector is defined as below
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443
  address=127.0.0.1 /
  i also added the address=127.0.0.1 attribute to the others
  connector tags as i want my app to be reached from outside only
  through httpd.
  Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
  redirectPort=18443 address=127.0.0.1 /
 
  one more thing that you should have in mind is that i've compiled my
  httpd with the following params --enable-proxy --enable-proxy-ajp --
  enable-proxy-balancer --enable-ssl --with-included-apr and of course
  de --prefix param
  also i've installed the tomcat-native with --with-apr=$HOME/httpd/
  bin/apr-1-config --with-java-home=$HOME/java --with-ssl=yes and
  followed their instruction and added the lib in the LD_LIBRARY_PATH
 
  hope these will help you
  good luck
 
  On Feb 21, 2:00 am, Paul S paulsschw...@gmail.com wrote:
 
 
 
   So basically you are trying to serve up 2 things. An app from Tomcat
   and some other web content from Apache server? Firstly, can't the
   other content be served from Tomcat too? That way you could just stop
   your Apache server from running, then configure Tomcat to load up on
   port 80 (default for http) and that way no one will every know they're
   hitting a Tomcat server. Or, there is an Apache server module, I
   forgot the name, but is allows you to specify that any normal request
   goes to the http server and then any request at /j/* gets pushed along
   to the Tomcat server. I'm hazy on the details but have seen it working
   before and I don't think it's using a proxy in the way you are.
 
   Could work?
 
   On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:
 
Hello,
 
I need your help about GWT integration in apache and tomcat.
 
I have a GWT aplication that has server side. This server side is
listening in 8081 port at tomcat.
I need that the client side be in apache that is listening in port
 80,
so I need call server side at port 8081 of tomcat.
How can I do?
 
If I run the aplication int tomcat, its works fine. But If I run the
aplication in apache, the server side dont work.
 
Help me please
Thanks

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-22 Thread Fran
I think that I will need a iframe that loads tomcat page. But this
solution isnt good

On 21 feb, 16:49, Fran fra...@gmail.com wrote:
 it dont work, apache cant conect totomcatwith this changes. The
 login msn is loading indefinitely... And error logs dont show nothing,
 excepttomcatthat says:

 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
 INFO: Using a shared selector for servlet write/read

 Here the changes...
 Added this lines in event method:

 if (event.getEventType() == CometEvent.EventType.BEGIN) {
                     event.setTimeout(30*1000);
                 }

 if (event.getEventSubType() == CometEvent.EventSubType.TIMEOUT) {
                         writeResponse(event.getHttpServletResponse(), 
 timeout);
                         event.close();
                 }

 server.xml (tomcat):

 Connector
 connectionTimeout=2
 port=8081
 protocol=org.apache.coyote.http11.Http11NioProtocol
 maxThreads=5
 acceptorThreadCount=2
 redirectPort=8443
 socket.directBuffer=false /

 httpd.conf (apache):

         keepalive Off
         ProxyRequests Off
         SetEnv force-proxy-request-1.0 1
         SetEnv proxy-nokeepalive 1

         Proxy *
                 Order deny,allow
                 Allow from all
         /Proxy

         ProxyPass 
 /msn/com.msn/messengerhttp://localhost:8081/msn/com.msn/messenger
         ProxyPassReverse 
 /msn/com.msn/messengerhttp://localhost:8081/msn/com.msn/messenger

 On 21 feb, 16:29, Chris Lercher cl_for_mail...@gmx.net wrote:

  I expect that your application works, if you usetomcatonly, because
  many browsers will wait for the response for a very long time. In that
  case, you don't need a timeout on your server.

  But when there's any proxy between your client and the server (and
  that's also the case when the client connects to the Internet via a
  proxy), then it often fails. Also expected behaviour.

  I'd take a look at this:http://tomcat.apache.org/tomcat-6.0-doc/aio.html

  It says you can set a timeout like this:
  event.setTimeout(30*1000)

  I'd do this for EventType.BEGIN.

  Then you can test for EventType.TIMEOUT (the documentation says, that
  you may need the
  org.apache.catalina.valves.CometConnectionManagerValve for this).

  On timeout, send some dummy response. The client should recognize the
  response as a timeout message, and retry.

  So, in effect I imagine it could look something like this (I can't try
  it here, so there may be some mistakes):

  public void event(CometEvent event) throws IOException,
  ServletException {
   if (event.getEventType() == CometEvent.EventType.BEGIN) {
      event.setTimeout(30*1000);
   }
   if (event.getEventType() == CometEvent.EventType.READ) { ...}
   if (event.getEventType() == CometEvent.EventType.TIMEOUT) {
      writeResponse(response, timeout);
      event.close();
   }

  }

  On Feb 21, 3:54 pm, Fran fra...@gmail.com wrote:

   Chris, the big problem is that the aplication works fully intomcat
   but I use apache to run it with the servlet intomcat, it cant work.
   I only need to emulate that the execution in apache is the same that
   intomcat

   On 21 feb, 15:50, Fran fra...@gmail.com wrote:

I based the code in a GWT book.
Please take a look 
athttp://217.13.89.62/messenger%20nonblocking%20calls.pdf
next the phrase at the first page: Using Server-Side Advanced IO

Thanks for your time

On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:

 Using writer.flush() is absolutely ok, it's just not enough. Taking a
 quick look at the code you posted, it looks ok, because after calling
 writer.flush(), it always calls event.close(). So, no problem here.
 But: I don't see any timeout in the code. The server must also call
 event.close() after some timeout - which must be shorter than your
 proxy's and your browser's timeout. (Some people say, it should in any
 case be less than a minute.)

 So either you can configure the timeout somewhere intomcat(please
 refer to thetomcatdocumentation), or you'll have to send something
 back manually after some time.
 When the client receives such a dummy response, it must open a new
 request (that's the long polling principle).

 On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:

  Yes Chris, I use writer.flush()
  I cant use it at mod_proxy? What can I do?

  Thanks

  On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:

   Here are some things you can check - maybe one of these helps (?)

   - In your servlet: Do you expect that anything gets flushed
   (reliably), before you call the close() method on CometEvent? If 
   yes,
   then what you're actually trying to do is _streaming_ (which 
   doesn't
   work). Calling writer.flush() is certainly not enough, since 
   mod_proxy
   has no way to know that writer.flush() has been called.

   - Did you try to set no-cache headers etc.?

   

Re: tomcat and apache problem

2010-02-22 Thread Chris Lercher
I believe, that people in a specialized Tomcat forum may be able to
help you a lot better.

As a last hint, if all else fails, you can still experiment with a
timeout on the client. See this thread:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/11960c28e1a2d9eb?pli=1
Or set something like a content aware load balancer in front, to
balance between your Apache and Tomcat without acting like a proxy, if
that's possible at all, and if it works with your special PHP setup.

Sorry I couldn't help you with more specifics, but it's been some
years since I last used a Tomcat+Apache setup...

Chris


On Feb 22, 7:19 pm, Fran fra...@gmail.com wrote:
 I think that I will need a iframe that loads tomcat page. But this
 solution isnt good

 On 21 feb, 16:49, Fran fra...@gmail.com wrote:



  it dont work, apache cant conect totomcatwith this changes. The
  login msn is loading indefinitely... And error logs dont show nothing,
  excepttomcatthat says:

  org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
  INFO: Using a shared selector for servlet write/read

  Here the changes...
  Added this lines in event method:

  if (event.getEventType() == CometEvent.EventType.BEGIN) {
                      event.setTimeout(30*1000);
                  }

  if (event.getEventSubType() == CometEvent.EventSubType.TIMEOUT) {
                          writeResponse(event.getHttpServletResponse(), 
  timeout);
                          event.close();
                  }

  server.xml (tomcat):

  Connector
  connectionTimeout=2
  port=8081
  protocol=org.apache.coyote.http11.Http11NioProtocol
  maxThreads=5
  acceptorThreadCount=2
  redirectPort=8443
  socket.directBuffer=false /

  httpd.conf (apache):

          keepalive Off
          ProxyRequests Off
          SetEnv force-proxy-request-1.0 1
          SetEnv proxy-nokeepalive 1

          Proxy *
                  Order deny,allow
                  Allow from all
          /Proxy

          ProxyPass 
  /msn/com.msn/messengerhttp://localhost:8081/msn/com.msn/messenger
          ProxyPassReverse 
  /msn/com.msn/messengerhttp://localhost:8081/msn/com.msn/messenger

  On 21 feb, 16:29, Chris Lercher cl_for_mail...@gmx.net wrote:

   I expect that your application works, if you usetomcatonly, because
   many browsers will wait for the response for a very long time. In that
   case, you don't need a timeout on your server.

   But when there's any proxy between your client and the server (and
   that's also the case when the client connects to the Internet via a
   proxy), then it often fails. Also expected behaviour.

   I'd take a look at this:http://tomcat.apache.org/tomcat-6.0-doc/aio.html

   It says you can set a timeout like this:
   event.setTimeout(30*1000)

   I'd do this for EventType.BEGIN.

   Then you can test for EventType.TIMEOUT (the documentation says, that
   you may need the
   org.apache.catalina.valves.CometConnectionManagerValve for this).

   On timeout, send some dummy response. The client should recognize the
   response as a timeout message, and retry.

   So, in effect I imagine it could look something like this (I can't try
   it here, so there may be some mistakes):

   public void event(CometEvent event) throws IOException,
   ServletException {
    if (event.getEventType() == CometEvent.EventType.BEGIN) {
       event.setTimeout(30*1000);
    }
    if (event.getEventType() == CometEvent.EventType.READ) { ...}
    if (event.getEventType() == CometEvent.EventType.TIMEOUT) {
       writeResponse(response, timeout);
       event.close();
    }

   }

   On Feb 21, 3:54 pm, Fran fra...@gmail.com wrote:

Chris, the big problem is that the aplication works fully intomcat
but I use apache to run it with the servlet intomcat, it cant work.
I only need to emulate that the execution in apache is the same that
intomcat

On 21 feb, 15:50, Fran fra...@gmail.com wrote:

 I based the code in a GWT book.
 Please take a look 
 athttp://217.13.89.62/messenger%20nonblocking%20calls.pdf
 next the phrase at the first page: Using Server-Side Advanced IO

 Thanks for your time

 On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:

  Using writer.flush() is absolutely ok, it's just not enough. Taking 
  a
  quick look at the code you posted, it looks ok, because after 
  calling
  writer.flush(), it always calls event.close(). So, no problem here.
  But: I don't see any timeout in the code. The server must also call
  event.close() after some timeout - which must be shorter than your
  proxy's and your browser's timeout. (Some people say, it should in 
  any
  case be less than a minute.)

  So either you can configure the timeout somewhere intomcat(please
  refer to thetomcatdocumentation), or you'll have to send something
  back manually after some time.
  When the client receives such a dummy response, it must open a new
  

Re: tomcat and apache problem

2010-02-21 Thread Fran
I tested the mod_proxy_http, in the last post you can see the config
that I used.
But in Comet HTTP streaming, I found mod_proxy blocked the response
until server close the
stream (after timeout), then send the whole response to client at
once.

In the first time I was wrong because I thought that if I put
timeout=1 I found the solution but Its not real because the server
close the conection after timeout

In the five post of mine is an example of the problem.

This dude has a similar problem: 
http://forums.java.net/jive/thread.jspa?threadID=41377

I am hopeless :(

On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:
 Sorry to lead you on a wild goose chase. I guess you will have to use
 the Apache mod_proxy_http module with the Tomcat NIO connector using
 the http protocol after all. I don't have any experience with the
 mod_proxy_http module at all so not really anything I can help you
 with.

 Good luck.

 On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

  The problem persist with the news changes.
  Seems that apache cant connect to tomcat :(
  The error log of apache and mod_jk dont show nothing. Not ever nio conection
  stablished

  2010/2/21 dablack david.blackwell...@gmail.com

   I borrowed that connector configuration from a website I came across.
   I'm not sure why port=0 either. If I put more research into the NIO
   connector I could probably find out. Why don't you try adding the
   lines,

   enableLookups=false
   scheme=http

   to the NIO connector configuration in the server.xml file that I gave
   you earlier.

   As far as accessing the ajp service usinghttp://localhost:8009/servlet,
   that will not work. Your browser uses the http protocol and the 8009
   port is being serviced by the ajp protocol. You should still have your
   connector using the http protocol configured to listen on port 8081.

   Hopefully the scheme line above will help the NIO connector
   communicate back to Apache.

   On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
I test your config, dablack, but I cant connect to the servlet.
With this config I cant access not even to:http://localhost:8009/servlet
that is tomcat directly without apache

On 20 feb, 23:36, Fran fra...@gmail.com wrote:

 I cant undestand why this config:

 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=
 150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

 Why port 0 ?

 2010/2/20 dablack david.blackwell...@gmail.com

  Fran,

  I'm really not an expert on setting up the connection between Apache
  and Tomcat but I believe that the connections only operate in two
  protocols: http or ajp. NIO is a Tomcat connector that can
   communicate
  in either http or ajp. Because of that, I don't see any reason that
  the Apache mod_jk connector module couldn't communicate with the NIO
  connector. Since I don't use an NIO connector I could be wrong, but
  that is the way I see it. As a starting point, try these
  configurations:

  server.xml

  Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
  channelNioSocket.maxThreads=150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  (You seem to want to use port 8081 which should be fine, but the
  standard ajp port is 8009. However, I wouldn't put it on port 8081 
  if
  you are already using that port for another protocol such as http.)

  httpd.conf

  LoadModule jk_module modules/mod_jk.so
  JkWorkersFile conf/workers.properties
  JkLogFile /var/log/httpd/mod_jk.log
  JkLogLevel info
  JkLogStampFormat [%a %b %d %H:%M:%S %Y]
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  JkRequestLogFormat %w %V %T
  JkMount /*.svc ajp13

  (For the JkMount I use *.svc because I use the svc extension for my
  GWT service target to differentiate service points from other 
  files.)

  (For example, in my web.xml file I will map my service something 
  like
  this to use the svc extension:
  servlet
    servlet-nameMyService/servlet-name
    servlet-classcom.mysite.server.MyServiceImpl/servlet-class
  /servlet
  servlet-mapping
    servlet-nameMyService/servlet-name
    url-pattern/MyService.svc/usr-pattern
  /servlet-mapping

  And in my GWT code I create my service target like this:

  target.setServiceEntryPoint( GWT.getModuleBaseURL() +
  MyService.svc );

  I did this because I had troubles with the 'JkMount /* ajp13' entry,
  but when I used /*.svc the problems cleared up.)

  workers.properties

  workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
  workers.java_home=/usr/java/jdk1.6.0_06
  worker.list=ajp13
  worker.ajp13.port=8009
 

Re: tomcat and apache problem

2010-02-21 Thread Fran
The mod_rewrite cant help me because I need that the server sends me
the response. Modrewrite only redirect.
I need that the client be in apache because my aplication is an
extended module of a webpage that is wrote in php/mysql and has a
special configuration in apache

Thanks for help

On 21 feb, 04:06, Martin D'Aloia martindal...@gmail.com wrote:
 have you looked mod_rewrite 
 (http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html) ? doesn't it help
 you?

 Why you need that the client side runs on apache httpd and not in a tomcat?
 do you have shared resources? if not, maybe you can let tomcat serve the
 client side also and, if you need performance, look at APR for tomcat 
 (http://tomcat.apache.org/tomcat-6.0-doc/apr.html)

 On Sat, Feb 20, 2010 at 11:21 PM, dablack david.blackwell...@gmail.comwrote:

  Sorry to lead you on a wild goose chase. I guess you will have to use
  the Apache mod_proxy_http module with the Tomcat NIO connector using
  the http protocol after all. I don't have any experience with the
  mod_proxy_http module at all so not really anything I can help you
  with.

  Good luck.

  On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:
   The problem persist with the news changes.
   Seems that apache cant connect to tomcat :(
   The error log of apache and mod_jk dont show nothing. Not ever nio
  conection
   stablished

   2010/2/21 dablack david.blackwell...@gmail.com

I borrowed that connector configuration from a website I came across.
I'm not sure why port=0 either. If I put more research into the NIO
connector I could probably find out. Why don't you try adding the
lines,

enableLookups=false
scheme=http

to the NIO connector configuration in the server.xml file that I gave
you earlier.

As far as accessing the ajp service usinghttp://localhost:8009/servlet,
that will not work. Your browser uses the http protocol and the 8009
port is being serviced by the ajp protocol. You should still have your
connector using the http protocol configured to listen on port 8081.

Hopefully the scheme line above will help the NIO connector
communicate back to Apache.

On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
 I test your config, dablack, but I cant connect to the servlet.
 With this config I cant access not even to:
 http://localhost:8009/servlet
 that is tomcat directly without apache

 On 20 feb, 23:36, Fran fra...@gmail.com wrote:

  I cant undestand why this config:

  Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
  channelNioSocket.maxThreads=
  150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  Why port 0 ?

  2010/2/20 dablack david.blackwell...@gmail.com

   Fran,

   I'm really not an expert on setting up the connection between
  Apache
   and Tomcat but I believe that the connections only operate in two
   protocols: http or ajp. NIO is a Tomcat connector that can
communicate
   in either http or ajp. Because of that, I don't see any reason
  that
   the Apache mod_jk connector module couldn't communicate with the
  NIO
   connector. Since I don't use an NIO connector I could be wrong,
  but
   that is the way I see it. As a starting point, try these
   configurations:

   server.xml

   Connector protocol=AJP/1.3 port=0
  channelNioSocket.port=8009
   channelNioSocket.maxThreads=150
     channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
     channelNioSocket.bufferSize=16384 /

   (You seem to want to use port 8081 which should be fine, but the
   standard ajp port is 8009. However, I wouldn't put it on port
  8081 if
   you are already using that port for another protocol such as
  http.)

   httpd.conf

   LoadModule jk_module modules/mod_jk.so
   JkWorkersFile conf/workers.properties
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLevel info
   JkLogStampFormat [%a %b %d %H:%M:%S %Y]
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat %w %V %T
   JkMount /*.svc ajp13

   (For the JkMount I use *.svc because I use the svc extension for
  my
   GWT service target to differentiate service points from other
  files.)

   (For example, in my web.xml file I will map my service something
  like
   this to use the svc extension:
   servlet
     servlet-nameMyService/servlet-name
     servlet-classcom.mysite.server.MyServiceImpl/servlet-class
   /servlet
   servlet-mapping
     servlet-nameMyService/servlet-name
     url-pattern/MyService.svc/usr-pattern
   /servlet-mapping

   And in my GWT code I create my service target like this:

   target.setServiceEntryPoint( GWT.getModuleBaseURL() +
   MyService.svc );

   I did this because I had troubles with 

Re: tomcat and apache problem

2010-02-21 Thread Chris Lercher
Here are some things you can check - maybe one of these helps (?)

- In your servlet: Do you expect that anything gets flushed
(reliably), before you call the close() method on CometEvent? If yes,
then what you're actually trying to do is _streaming_ (which doesn't
work). Calling writer.flush() is certainly not enough, since mod_proxy
has no way to know that writer.flush() has been called.

- Did you try to set no-cache headers etc.?


On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:
 I tested the mod_proxy_http, in the last post you can see the config
 that I used.
 But in Comet HTTP streaming, I found mod_proxy blocked the response
 until server close the
 stream (after timeout), then send the whole response to client at
 once.

 In the first time I was wrong because I thought that if I put
 timeout=1 I found the solution but Its not real because the server
 close the conection after timeout

 In the five post of mine is an example of the problem.

 This dude has a similar 
 problem:http://forums.java.net/jive/thread.jspa?threadID=41377

 I am hopeless :(

 On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:



  Sorry to lead you on a wild goose chase. I guess you will have to use
  the Apache mod_proxy_http module with the Tomcat NIO connector using
  the http protocol after all. I don't have any experience with the
  mod_proxy_http module at all so not really anything I can help you
  with.

  Good luck.

  On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

   The problem persist with the news changes.
   Seems that apache cant connect to tomcat :(
   The error log of apache and mod_jk dont show nothing. Not ever nio 
   conection
   stablished

   2010/2/21 dablack david.blackwell...@gmail.com

I borrowed that connector configuration from a website I came across.
I'm not sure why port=0 either. If I put more research into the NIO
connector I could probably find out. Why don't you try adding the
lines,

enableLookups=false
scheme=http

to the NIO connector configuration in the server.xml file that I gave
you earlier.

As far as accessing the ajp service usinghttp://localhost:8009/servlet,
that will not work. Your browser uses the http protocol and the 8009
port is being serviced by the ajp protocol. You should still have your
connector using the http protocol configured to listen on port 8081.

Hopefully the scheme line above will help the NIO connector
communicate back to Apache.

On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
 I test your config, dablack, but I cant connect to the servlet.
 With this config I cant access not even 
 to:http://localhost:8009/servlet
 that is tomcat directly without apache

 On 20 feb, 23:36, Fran fra...@gmail.com wrote:

  I cant undestand why this config:

  Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
  channelNioSocket.maxThreads=
  150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  Why port 0 ?

  2010/2/20 dablack david.blackwell...@gmail.com

   Fran,

   I'm really not an expert on setting up the connection between 
   Apache
   and Tomcat but I believe that the connections only operate in two
   protocols: http or ajp. NIO is a Tomcat connector that can
communicate
   in either http or ajp. Because of that, I don't see any reason 
   that
   the Apache mod_jk connector module couldn't communicate with the 
   NIO
   connector. Since I don't use an NIO connector I could be wrong, 
   but
   that is the way I see it. As a starting point, try these
   configurations:

   server.xml

   Connector protocol=AJP/1.3 port=0 
   channelNioSocket.port=8009
   channelNioSocket.maxThreads=150
     channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
     channelNioSocket.bufferSize=16384 /

   (You seem to want to use port 8081 which should be fine, but the
   standard ajp port is 8009. However, I wouldn't put it on port 
   8081 if
   you are already using that port for another protocol such as 
   http.)

   httpd.conf

   LoadModule jk_module modules/mod_jk.so
   JkWorkersFile conf/workers.properties
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLevel info
   JkLogStampFormat [%a %b %d %H:%M:%S %Y]
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat %w %V %T
   JkMount /*.svc ajp13

   (For the JkMount I use *.svc because I use the svc extension for 
   my
   GWT service target to differentiate service points from other 
   files.)

   (For example, in my web.xml file I will map my service something 
   like
   this to use the svc extension:
   servlet
     servlet-nameMyService/servlet-name
     

Re: tomcat and apache problem

2010-02-21 Thread Fran
Here the source code of my servlet. This code is part of aplication code of
the book Google Web Toolkit Applications

public class MessengerServiceCometImpl extends HttpServlet implements
CometProcessor {

class CometMessengerService extends AbstractMessengerService{

final ThreadLocal perThreadRequest = new ThreadLocal();
public String getCurrentId() {
return
((HttpServletRequest)perThreadRequest.get()).getSession(true).getId();
}

public void onEvents(String id) {
synchronized(pendingRequests){
PendingRequest pr = (PendingRequest)pendingRequests.get( id
);
if( pr != null ){
pendingRequests.remove(id);
sendResponse( pr.event, pr.rpcRequest );
}
}
}
}

class PendingRequest{
RPCRequest rpcRequest;
CometEvent event;
public PendingRequest(RPCRequest rpcRequest, CometEvent event) {
this.rpcRequest = rpcRequest;
this.event = event;
}
}

Map pendingRequests = new HashMap();
CometMessengerService messengerService =  new CometMessengerService();

public void event(CometEvent event) throws IOException, ServletException
{
if (event.getEventType() == CometEvent.EventType.READ) {
//get the RPC request
RPCRequest rpcRequest = RPC.decodeRequest( readRequest( event )
);
Method targetMethod = rpcRequest.getMethod();

//if its the event request then wait for events
synchronized(pendingRequests){
messengerService.perThreadRequest.set(
event.getHttpServletRequest() );
if( targetMethod.getName().equals(getEvents) 
!messengerService.hasEvents() ){
//save this request for processing later.
pendingRequests.put( messengerService.getCurrentId(),
new PendingRequest( rpcRequest, event ) );
}
else{
//otherwise process the RPC call as usual
sendResponse( event, rpcRequest );
}
}
}
}

public void sendResponse( CometEvent event, RPCRequest rpcRequest ) {
try{
try{
messengerService.perThreadRequest.set(
event.getHttpServletRequest() );
String result =
RPC.invokeAndEncodeResponse(messengerService, rpcRequest.getMethod(),
rpcRequest.getParameters());
writeResponse(event.getHttpServletResponse(), result);
event.close();

} catch (IncompatibleRemoteServiceException e) {
writeResponse( event.getHttpServletResponse(),
RPC.encodeResponseForFailure(null, e) );
}
}catch (Throwable e) {
writeResponse( event.getHttpServletResponse(), Server Error );
}
}

public String readRequest( CometEvent event ) throws IOException,
ServletException{
int contentLength =
event.getHttpServletRequest().getContentLength();
if (contentLength == -1) {
// Content length must be known.
throw new ServletException(Content-Length must be specified);
}
InputStream in = event.getHttpServletRequest().getInputStream();
byte[] payload = new byte[contentLength];
int offset = 0;
int len = contentLength;
int byteCount;
while (offset  contentLength) {
byteCount = in.read(payload, offset, len);
if (byteCount == -1) {
throw new ServletException(Client did not send  +
contentLength
+  bytes as expected);
}
offset += byteCount;
len -= byteCount;
}
return new String(payload, UTF-8);
}

public void writeResponse( HttpServletResponse response, String body ){
try {
// this line is added by me
response.addHeader(Transfer-Encoding, Chunked);
PrintWriter writer = response.getWriter();
writer.print(body);
writer.flush();
} catch (IOException e) {
log(IOExeption sending response, e);
}
}

}

2010/2/21 Chris Lercher cl_for_mail...@gmx.net

 Here are some things you can check - maybe one of these helps (?)

 - In your servlet: Do you expect that anything gets flushed
 (reliably), before you call the close() method on CometEvent? If yes,
 then what you're actually trying to do is _streaming_ (which doesn't
 work). Calling writer.flush() is certainly not enough, since mod_proxy
 has no way to know that writer.flush() has been called.

 - Did you try to set no-cache headers etc.?


 On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:
  I tested the mod_proxy_http, in the last post you can see the config
  that I used.
  But in Comet HTTP streaming, I found mod_proxy blocked the response
  until server close the
  stream (after timeout), 

Re: tomcat and apache problem

2010-02-21 Thread Fran
Yes Chris, I use writer.flush()
I cant use it at mod_proxy? What can I do?

Thanks

On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:
 Here are some things you can check - maybe one of these helps (?)

 - In your servlet: Do you expect that anything gets flushed
 (reliably), before you call the close() method on CometEvent? If yes,
 then what you're actually trying to do is _streaming_ (which doesn't
 work). Calling writer.flush() is certainly not enough, since mod_proxy
 has no way to know that writer.flush() has been called.

 - Did you try to set no-cache headers etc.?

 On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

  I tested the mod_proxy_http, in the last post you can see the config
  that I used.
  But in Comet HTTP streaming, I found mod_proxy blocked the response
  until server close the
  stream (after timeout), then send the whole response to client at
  once.

  In the first time I was wrong because I thought that if I put
  timeout=1 I found the solution but Its not real because the server
  close the conection after timeout

  In the five post of mine is an example of the problem.

  This dude has a similar 
  problem:http://forums.java.net/jive/thread.jspa?threadID=41377

  I am hopeless :(

  On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:

   Sorry to lead you on a wild goose chase. I guess you will have to use
   the Apache mod_proxy_http module with the Tomcat NIO connector using
   the http protocol after all. I don't have any experience with the
   mod_proxy_http module at all so not really anything I can help you
   with.

   Good luck.

   On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

The problem persist with the news changes.
Seems that apache cant connect to tomcat :(
The error log of apache and mod_jk dont show nothing. Not ever nio 
conection
stablished

2010/2/21 dablack david.blackwell...@gmail.com

 I borrowed that connector configuration from a website I came across.
 I'm not sure why port=0 either. If I put more research into the NIO
 connector I could probably find out. Why don't you try adding the
 lines,

 enableLookups=false
 scheme=http

 to the NIO connector configuration in the server.xml file that I gave
 you earlier.

 As far as accessing the ajp service 
 usinghttp://localhost:8009/servlet,
 that will not work. Your browser uses the http protocol and the 8009
 port is being serviced by the ajp protocol. You should still have your
 connector using the http protocol configured to listen on port 8081.

 Hopefully the scheme line above will help the NIO connector
 communicate back to Apache.

 On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
  I test your config, dablack, but I cant connect to the servlet.
  With this config I cant access not even 
  to:http://localhost:8009/servlet
  that is tomcat directly without apache

  On 20 feb, 23:36, Fran fra...@gmail.com wrote:

   I cant undestand why this config:

   Connector protocol=AJP/1.3 port=0 
   channelNioSocket.port=8009
   channelNioSocket.maxThreads=
   150
     channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
     channelNioSocket.bufferSize=16384 /

   Why port 0 ?

   2010/2/20 dablack david.blackwell...@gmail.com

Fran,

I'm really not an expert on setting up the connection between 
Apache
and Tomcat but I believe that the connections only operate in 
two
protocols: http or ajp. NIO is a Tomcat connector that can
 communicate
in either http or ajp. Because of that, I don't see any reason 
that
the Apache mod_jk connector module couldn't communicate with 
the NIO
connector. Since I don't use an NIO connector I could be wrong, 
but
that is the way I see it. As a starting point, try these
configurations:

server.xml

Connector protocol=AJP/1.3 port=0 
channelNioSocket.port=8009
channelNioSocket.maxThreads=150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /

(You seem to want to use port 8081 which should be fine, but the
standard ajp port is 8009. However, I wouldn't put it on port 
8081 if
you are already using that port for another protocol such as 
http.)

httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.svc ajp13

(For the JkMount I use *.svc because I use the svc extension 
for my
GWT service target to 

Re: tomcat and apache problem

2010-02-21 Thread Chris Lercher
Using writer.flush() is absolutely ok, it's just not enough. Taking a
quick look at the code you posted, it looks ok, because after calling
writer.flush(), it always calls event.close(). So, no problem here.
But: I don't see any timeout in the code. The server must also call
event.close() after some timeout - which must be shorter than your
proxy's and your browser's timeout. (Some people say, it should in any
case be less than a minute.)

So either you can configure the timeout somewhere in tomcat (please
refer to the tomcat documentation), or you'll have to send something
back manually after some time.
When the client receives such a dummy response, it must open a new
request (that's the long polling principle).


On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:
 Yes Chris, I use writer.flush()
 I cant use it at mod_proxy? What can I do?

 Thanks

 On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:



  Here are some things you can check - maybe one of these helps (?)

  - In your servlet: Do you expect that anything gets flushed
  (reliably), before you call the close() method on CometEvent? If yes,
  then what you're actually trying to do is _streaming_ (which doesn't
  work). Calling writer.flush() is certainly not enough, since mod_proxy
  has no way to know that writer.flush() has been called.

  - Did you try to set no-cache headers etc.?

  On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

   I tested the mod_proxy_http, in the last post you can see the config
   that I used.
   But in Comet HTTP streaming, I found mod_proxy blocked the response
   until server close the
   stream (after timeout), then send the whole response to client at
   once.

   In the first time I was wrong because I thought that if I put
   timeout=1 I found the solution but Its not real because the server
   close the conection after timeout

   In the five post of mine is an example of the problem.

   This dude has a similar 
   problem:http://forums.java.net/jive/thread.jspa?threadID=41377

   I am hopeless :(

   On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:

Sorry to lead you on a wild goose chase. I guess you will have to use
the Apache mod_proxy_http module with the Tomcat NIO connector using
the http protocol after all. I don't have any experience with the
mod_proxy_http module at all so not really anything I can help you
with.

Good luck.

On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

 The problem persist with the news changes.
 Seems that apache cant connect to tomcat :(
 The error log of apache and mod_jk dont show nothing. Not ever nio 
 conection
 stablished

 2010/2/21 dablack david.blackwell...@gmail.com

  I borrowed that connector configuration from a website I came 
  across.
  I'm not sure why port=0 either. If I put more research into the NIO
  connector I could probably find out. Why don't you try adding the
  lines,

  enableLookups=false
  scheme=http

  to the NIO connector configuration in the server.xml file that I 
  gave
  you earlier.

  As far as accessing the ajp service 
  usinghttp://localhost:8009/servlet,
  that will not work. Your browser uses the http protocol and the 8009
  port is being serviced by the ajp protocol. You should still have 
  your
  connector using the http protocol configured to listen on port 8081.

  Hopefully the scheme line above will help the NIO connector
  communicate back to Apache.

  On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
   I test your config, dablack, but I cant connect to the servlet.
   With this config I cant access not even 
   to:http://localhost:8009/servlet
   that is tomcat directly without apache

   On 20 feb, 23:36, Fran fra...@gmail.com wrote:

I cant undestand why this config:

Connector protocol=AJP/1.3 port=0 
channelNioSocket.port=8009
channelNioSocket.maxThreads=
150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /

Why port 0 ?

2010/2/20 dablack david.blackwell...@gmail.com

 Fran,

 I'm really not an expert on setting up the connection between 
 Apache
 and Tomcat but I believe that the connections only operate in 
 two
 protocols: http or ajp. NIO is a Tomcat connector that can
  communicate
 in either http or ajp. Because of that, I don't see any 
 reason that
 the Apache mod_jk connector module couldn't communicate with 
 the NIO
 connector. Since I don't use an NIO connector I could be 
 wrong, but
 that is the way I see it. As a starting point, try these
 configurations:

 server.xml

 Connector protocol=AJP/1.3 port=0 
 channelNioSocket.port=8009
 

Re: tomcat and apache problem

2010-02-21 Thread Fran
I based the code in a GWT book.
Please take a look at http://217.13.89.62/messenger%20nonblocking%20calls.pdf
next the phrase at the first page: Using Server-Side Advanced IO

Thanks for your time


On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:
 Using writer.flush() is absolutely ok, it's just not enough. Taking a
 quick look at the code you posted, it looks ok, because after calling
 writer.flush(), it always calls event.close(). So, no problem here.
 But: I don't see any timeout in the code. The server must also call
 event.close() after some timeout - which must be shorter than your
 proxy's and your browser's timeout. (Some people say, it should in any
 case be less than a minute.)

 So either you can configure the timeout somewhere in tomcat (please
 refer to the tomcat documentation), or you'll have to send something
 back manually after some time.
 When the client receives such a dummy response, it must open a new
 request (that's the long polling principle).

 On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:

  Yes Chris, I use writer.flush()
  I cant use it at mod_proxy? What can I do?

  Thanks

  On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:

   Here are some things you can check - maybe one of these helps (?)

   - In your servlet: Do you expect that anything gets flushed
   (reliably), before you call the close() method on CometEvent? If yes,
   then what you're actually trying to do is _streaming_ (which doesn't
   work). Calling writer.flush() is certainly not enough, since mod_proxy
   has no way to know that writer.flush() has been called.

   - Did you try to set no-cache headers etc.?

   On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

I tested the mod_proxy_http, in the last post you can see the config
that I used.
But in Comet HTTP streaming, I found mod_proxy blocked the response
until server close the
stream (after timeout), then send the whole response to client at
once.

In the first time I was wrong because I thought that if I put
timeout=1 I found the solution but Its not real because the server
close the conection after timeout

In the five post of mine is an example of the problem.

This dude has a similar 
problem:http://forums.java.net/jive/thread.jspa?threadID=41377

I am hopeless :(

On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:

 Sorry to lead you on a wild goose chase. I guess you will have to use
 the Apache mod_proxy_http module with the Tomcat NIO connector using
 the http protocol after all. I don't have any experience with the
 mod_proxy_http module at all so not really anything I can help you
 with.

 Good luck.

 On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

  The problem persist with the news changes.
  Seems that apache cant connect to tomcat :(
  The error log of apache and mod_jk dont show nothing. Not ever nio 
  conection
  stablished

  2010/2/21 dablack david.blackwell...@gmail.com

   I borrowed that connector configuration from a website I came 
   across.
   I'm not sure why port=0 either. If I put more research into the 
   NIO
   connector I could probably find out. Why don't you try adding the
   lines,

   enableLookups=false
   scheme=http

   to the NIO connector configuration in the server.xml file that I 
   gave
   you earlier.

   As far as accessing the ajp service 
   usinghttp://localhost:8009/servlet,
   that will not work. Your browser uses the http protocol and the 
   8009
   port is being serviced by the ajp protocol. You should still have 
   your
   connector using the http protocol configured to listen on port 
   8081.

   Hopefully the scheme line above will help the NIO connector
   communicate back to Apache.

   On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
I test your config, dablack, but I cant connect to the servlet.
With this config I cant access not even 
to:http://localhost:8009/servlet
that is tomcat directly without apache

On 20 feb, 23:36, Fran fra...@gmail.com wrote:

 I cant undestand why this config:

 Connector protocol=AJP/1.3 port=0 
 channelNioSocket.port=8009
 channelNioSocket.maxThreads=
 150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

 Why port 0 ?

 2010/2/20 dablack david.blackwell...@gmail.com

  Fran,

  I'm really not an expert on setting up the connection 
  between Apache
  and Tomcat but I believe that the connections only operate 
  in two
  protocols: http or ajp. NIO is a Tomcat connector that can
   communicate
  in either http or ajp. Because of that, I don't see any 
  reason that
  

Re: tomcat and apache problem

2010-02-21 Thread Fran
Chris, the big problem is that the aplication works fully in tomcat
but I use apache to run it with the servlet in tomcat, it cant work.
I only need to emulate that the execution in apache is the same that
in tomcat

On 21 feb, 15:50, Fran fra...@gmail.com wrote:
 I based the code in a GWT book.
 Please take a look athttp://217.13.89.62/messenger%20nonblocking%20calls.pdf
 next the phrase at the first page: Using Server-Side Advanced IO

 Thanks for your time

 On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:

  Using writer.flush() is absolutely ok, it's just not enough. Taking a
  quick look at the code you posted, it looks ok, because after calling
  writer.flush(), it always calls event.close(). So, no problem here.
  But: I don't see any timeout in the code. The server must also call
  event.close() after some timeout - which must be shorter than your
  proxy's and your browser's timeout. (Some people say, it should in any
  case be less than a minute.)

  So either you can configure the timeout somewhere in tomcat (please
  refer to the tomcat documentation), or you'll have to send something
  back manually after some time.
  When the client receives such a dummy response, it must open a new
  request (that's the long polling principle).

  On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:

   Yes Chris, I use writer.flush()
   I cant use it at mod_proxy? What can I do?

   Thanks

   On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:

Here are some things you can check - maybe one of these helps (?)

- In your servlet: Do you expect that anything gets flushed
(reliably), before you call the close() method on CometEvent? If yes,
then what you're actually trying to do is _streaming_ (which doesn't
work). Calling writer.flush() is certainly not enough, since mod_proxy
has no way to know that writer.flush() has been called.

- Did you try to set no-cache headers etc.?

On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

 I tested the mod_proxy_http, in the last post you can see the config
 that I used.
 But in Comet HTTP streaming, I found mod_proxy blocked the response
 until server close the
 stream (after timeout), then send the whole response to client at
 once.

 In the first time I was wrong because I thought that if I put
 timeout=1 I found the solution but Its not real because the server
 close the conection after timeout

 In the five post of mine is an example of the problem.

 This dude has a similar 
 problem:http://forums.java.net/jive/thread.jspa?threadID=41377

 I am hopeless :(

 On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:

  Sorry to lead you on a wild goose chase. I guess you will have to 
  use
  the Apache mod_proxy_http module with the Tomcat NIO connector using
  the http protocol after all. I don't have any experience with the
  mod_proxy_http module at all so not really anything I can help you
  with.

  Good luck.

  On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

   The problem persist with the news changes.
   Seems that apache cant connect to tomcat :(
   The error log of apache and mod_jk dont show nothing. Not ever 
   nio conection
   stablished

   2010/2/21 dablack david.blackwell...@gmail.com

I borrowed that connector configuration from a website I came 
across.
I'm not sure why port=0 either. If I put more research into the 
NIO
connector I could probably find out. Why don't you try adding 
the
lines,

enableLookups=false
scheme=http

to the NIO connector configuration in the server.xml file that 
I gave
you earlier.

As far as accessing the ajp service 
usinghttp://localhost:8009/servlet,
that will not work. Your browser uses the http protocol and the 
8009
port is being serviced by the ajp protocol. You should still 
have your
connector using the http protocol configured to listen on port 
8081.

Hopefully the scheme line above will help the NIO connector
communicate back to Apache.

On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
 I test your config, dablack, but I cant connect to the 
 servlet.
 With this config I cant access not even 
 to:http://localhost:8009/servlet
 that is tomcat directly without apache

 On 20 feb, 23:36, Fran fra...@gmail.com wrote:

  I cant undestand why this config:

  Connector protocol=AJP/1.3 port=0 
  channelNioSocket.port=8009
  channelNioSocket.maxThreads=
  150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  Why port 0 ?

  2010/2/20 dablack david.blackwell...@gmail.com

Re: tomcat and apache problem

2010-02-21 Thread Chris Lercher
I expect that your application works, if you use tomcat only, because
many browsers will wait for the response for a very long time. In that
case, you don't need a timeout on your server.

But when there's any proxy between your client and the server (and
that's also the case when the client connects to the Internet via a
proxy), then it often fails. Also expected behaviour.

I'd take a look at this: http://tomcat.apache.org/tomcat-6.0-doc/aio.html

It says you can set a timeout like this:
event.setTimeout(30*1000)

I'd do this for EventType.BEGIN.

Then you can test for EventType.TIMEOUT (the documentation says, that
you may need the
org.apache.catalina.valves.CometConnectionManagerValve for this).

On timeout, send some dummy response. The client should recognize the
response as a timeout message, and retry.

So, in effect I imagine it could look something like this (I can't try
it here, so there may be some mistakes):

public void event(CometEvent event) throws IOException,
ServletException {
 if (event.getEventType() == CometEvent.EventType.BEGIN) {
event.setTimeout(30*1000);
 }
 if (event.getEventType() == CometEvent.EventType.READ) { ...}
 if (event.getEventType() == CometEvent.EventType.TIMEOUT) {
writeResponse(response, timeout);
event.close();
 }
}


On Feb 21, 3:54 pm, Fran fra...@gmail.com wrote:
 Chris, the big problem is that the aplication works fully in tomcat
 but I use apache to run it with the servlet in tomcat, it cant work.
 I only need to emulate that the execution in apache is the same that
 in tomcat

 On 21 feb, 15:50, Fran fra...@gmail.com wrote:



  I based the code in a GWT book.
  Please take a look athttp://217.13.89.62/messenger%20nonblocking%20calls.pdf
  next the phrase at the first page: Using Server-Side Advanced IO

  Thanks for your time

  On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:

   Using writer.flush() is absolutely ok, it's just not enough. Taking a
   quick look at the code you posted, it looks ok, because after calling
   writer.flush(), it always calls event.close(). So, no problem here.
   But: I don't see any timeout in the code. The server must also call
   event.close() after some timeout - which must be shorter than your
   proxy's and your browser's timeout. (Some people say, it should in any
   case be less than a minute.)

   So either you can configure the timeout somewhere in tomcat (please
   refer to the tomcat documentation), or you'll have to send something
   back manually after some time.
   When the client receives such a dummy response, it must open a new
   request (that's the long polling principle).

   On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:

Yes Chris, I use writer.flush()
I cant use it at mod_proxy? What can I do?

Thanks

On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:

 Here are some things you can check - maybe one of these helps (?)

 - In your servlet: Do you expect that anything gets flushed
 (reliably), before you call the close() method on CometEvent? If yes,
 then what you're actually trying to do is _streaming_ (which doesn't
 work). Calling writer.flush() is certainly not enough, since mod_proxy
 has no way to know that writer.flush() has been called.

 - Did you try to set no-cache headers etc.?

 On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

  I tested the mod_proxy_http, in the last post you can see the config
  that I used.
  But in Comet HTTP streaming, I found mod_proxy blocked the response
  until server close the
  stream (after timeout), then send the whole response to client at
  once.

  In the first time I was wrong because I thought that if I put
  timeout=1 I found the solution but Its not real because the server
  close the conection after timeout

  In the five post of mine is an example of the problem.

  This dude has a similar 
  problem:http://forums.java.net/jive/thread.jspa?threadID=41377

  I am hopeless :(

  On 21 feb, 03:21, dablack david.blackwell...@gmail.com wrote:

   Sorry to lead you on a wild goose chase. I guess you will have to 
   use
   the Apache mod_proxy_http module with the Tomcat NIO connector 
   using
   the http protocol after all. I don't have any experience with the
   mod_proxy_http module at all so not really anything I can help you
   with.

   Good luck.

   On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:

The problem persist with the news changes.
Seems that apache cant connect to tomcat :(
The error log of apache and mod_jk dont show nothing. Not ever 
nio conection
stablished

2010/2/21 dablack david.blackwell...@gmail.com

 I borrowed that connector configuration from a website I came 
 across.
 I'm not sure why port=0 either. If I put more research into 
 the NIO
 connector I could 

Re: tomcat and apache problem

2010-02-21 Thread Fran
it dont work, apache cant conect to tomcat with this changes. The
login msn is loading indefinitely... And error logs dont show nothing,
except tomcat that says:

org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read


Here the changes...
Added this lines in event method:

if (event.getEventType() == CometEvent.EventType.BEGIN) {
event.setTimeout(30*1000);
}

if (event.getEventSubType() == CometEvent.EventSubType.TIMEOUT) {
writeResponse(event.getHttpServletResponse(), 
timeout);
event.close();
}

server.xml (tomcat):

Connector
connectionTimeout=2
port=8081
protocol=org.apache.coyote.http11.Http11NioProtocol
maxThreads=5
acceptorThreadCount=2
redirectPort=8443
socket.directBuffer=false /

httpd.conf (apache):

keepalive Off
ProxyRequests Off
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

Proxy *
Order deny,allow
Allow from all
/Proxy

ProxyPass /msn/com.msn/messenger 
http://localhost:8081/msn/com.msn/messenger
ProxyPassReverse /msn/com.msn/messenger 
http://localhost:8081/msn/com.msn/messenger



On 21 feb, 16:29, Chris Lercher cl_for_mail...@gmx.net wrote:
 I expect that your application works, if you use tomcat only, because
 many browsers will wait for the response for a very long time. In that
 case, you don't need a timeout on your server.

 But when there's any proxy between your client and the server (and
 that's also the case when the client connects to the Internet via a
 proxy), then it often fails. Also expected behaviour.

 I'd take a look at this:http://tomcat.apache.org/tomcat-6.0-doc/aio.html

 It says you can set a timeout like this:
 event.setTimeout(30*1000)

 I'd do this for EventType.BEGIN.

 Then you can test for EventType.TIMEOUT (the documentation says, that
 you may need the
 org.apache.catalina.valves.CometConnectionManagerValve for this).

 On timeout, send some dummy response. The client should recognize the
 response as a timeout message, and retry.

 So, in effect I imagine it could look something like this (I can't try
 it here, so there may be some mistakes):

 public void event(CometEvent event) throws IOException,
 ServletException {
  if (event.getEventType() == CometEvent.EventType.BEGIN) {
     event.setTimeout(30*1000);
  }
  if (event.getEventType() == CometEvent.EventType.READ) { ...}
  if (event.getEventType() == CometEvent.EventType.TIMEOUT) {
     writeResponse(response, timeout);
     event.close();
  }

 }

 On Feb 21, 3:54 pm, Fran fra...@gmail.com wrote:

  Chris, the big problem is that the aplication works fully in tomcat
  but I use apache to run it with the servlet in tomcat, it cant work.
  I only need to emulate that the execution in apache is the same that
  in tomcat

  On 21 feb, 15:50, Fran fra...@gmail.com wrote:

   I based the code in a GWT book.
   Please take a look 
   athttp://217.13.89.62/messenger%20nonblocking%20calls.pdf
   next the phrase at the first page: Using Server-Side Advanced IO

   Thanks for your time

   On 21 feb, 15:38, Chris Lercher cl_for_mail...@gmx.net wrote:

Using writer.flush() is absolutely ok, it's just not enough. Taking a
quick look at the code you posted, it looks ok, because after calling
writer.flush(), it always calls event.close(). So, no problem here.
But: I don't see any timeout in the code. The server must also call
event.close() after some timeout - which must be shorter than your
proxy's and your browser's timeout. (Some people say, it should in any
case be less than a minute.)

So either you can configure the timeout somewhere in tomcat (please
refer to the tomcat documentation), or you'll have to send something
back manually after some time.
When the client receives such a dummy response, it must open a new
request (that's the long polling principle).

On Feb 21, 3:28 pm, Fran fra...@gmail.com wrote:

 Yes Chris, I use writer.flush()
 I cant use it at mod_proxy? What can I do?

 Thanks

 On 21 feb, 14:39, Chris Lercher cl_for_mail...@gmx.net wrote:

  Here are some things you can check - maybe one of these helps (?)

  - In your servlet: Do you expect that anything gets flushed
  (reliably), before you call the close() method on CometEvent? If 
  yes,
  then what you're actually trying to do is _streaming_ (which doesn't
  work). Calling writer.flush() is certainly not enough, since 
  mod_proxy
  has no way to know that writer.flush() has been called.

  - Did you try to set no-cache headers etc.?

  On Feb 21, 1:11 pm, Fran fra...@gmail.com wrote:

   I tested the mod_proxy_http, in the last post you can see the 
   config
   that I used.
   But in Comet HTTP streaming, I found mod_proxy blocked the 
   

Re: tomcat and apache problem

2010-02-20 Thread Fran
Ok, thanks.

I will test mod_jk. I tested jk but i couldnt to run it in tomcat 6.
Im going to test jk one more time.

Thanks a lot!

On 20 feb, 03:46, Chris Lercher cl_for_mail...@gmx.net wrote:
 The timeout is for the max time the app server gets to respond. If it
 closes the connection earlier (which it should do, once it sends its
 response), then the delay is shorter. This is what long polling is all
 about. So if you set the delay to 15 seconds, it doesn't mean you have
 to wait for 15 seconds every time. That's only, when the server
 doesn't send the response within 15 seconds.

 But as dablack says, probably mod_jk is the better solution anyway.
 However, like I said earlier, there may be additional proxies between
 your server and the client. So if it doesn't work correctly with
 mod_proxy, this could indicate, that there is some problem in the way
 the app server and the client interact. I have the feeling, that the
 server maybe doesn't close its connection, so the proxy won't (always)
 flush its contents. This triggers a timeout on the proxy or on the
 client (depending on which is shorter).

 On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:

  If I dont put a short timeout, the aplication isnt good.
  Do you imagine that the MSN Messenger delay 15 seconds to show you the
  contact list?

  I need that the solution works as the aplication in tomcat. If I
  execute the aplication on tomcat, it work without timeout. So I need
  when the aplication works in apache, seems that is working in tomcat.

  Im going to show the url that you tell me. Thanks!

  On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

   BTW, here's a link about timeouts + 
   Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread Fran
I am configuring mod_jk

For tomat, in server.xml :

Connector
connectionTimeout=2
port=8081
protocol=AJP/1.3
maxThreads=5
acceptorThreadCount=2
redirectPort=8443
socket.directBuffer=false /

For apache, in httpd.conf :

IfModule mod_jk.c
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel warn
JkMount /msn/* worker1
/IfModule


The result is that the url: http://localhost/msn/Messenger.html works,
but this html conects to servelet that not work.
The mod_jk runs html in apache that fisically are in tomcat, but cant
run the servlet.

¿Is necesary some special configure?

Thanks!



On 20 feb, 16:04, Fran fra...@gmail.com wrote:
 Ok, thanks.

 I will test mod_jk. I tested jk but i couldnt to run it in tomcat 6.
 Im going to test jk one more time.

 Thanks a lot!

 On 20 feb, 03:46, Chris Lercher cl_for_mail...@gmx.net wrote:

  The timeout is for the max time the app server gets to respond. If it
  closes the connection earlier (which it should do, once it sends its
  response), then the delay is shorter. This is what long polling is all
  about. So if you set the delay to 15 seconds, it doesn't mean you have
  to wait for 15 seconds every time. That's only, when the server
  doesn't send the response within 15 seconds.

  But as dablack says, probably mod_jk is the better solution anyway.
  However, like I said earlier, there may be additional proxies between
  your server and the client. So if it doesn't work correctly with
  mod_proxy, this could indicate, that there is some problem in the way
  the app server and the client interact. I have the feeling, that the
  server maybe doesn't close its connection, so the proxy won't (always)
  flush its contents. This triggers a timeout on the proxy or on the
  client (depending on which is shorter).

  On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:

   If I dont put a short timeout, the aplication isnt good.
   Do you imagine that the MSN Messenger delay 15 seconds to show you the
   contact list?

   I need that the solution works as the aplication in tomcat. If I
   execute the aplication on tomcat, it work without timeout. So I need
   when the aplication works in apache, seems that is working in tomcat.

   Im going to show the url that you tell me. Thanks!

   On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

BTW, here's a link about timeouts + 
Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread Fran
Should be due to protocol.
My messenger seems that need NIO protocol but if I put the NIO
protocol MOD_JK cant conect apache with tomcat

If I use this tomcat config, mod_jk cant conect apache with tomcat.

Connector
connectionTimeout=2
port=8081
protocol=org.apache.coyote.http11.Http11NioProtocol
maxThreads=5
acceptorThreadCount=2
redirectPort=8443
socket.directBuffer=false /

If I use the last tomcat config, tomcat cant execute the servlet.
This is the error log:

GRAVE: Error, processing connection
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
685)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Unknown Source)


On 20 feb, 18:49, Fran fra...@gmail.com wrote:
 I am configuring mod_jk

 For tomat, in server.xml :

 Connector
 connectionTimeout=2
 port=8081
 protocol=AJP/1.3
 maxThreads=5
 acceptorThreadCount=2
 redirectPort=8443
 socket.directBuffer=false /

 For apache, in httpd.conf :

 IfModule mod_jk.c
         JkWorkersFile /etc/httpd/conf/workers.properties
         JkLogFile /etc/httpd/logs/mod_jk.log
         JkLogLevel warn
         JkMount /msn/* worker1
 /IfModule

 The result is that the url:http://localhost/msn/Messenger.htmlworks,
 but this html conects to servelet that not work.
 The mod_jk runs html in apache that fisically are in tomcat, but cant
 run the servlet.

 ¿Is necesary some special configure?

 Thanks!

 On 20 feb, 16:04, Fran fra...@gmail.com wrote:

  Ok, thanks.

  I will test mod_jk. I tested jk but i couldnt to run it in tomcat 6.
  Im going to test jk one more time.

  Thanks a lot!

  On 20 feb, 03:46, Chris Lercher cl_for_mail...@gmx.net wrote:

   The timeout is for the max time the app server gets to respond. If it
   closes the connection earlier (which it should do, once it sends its
   response), then the delay is shorter. This is what long polling is all
   about. So if you set the delay to 15 seconds, it doesn't mean you have
   to wait for 15 seconds every time. That's only, when the server
   doesn't send the response within 15 seconds.

   But as dablack says, probably mod_jk is the better solution anyway.
   However, like I said earlier, there may be additional proxies between
   your server and the client. So if it doesn't work correctly with
   mod_proxy, this could indicate, that there is some problem in the way
   the app server and the client interact. I have the feeling, that the
   server maybe doesn't close its connection, so the proxy won't (always)
   flush its contents. This triggers a timeout on the proxy or on the
   client (depending on which is shorter).

   On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:

If I dont put a short timeout, the aplication isnt good.
Do you imagine that the MSN Messenger delay 15 seconds to show you the
contact list?

I need that the solution works as the aplication in tomcat. If I
execute the aplication on tomcat, it work without timeout. So I need
when the aplication works in apache, seems that is working in tomcat.

Im going to show the url that you tell me. Thanks!

On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

 BTW, here's a link about timeouts + 
 Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread Fran
Here the error when I change the protocol of
protocol=org.apache.coyote.http11.Http11NioProtocol to protocol=AJP/
1.3

[error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
connection. No response has been sent to the client (yet)
[error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.



On 20 feb, 19:04, Fran fra...@gmail.com wrote:
 Should be due to protocol.
 My messenger seems that need NIO protocol but if I put the NIO
 protocol MOD_JK cant conect apache with tomcat

 If I use this tomcat config, mod_jk cant conect apache with tomcat.

 Connector
 connectionTimeout=2
 port=8081
 protocol=org.apache.coyote.http11.Http11NioProtocol
 maxThreads=5
 acceptorThreadCount=2
 redirectPort=8443
 socket.directBuffer=false /

 If I use the last tomcat config, tomcat cant execute the servlet.
 This is the error log:

 GRAVE: Error, processing connection
 java.lang.IndexOutOfBoundsException
         at java.io.BufferedInputStream.read(Unknown Source)
         at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
         at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
         at
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
 685)
         at org.apache.jk.common.ChannelSocket
 $SocketConnection.runIt(ChannelSocket.java:889)
         at org.apache.tomcat.util.threads.ThreadPool
 $ControlRunnable.run(ThreadPool.java:690)
         at java.lang.Thread.run(Unknown Source)

 On 20 feb, 18:49, Fran fra...@gmail.com wrote:

  I am configuring mod_jk

  For tomat, in server.xml :

  Connector
  connectionTimeout=2
  port=8081
  protocol=AJP/1.3
  maxThreads=5
  acceptorThreadCount=2
  redirectPort=8443
  socket.directBuffer=false /

  For apache, in httpd.conf :

  IfModule mod_jk.c
          JkWorkersFile /etc/httpd/conf/workers.properties
          JkLogFile /etc/httpd/logs/mod_jk.log
          JkLogLevel warn
          JkMount /msn/* worker1
  /IfModule

  The result is that the url:http://localhost/msn/Messenger.htmlworks,
  but this html conects to servelet that not work.
  The mod_jk runs html in apache that fisically are in tomcat, but cant
  run the servlet.

  ¿Is necesary some special configure?

  Thanks!

  On 20 feb, 16:04, Fran fra...@gmail.com wrote:

   Ok, thanks.

   I will test mod_jk. I tested jk but i couldnt to run it in tomcat 6.
   Im going to test jk one more time.

   Thanks a lot!

   On 20 feb, 03:46, Chris Lercher cl_for_mail...@gmx.net wrote:

The timeout is for the max time the app server gets to respond. If it
closes the connection earlier (which it should do, once it sends its
response), then the delay is shorter. This is what long polling is all
about. So if you set the delay to 15 seconds, it doesn't mean you have
to wait for 15 seconds every time. That's only, when the server
doesn't send the response within 15 seconds.

But as dablack says, probably mod_jk is the better solution anyway.
However, like I said earlier, there may be additional proxies between
your server and the client. So if it doesn't work correctly with
mod_proxy, this could indicate, that there is some problem in the way
the app server and the client interact. I have the feeling, that the
server maybe doesn't close its connection, so the proxy won't (always)
flush its contents. This triggers a timeout on the proxy or on the
client (depending on which is shorter).

On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:

 If I dont put a short timeout, the aplication isnt good.
 Do you imagine that the MSN Messenger delay 15 seconds to show you the
 contact list?

 I need that the solution works as the aplication in tomcat. If I
 execute the aplication on tomcat, it work without timeout. So I need
 when the aplication works in apache, seems that is working in tomcat.

 Im going to show the url that you tell me. Thanks!

 On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

  BTW, here's a link about timeouts + 
  Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread Fran
Bad notices.

This dude has same problem that me and he was answered that mod_jk
dont support NIO

http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

:(



On 20 feb, 19:13, Fran fra...@gmail.com wrote:
 Here the error when I change the protocol of
 protocol=org.apache.coyote.http11.Http11NioProtocol to protocol=AJP/
 1.3

 [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
 connection. No response has been sent to the client (yet)
 [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.

 On 20 feb, 19:04, Fran fra...@gmail.com wrote:

  Should be due to protocol.
  My messenger seems that need NIO protocol but if I put the NIO
  protocol MOD_JK cant conect apache with tomcat

  If I use this tomcat config, mod_jk cant conect apache with tomcat.

  Connector
  connectionTimeout=2
  port=8081
  protocol=org.apache.coyote.http11.Http11NioProtocol
  maxThreads=5
  acceptorThreadCount=2
  redirectPort=8443
  socket.directBuffer=false /

  If I use the last tomcat config, tomcat cant execute the servlet.
  This is the error log:

  GRAVE: Error, processing connection
  java.lang.IndexOutOfBoundsException
          at java.io.BufferedInputStream.read(Unknown Source)
          at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
          at 
  org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
          at
  org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
  685)
          at org.apache.jk.common.ChannelSocket
  $SocketConnection.runIt(ChannelSocket.java:889)
          at org.apache.tomcat.util.threads.ThreadPool
  $ControlRunnable.run(ThreadPool.java:690)
          at java.lang.Thread.run(Unknown Source)

  On 20 feb, 18:49, Fran fra...@gmail.com wrote:

   I am configuring mod_jk

   For tomat, in server.xml :

   Connector
   connectionTimeout=2
   port=8081
   protocol=AJP/1.3
   maxThreads=5
   acceptorThreadCount=2
   redirectPort=8443
   socket.directBuffer=false /

   For apache, in httpd.conf :

   IfModule mod_jk.c
           JkWorkersFile /etc/httpd/conf/workers.properties
           JkLogFile /etc/httpd/logs/mod_jk.log
           JkLogLevel warn
           JkMount /msn/* worker1
   /IfModule

   The result is that the url:http://localhost/msn/Messenger.htmlworks,
   but this html conects to servelet that not work.
   The mod_jk runs html in apache that fisically are in tomcat, but cant
   run the servlet.

   ¿Is necesary some special configure?

   Thanks!

   On 20 feb, 16:04, Fran fra...@gmail.com wrote:

Ok, thanks.

I will test mod_jk. I tested jk but i couldnt to run it in tomcat 6.
Im going to test jk one more time.

Thanks a lot!

On 20 feb, 03:46, Chris Lercher cl_for_mail...@gmx.net wrote:

 The timeout is for the max time the app server gets to respond. If it
 closes the connection earlier (which it should do, once it sends its
 response), then the delay is shorter. This is what long polling is all
 about. So if you set the delay to 15 seconds, it doesn't mean you have
 to wait for 15 seconds every time. That's only, when the server
 doesn't send the response within 15 seconds.

 But as dablack says, probably mod_jk is the better solution anyway.
 However, like I said earlier, there may be additional proxies between
 your server and the client. So if it doesn't work correctly with
 mod_proxy, this could indicate, that there is some problem in the way
 the app server and the client interact. I have the feeling, that the
 server maybe doesn't close its connection, so the proxy won't (always)
 flush its contents. This triggers a timeout on the proxy or on the
 client (depending on which is shorter).

 On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:

  If I dont put a short timeout, the aplication isnt good.
  Do you imagine that the MSN Messenger delay 15 seconds to show you 
  the
  contact list?

  I need that the solution works as the aplication in tomcat. If I
  execute the aplication on tomcat, it work without timeout. So I need
  when the aplication works in apache, seems that is working in 
  tomcat.

  Im going to show the url that you tell me. Thanks!

  On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

   BTW, here's a link about timeouts + 
   Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread dablack
Fran,

I'm really not an expert on setting up the connection between Apache
and Tomcat but I believe that the connections only operate in two
protocols: http or ajp. NIO is a Tomcat connector that can communicate
in either http or ajp. Because of that, I don't see any reason that
the Apache mod_jk connector module couldn't communicate with the NIO
connector. Since I don't use an NIO connector I could be wrong, but
that is the way I see it. As a starting point, try these
configurations:

server.xml

Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=150
   channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

(You seem to want to use port 8081 which should be fine, but the
standard ajp port is 8009. However, I wouldn't put it on port 8081 if
you are already using that port for another protocol such as http.)

httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.svc ajp13

(For the JkMount I use *.svc because I use the svc extension for my
GWT service target to differentiate service points from other files.)

(For example, in my web.xml file I will map my service something like
this to use the svc extension:
servlet
   servlet-nameMyService/servlet-name
   servlet-classcom.mysite.server.MyServiceImpl/servlet-class
/servlet
servlet-mapping
   servlet-nameMyService/servlet-name
   url-pattern/MyService.svc/usr-pattern
/servlet-mapping

And in my GWT code I create my service target like this:

target.setServiceEntryPoint( GWT.getModuleBaseURL() +
MyService.svc );

I did this because I had troubles with the 'JkMount /* ajp13' entry,
but when I used /*.svc the problems cleared up.)

workers.properties

workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
workers.java_home=/usr/java/jdk1.6.0_06
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13

(Of course, match the ajp port in the workers.property file to the
port you define in the server.xml file. Also, if your Tomcat is not on
the same server as your Apache you will need to change the localhost
host entry to the correct host URL.)

I hope this helps.



On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
 Bad notices.

 This dude has same problem that me and he was answered that mod_jk
 dont support NIO

 http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

 :(

 On 20 feb, 19:13, Fran fra...@gmail.com wrote:

  Here the error when I change the protocol of
  protocol=org.apache.coyote.http11.Http11NioProtocol to protocol=AJP/
  1.3

  [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
  connection. No response has been sent to the client (yet)
  [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.

  On 20 feb, 19:04, Fran fra...@gmail.com wrote:

   Should be due to protocol.
   My messenger seems that need NIO protocol but if I put the NIO
   protocol MOD_JK cant conect apache with tomcat

   If I use this tomcat config, mod_jk cant conect apache with tomcat.

   Connector
   connectionTimeout=2
   port=8081
   protocol=org.apache.coyote.http11.Http11NioProtocol
   maxThreads=5
   acceptorThreadCount=2
   redirectPort=8443
   socket.directBuffer=false /

   If I use the last tomcat config, tomcat cant execute the servlet.
   This is the error log:

   GRAVE: Error, processing connection
   java.lang.IndexOutOfBoundsException
           at java.io.BufferedInputStream.read(Unknown Source)
           at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
           at 
   org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
           at
   org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
   685)
           at org.apache.jk.common.ChannelSocket
   $SocketConnection.runIt(ChannelSocket.java:889)
           at org.apache.tomcat.util.threads.ThreadPool
   $ControlRunnable.run(ThreadPool.java:690)
           at java.lang.Thread.run(Unknown Source)

   On 20 feb, 18:49, Fran fra...@gmail.com wrote:

I am configuring mod_jk

For tomat, in server.xml :

Connector
connectionTimeout=2
port=8081
protocol=AJP/1.3
maxThreads=5
acceptorThreadCount=2
redirectPort=8443
socket.directBuffer=false /

For apache, in httpd.conf :

IfModule mod_jk.c
        JkWorkersFile /etc/httpd/conf/workers.properties
        JkLogFile /etc/httpd/logs/mod_jk.log
        JkLogLevel warn
        JkMount /msn/* worker1
/IfModule

The result is that the url:http://localhost/msn/Messenger.htmlworks,
but this html conects to servelet that not work.
The mod_jk runs 

Re: tomcat and apache problem

2010-02-20 Thread Fran
I cant undestand why this config:

Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=
150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /


Why port 0 ?


2010/2/20 dablack david.blackwell...@gmail.com

 Fran,

 I'm really not an expert on setting up the connection between Apache
 and Tomcat but I believe that the connections only operate in two
 protocols: http or ajp. NIO is a Tomcat connector that can communicate
 in either http or ajp. Because of that, I don't see any reason that
 the Apache mod_jk connector module couldn't communicate with the NIO
 connector. Since I don't use an NIO connector I could be wrong, but
 that is the way I see it. As a starting point, try these
 configurations:

 server.xml

 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

 (You seem to want to use port 8081 which should be fine, but the
 standard ajp port is 8009. However, I wouldn't put it on port 8081 if
 you are already using that port for another protocol such as http.)

 httpd.conf

 LoadModule jk_module modules/mod_jk.so
 JkWorkersFile conf/workers.properties
 JkLogFile /var/log/httpd/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y]
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T
 JkMount /*.svc ajp13

 (For the JkMount I use *.svc because I use the svc extension for my
 GWT service target to differentiate service points from other files.)

 (For example, in my web.xml file I will map my service something like
 this to use the svc extension:
 servlet
   servlet-nameMyService/servlet-name
   servlet-classcom.mysite.server.MyServiceImpl/servlet-class
 /servlet
 servlet-mapping
   servlet-nameMyService/servlet-name
   url-pattern/MyService.svc/usr-pattern
 /servlet-mapping

 And in my GWT code I create my service target like this:

 target.setServiceEntryPoint( GWT.getModuleBaseURL() +
 MyService.svc );

 I did this because I had troubles with the 'JkMount /* ajp13' entry,
 but when I used /*.svc the problems cleared up.)

 workers.properties

 workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
 workers.java_home=/usr/java/jdk1.6.0_06
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp13

 (Of course, match the ajp port in the workers.property file to the
 port you define in the server.xml file. Also, if your Tomcat is not on
 the same server as your Apache you will need to change the localhost
 host entry to the correct host URL.)

 I hope this helps.



 On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
  Bad notices.
 
  This dude has same problem that me and he was answered that mod_jk
  dont support NIO
 
  http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html
 
  :(
 
  On 20 feb, 19:13, Fran fra...@gmail.com wrote:
 
   Here the error when I change the protocol of
   protocol=org.apache.coyote.http11.Http11NioProtocol to protocol=AJP/
   1.3
 
   [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
   connection. No response has been sent to the client (yet)
   [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.
 
   On 20 feb, 19:04, Fran fra...@gmail.com wrote:
 
Should be due to protocol.
My messenger seems that need NIO protocol but if I put the NIO
protocol MOD_JK cant conect apache with tomcat
 
If I use this tomcat config, mod_jk cant conect apache with tomcat.
 
Connector
connectionTimeout=2
port=8081
protocol=org.apache.coyote.http11.Http11NioProtocol
maxThreads=5
acceptorThreadCount=2
redirectPort=8443
socket.directBuffer=false /
 
If I use the last tomcat config, tomcat cant execute the servlet.
This is the error log:
 
GRAVE: Error, processing connection
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(Unknown Source)
at
 org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
at
 org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
at
   
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
685)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Unknown Source)
 
On 20 feb, 18:49, Fran fra...@gmail.com wrote:
 
 I am configuring mod_jk
 
 For tomat, in server.xml :
 
 Connector
 connectionTimeout=2
 port=8081
 protocol=AJP/1.3
 maxThreads=5
 acceptorThreadCount=2
 

Re: tomcat and apache problem

2010-02-20 Thread Fran
I test your config, dablack, but I cant connect to the servlet.
With this config I cant access not even to: http://localhost:8009/servlet
that is tomcat directly without apache


On 20 feb, 23:36, Fran fra...@gmail.com wrote:
 I cant undestand why this config:

 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=
 150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

 Why port 0 ?

 2010/2/20 dablack david.blackwell...@gmail.com

  Fran,

  I'm really not an expert on setting up the connection between Apache
  and Tomcat but I believe that the connections only operate in two
  protocols: http or ajp. NIO is a Tomcat connector that can communicate
  in either http or ajp. Because of that, I don't see any reason that
  the Apache mod_jk connector module couldn't communicate with the NIO
  connector. Since I don't use an NIO connector I could be wrong, but
  that is the way I see it. As a starting point, try these
  configurations:

  server.xml

  Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
  channelNioSocket.maxThreads=150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  (You seem to want to use port 8081 which should be fine, but the
  standard ajp port is 8009. However, I wouldn't put it on port 8081 if
  you are already using that port for another protocol such as http.)

  httpd.conf

  LoadModule jk_module modules/mod_jk.so
  JkWorkersFile conf/workers.properties
  JkLogFile /var/log/httpd/mod_jk.log
  JkLogLevel info
  JkLogStampFormat [%a %b %d %H:%M:%S %Y]
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  JkRequestLogFormat %w %V %T
  JkMount /*.svc ajp13

  (For the JkMount I use *.svc because I use the svc extension for my
  GWT service target to differentiate service points from other files.)

  (For example, in my web.xml file I will map my service something like
  this to use the svc extension:
  servlet
    servlet-nameMyService/servlet-name
    servlet-classcom.mysite.server.MyServiceImpl/servlet-class
  /servlet
  servlet-mapping
    servlet-nameMyService/servlet-name
    url-pattern/MyService.svc/usr-pattern
  /servlet-mapping

  And in my GWT code I create my service target like this:

  target.setServiceEntryPoint( GWT.getModuleBaseURL() +
  MyService.svc );

  I did this because I had troubles with the 'JkMount /* ajp13' entry,
  but when I used /*.svc the problems cleared up.)

  workers.properties

  workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
  workers.java_home=/usr/java/jdk1.6.0_06
  worker.list=ajp13
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
  worker.ajp13.lbfactor=1
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=ajp13

  (Of course, match the ajp port in the workers.property file to the
  port you define in the server.xml file. Also, if your Tomcat is not on
  the same server as your Apache you will need to change the localhost
  host entry to the correct host URL.)

  I hope this helps.

  On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
   Bad notices.

   This dude has same problem that me and he was answered that mod_jk
   dont support NIO

   http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

   :(

   On 20 feb, 19:13, Fran fra...@gmail.com wrote:

Here the error when I change the protocol of
protocol=org.apache.coyote.http11.Http11NioProtocol to protocol=AJP/
1.3

[error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
connection. No response has been sent to the client (yet)
[error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.

On 20 feb, 19:04, Fran fra...@gmail.com wrote:

 Should be due to protocol.
 My messenger seems that need NIO protocol but if I put the NIO
 protocol MOD_JK cant conect apache with tomcat

 If I use this tomcat config, mod_jk cant conect apache with tomcat.

 Connector
 connectionTimeout=2
 port=8081
 protocol=org.apache.coyote.http11.Http11NioProtocol
 maxThreads=5
 acceptorThreadCount=2
 redirectPort=8443
 socket.directBuffer=false /

 If I use the last tomcat config, tomcat cant execute the servlet.
 This is the error log:

 GRAVE: Error, processing connection
 java.lang.IndexOutOfBoundsException
         at java.io.BufferedInputStream.read(Unknown Source)
         at
  org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
         at
  org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
         at

  org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
 685)
         at org.apache.jk.common.ChannelSocket
 $SocketConnection.runIt(ChannelSocket.java:889)
         at org.apache.tomcat.util.threads.ThreadPool
 $ControlRunnable.run(ThreadPool.java:690)
 

Re: tomcat and apache problem

2010-02-20 Thread Paul S
So basically you are trying to serve up 2 things. An app from Tomcat
and some other web content from Apache server? Firstly, can't the
other content be served from Tomcat too? That way you could just stop
your Apache server from running, then configure Tomcat to load up on
port 80 (default for http) and that way no one will every know they're
hitting a Tomcat server. Or, there is an Apache server module, I
forgot the name, but is allows you to specify that any normal request
goes to the http server and then any request at /j/* gets pushed along
to the Tomcat server. I'm hazy on the details but have seen it working
before and I don't think it's using a proxy in the way you are.

Could work?


On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:
 Hello,

 I need your help about GWT integration in apache and tomcat.

 I have a GWT aplication that has server side. This server side is
 listening in 8081 port at tomcat.
 I need that the client side be in apache that is listening in port 80,
 so I need call server side at port 8081 of tomcat.
 How can I do?

 If I run the aplication int tomcat, its works fine. But If I run the
 aplication in apache, the server side dont work.

 Help me please
 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread Fran
The module that you are telling is mod_jk and I cant use it because dont
support NIO or I cant to do work.
I cant implement all aplication without apache because I am implementing a
comet chat that will be included in a web aplication that already exists and
I cant import to tomcat.

Thanks for your help

2010/2/21 Paul S paulsschw...@gmail.com

 So basically you are trying to serve up 2 things. An app from Tomcat
 and some other web content from Apache server? Firstly, can't the
 other content be served from Tomcat too? That way you could just stop
 your Apache server from running, then configure Tomcat to load up on
 port 80 (default for http) and that way no one will every know they're
 hitting a Tomcat server. Or, there is an Apache server module, I
 forgot the name, but is allows you to specify that any normal request
 goes to the http server and then any request at /j/* gets pushed along
 to the Tomcat server. I'm hazy on the details but have seen it working
 before and I don't think it's using a proxy in the way you are.

 Could work?


 On Feb 16, 12:47 am, Fran fra...@gmail.com wrote:
  Hello,
 
  I need your help about GWT integration in apache and tomcat.
 
  I have a GWT aplication that has server side. This server side is
  listening in 8081 port at tomcat.
  I need that the client side be in apache that is listening in port 80,
  so I need call server side at port 8081 of tomcat.
  How can I do?
 
  If I run the aplication int tomcat, its works fine. But If I run the
  aplication in apache, the server side dont work.
 
  Help me please
  Thanks

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-20 Thread dablack
I borrowed that connector configuration from a website I came across.
I'm not sure why port=0 either. If I put more research into the NIO
connector I could probably find out. Why don't you try adding the
lines,

enableLookups=false
scheme=http

to the NIO connector configuration in the server.xml file that I gave
you earlier.

As far as accessing the ajp service using http://localhost:8009/servlet,
that will not work. Your browser uses the http protocol and the 8009
port is being serviced by the ajp protocol. You should still have your
connector using the http protocol configured to listen on port 8081.

Hopefully the scheme line above will help the NIO connector
communicate back to Apache.

On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
 I test your config, dablack, but I cant connect to the servlet.
 With this config I cant access not even to:http://localhost:8009/servlet
 that is tomcat directly without apache

 On 20 feb, 23:36, Fran fra...@gmail.com wrote:

  I cant undestand why this config:

  Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
  channelNioSocket.maxThreads=
  150
    channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
    channelNioSocket.bufferSize=16384 /

  Why port 0 ?

  2010/2/20 dablack david.blackwell...@gmail.com

   Fran,

   I'm really not an expert on setting up the connection between Apache
   and Tomcat but I believe that the connections only operate in two
   protocols: http or ajp. NIO is a Tomcat connector that can communicate
   in either http or ajp. Because of that, I don't see any reason that
   the Apache mod_jk connector module couldn't communicate with the NIO
   connector. Since I don't use an NIO connector I could be wrong, but
   that is the way I see it. As a starting point, try these
   configurations:

   server.xml

   Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
   channelNioSocket.maxThreads=150
     channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
     channelNioSocket.bufferSize=16384 /

   (You seem to want to use port 8081 which should be fine, but the
   standard ajp port is 8009. However, I wouldn't put it on port 8081 if
   you are already using that port for another protocol such as http.)

   httpd.conf

   LoadModule jk_module modules/mod_jk.so
   JkWorkersFile conf/workers.properties
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLevel info
   JkLogStampFormat [%a %b %d %H:%M:%S %Y]
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat %w %V %T
   JkMount /*.svc ajp13

   (For the JkMount I use *.svc because I use the svc extension for my
   GWT service target to differentiate service points from other files.)

   (For example, in my web.xml file I will map my service something like
   this to use the svc extension:
   servlet
     servlet-nameMyService/servlet-name
     servlet-classcom.mysite.server.MyServiceImpl/servlet-class
   /servlet
   servlet-mapping
     servlet-nameMyService/servlet-name
     url-pattern/MyService.svc/usr-pattern
   /servlet-mapping

   And in my GWT code I create my service target like this:

   target.setServiceEntryPoint( GWT.getModuleBaseURL() +
   MyService.svc );

   I did this because I had troubles with the 'JkMount /* ajp13' entry,
   but when I used /*.svc the problems cleared up.)

   workers.properties

   workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
   workers.java_home=/usr/java/jdk1.6.0_06
   worker.list=ajp13
   worker.ajp13.port=8009
   worker.ajp13.host=localhost
   worker.ajp13.type=ajp13
   worker.ajp13.lbfactor=1
   worker.loadbalancer.type=lb
   worker.loadbalancer.balance_workers=ajp13

   (Of course, match the ajp port in the workers.property file to the
   port you define in the server.xml file. Also, if your Tomcat is not on
   the same server as your Apache you will need to change the localhost
   host entry to the correct host URL.)

   I hope this helps.

   On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
Bad notices.

This dude has same problem that me and he was answered that mod_jk
dont support NIO

http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

:(

On 20 feb, 19:13, Fran fra...@gmail.com wrote:

 Here the error when I change the protocol of
 protocol=org.apache.coyote.http11.Http11NioProtocol to 
 protocol=AJP/
 1.3

 [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
 connection. No response has been sent to the client (yet)
 [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat failed.

 On 20 feb, 19:04, Fran fra...@gmail.com wrote:

  Should be due to protocol.
  My messenger seems that need NIO protocol but if I put the NIO
  protocol MOD_JK cant conect apache with tomcat

  If I use this tomcat config, mod_jk cant conect apache with tomcat.

  Connector
  connectionTimeout=2
  port=8081
  

Re: tomcat and apache problem

2010-02-20 Thread Fran
The problem persist with the news changes.
Seems that apache cant connect to tomcat :(
The error log of apache and mod_jk dont show nothing. Not ever nio conection
stablished

2010/2/21 dablack david.blackwell...@gmail.com

 I borrowed that connector configuration from a website I came across.
 I'm not sure why port=0 either. If I put more research into the NIO
 connector I could probably find out. Why don't you try adding the
 lines,

 enableLookups=false
 scheme=http

 to the NIO connector configuration in the server.xml file that I gave
 you earlier.

 As far as accessing the ajp service using http://localhost:8009/servlet,
 that will not work. Your browser uses the http protocol and the 8009
 port is being serviced by the ajp protocol. You should still have your
 connector using the http protocol configured to listen on port 8081.

 Hopefully the scheme line above will help the NIO connector
 communicate back to Apache.

 On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
  I test your config, dablack, but I cant connect to the servlet.
  With this config I cant access not even to:http://localhost:8009/servlet
  that is tomcat directly without apache
 
  On 20 feb, 23:36, Fran fra...@gmail.com wrote:
 
   I cant undestand why this config:
 
   Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
   channelNioSocket.maxThreads=
   150
 channelNioSocket.maxSpareThreads=50
   channelNioSocket.minSpareThreads=25
 channelNioSocket.bufferSize=16384 /
 
   Why port 0 ?
 
   2010/2/20 dablack david.blackwell...@gmail.com
 
Fran,
 
I'm really not an expert on setting up the connection between Apache
and Tomcat but I believe that the connections only operate in two
protocols: http or ajp. NIO is a Tomcat connector that can
 communicate
in either http or ajp. Because of that, I don't see any reason that
the Apache mod_jk connector module couldn't communicate with the NIO
connector. Since I don't use an NIO connector I could be wrong, but
that is the way I see it. As a starting point, try these
configurations:
 
server.xml
 
Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /
 
(You seem to want to use port 8081 which should be fine, but the
standard ajp port is 8009. However, I wouldn't put it on port 8081 if
you are already using that port for another protocol such as http.)
 
httpd.conf
 
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y]
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.svc ajp13
 
(For the JkMount I use *.svc because I use the svc extension for my
GWT service target to differentiate service points from other files.)
 
(For example, in my web.xml file I will map my service something like
this to use the svc extension:
servlet
  servlet-nameMyService/servlet-name
  servlet-classcom.mysite.server.MyServiceImpl/servlet-class
/servlet
servlet-mapping
  servlet-nameMyService/servlet-name
  url-pattern/MyService.svc/usr-pattern
/servlet-mapping
 
And in my GWT code I create my service target like this:
 
target.setServiceEntryPoint( GWT.getModuleBaseURL() +
MyService.svc );
 
I did this because I had troubles with the 'JkMount /* ajp13' entry,
but when I used /*.svc the problems cleared up.)
 
workers.properties
 
workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
workers.java_home=/usr/java/jdk1.6.0_06
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13
 
(Of course, match the ajp port in the workers.property file to the
port you define in the server.xml file. Also, if your Tomcat is not
 on
the same server as your Apache you will need to change the localhost
host entry to the correct host URL.)
 
I hope this helps.
 
On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
 Bad notices.
 
 This dude has same problem that me and he was answered that mod_jk
 dont support NIO
 
 http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html
 
 :(
 
 On 20 feb, 19:13, Fran fra...@gmail.com wrote:
 
  Here the error when I change the protocol of
  protocol=org.apache.coyote.http11.Http11NioProtocol to
 protocol=AJP/
  1.3
 
  [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or
 refused
  connection. No response has been sent to the client (yet)
  [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat
 failed.
 
  On 20 feb, 19:04, Fran 

Re: tomcat and apache problem

2010-02-20 Thread dablack
Sorry to lead you on a wild goose chase. I guess you will have to use
the Apache mod_proxy_http module with the Tomcat NIO connector using
the http protocol after all. I don't have any experience with the
mod_proxy_http module at all so not really anything I can help you
with.

Good luck.


On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:
 The problem persist with the news changes.
 Seems that apache cant connect to tomcat :(
 The error log of apache and mod_jk dont show nothing. Not ever nio conection
 stablished

 2010/2/21 dablack david.blackwell...@gmail.com

  I borrowed that connector configuration from a website I came across.
  I'm not sure why port=0 either. If I put more research into the NIO
  connector I could probably find out. Why don't you try adding the
  lines,

  enableLookups=false
  scheme=http

  to the NIO connector configuration in the server.xml file that I gave
  you earlier.

  As far as accessing the ajp service usinghttp://localhost:8009/servlet,
  that will not work. Your browser uses the http protocol and the 8009
  port is being serviced by the ajp protocol. You should still have your
  connector using the http protocol configured to listen on port 8081.

  Hopefully the scheme line above will help the NIO connector
  communicate back to Apache.

  On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
   I test your config, dablack, but I cant connect to the servlet.
   With this config I cant access not even to:http://localhost:8009/servlet
   that is tomcat directly without apache

   On 20 feb, 23:36, Fran fra...@gmail.com wrote:

I cant undestand why this config:

Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
channelNioSocket.maxThreads=
150
  channelNioSocket.maxSpareThreads=50
channelNioSocket.minSpareThreads=25
  channelNioSocket.bufferSize=16384 /

Why port 0 ?

2010/2/20 dablack david.blackwell...@gmail.com

 Fran,

 I'm really not an expert on setting up the connection between Apache
 and Tomcat but I believe that the connections only operate in two
 protocols: http or ajp. NIO is a Tomcat connector that can
  communicate
 in either http or ajp. Because of that, I don't see any reason that
 the Apache mod_jk connector module couldn't communicate with the NIO
 connector. Since I don't use an NIO connector I could be wrong, but
 that is the way I see it. As a starting point, try these
 configurations:

 server.xml

 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /

 (You seem to want to use port 8081 which should be fine, but the
 standard ajp port is 8009. However, I wouldn't put it on port 8081 if
 you are already using that port for another protocol such as http.)

 httpd.conf

 LoadModule jk_module modules/mod_jk.so
 JkWorkersFile conf/workers.properties
 JkLogFile /var/log/httpd/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y]
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T
 JkMount /*.svc ajp13

 (For the JkMount I use *.svc because I use the svc extension for my
 GWT service target to differentiate service points from other files.)

 (For example, in my web.xml file I will map my service something like
 this to use the svc extension:
 servlet
   servlet-nameMyService/servlet-name
   servlet-classcom.mysite.server.MyServiceImpl/servlet-class
 /servlet
 servlet-mapping
   servlet-nameMyService/servlet-name
   url-pattern/MyService.svc/usr-pattern
 /servlet-mapping

 And in my GWT code I create my service target like this:

 target.setServiceEntryPoint( GWT.getModuleBaseURL() +
 MyService.svc );

 I did this because I had troubles with the 'JkMount /* ajp13' entry,
 but when I used /*.svc the problems cleared up.)

 workers.properties

 workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
 workers.java_home=/usr/java/jdk1.6.0_06
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp13

 (Of course, match the ajp port in the workers.property file to the
 port you define in the server.xml file. Also, if your Tomcat is not
  on
 the same server as your Apache you will need to change the localhost
 host entry to the correct host URL.)

 I hope this helps.

 On Feb 20, 12:51 pm, Fran fra...@gmail.com wrote:
  Bad notices.

  This dude has same problem that me and he was answered that mod_jk
  dont support NIO

  http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html

  :(

  On 20 feb, 19:13, Fran 

Re: tomcat and apache problem

2010-02-20 Thread Martin D'Aloia
have you looked mod_rewrite (
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html ) ? doesn't it help
you?

Why you need that the client side runs on apache httpd and not in a tomcat?
do you have shared resources? if not, maybe you can let tomcat serve the
client side also and, if you need performance, look at APR for tomcat (
http://tomcat.apache.org/tomcat-6.0-doc/apr.html )


On Sat, Feb 20, 2010 at 11:21 PM, dablack david.blackwell...@gmail.comwrote:

 Sorry to lead you on a wild goose chase. I guess you will have to use
 the Apache mod_proxy_http module with the Tomcat NIO connector using
 the http protocol after all. I don't have any experience with the
 mod_proxy_http module at all so not really anything I can help you
 with.

 Good luck.


 On Feb 20, 7:21 pm, Fran fra...@gmail.com wrote:
  The problem persist with the news changes.
  Seems that apache cant connect to tomcat :(
  The error log of apache and mod_jk dont show nothing. Not ever nio
 conection
  stablished
 
  2010/2/21 dablack david.blackwell...@gmail.com
 
   I borrowed that connector configuration from a website I came across.
   I'm not sure why port=0 either. If I put more research into the NIO
   connector I could probably find out. Why don't you try adding the
   lines,
 
   enableLookups=false
   scheme=http
 
   to the NIO connector configuration in the server.xml file that I gave
   you earlier.
 
   As far as accessing the ajp service usinghttp://localhost:8009/servlet,
   that will not work. Your browser uses the http protocol and the 8009
   port is being serviced by the ajp protocol. You should still have your
   connector using the http protocol configured to listen on port 8081.
 
   Hopefully the scheme line above will help the NIO connector
   communicate back to Apache.
 
   On Feb 20, 4:45 pm, Fran fra...@gmail.com wrote:
I test your config, dablack, but I cant connect to the servlet.
With this config I cant access not even to:
 http://localhost:8009/servlet
that is tomcat directly without apache
 
On 20 feb, 23:36, Fran fra...@gmail.com wrote:
 
 I cant undestand why this config:
 
 Connector protocol=AJP/1.3 port=0 channelNioSocket.port=8009
 channelNioSocket.maxThreads=
 150
   channelNioSocket.maxSpareThreads=50
 channelNioSocket.minSpareThreads=25
   channelNioSocket.bufferSize=16384 /
 
 Why port 0 ?
 
 2010/2/20 dablack david.blackwell...@gmail.com
 
  Fran,
 
  I'm really not an expert on setting up the connection between
 Apache
  and Tomcat but I believe that the connections only operate in two
  protocols: http or ajp. NIO is a Tomcat connector that can
   communicate
  in either http or ajp. Because of that, I don't see any reason
 that
  the Apache mod_jk connector module couldn't communicate with the
 NIO
  connector. Since I don't use an NIO connector I could be wrong,
 but
  that is the way I see it. As a starting point, try these
  configurations:
 
  server.xml
 
  Connector protocol=AJP/1.3 port=0
 channelNioSocket.port=8009
  channelNioSocket.maxThreads=150
channelNioSocket.maxSpareThreads=50
  channelNioSocket.minSpareThreads=25
channelNioSocket.bufferSize=16384 /
 
  (You seem to want to use port 8081 which should be fine, but the
  standard ajp port is 8009. However, I wouldn't put it on port
 8081 if
  you are already using that port for another protocol such as
 http.)
 
  httpd.conf
 
  LoadModule jk_module modules/mod_jk.so
  JkWorkersFile conf/workers.properties
  JkLogFile /var/log/httpd/mod_jk.log
  JkLogLevel info
  JkLogStampFormat [%a %b %d %H:%M:%S %Y]
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  JkRequestLogFormat %w %V %T
  JkMount /*.svc ajp13
 
  (For the JkMount I use *.svc because I use the svc extension for
 my
  GWT service target to differentiate service points from other
 files.)
 
  (For example, in my web.xml file I will map my service something
 like
  this to use the svc extension:
  servlet
servlet-nameMyService/servlet-name
servlet-classcom.mysite.server.MyServiceImpl/servlet-class
  /servlet
  servlet-mapping
servlet-nameMyService/servlet-name
url-pattern/MyService.svc/usr-pattern
  /servlet-mapping
 
  And in my GWT code I create my service target like this:
 
  target.setServiceEntryPoint( GWT.getModuleBaseURL() +
  MyService.svc );
 
  I did this because I had troubles with the 'JkMount /* ajp13'
 entry,
  but when I used /*.svc the problems cleared up.)
 
  workers.properties
 
  workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
  workers.java_home=/usr/java/jdk1.6.0_06
  worker.list=ajp13
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
  worker.ajp13.lbfactor=1
  worker.loadbalancer.type=lb
  

Re: tomcat and apache problem

2010-02-19 Thread Fran
After some tests I can to confirm that the delay between Comet events
are constant.

Seems that Apache apply a timeout when conects to tomcat by Proxypass

Anyone know it?

On 19 feb, 02:04, Fran fra...@gmail.com wrote:
 anyone know the problem? please

 On 18 feb, 00:41, Fran fra...@gmail.com wrote:

  I use Comet that its Long polling.
  I think that the problem is a timeout that is applied by tomcat when
  apache conect the proxy to the tomcat.

  If I execute the aplication directly in tomcat. Its works fine.
  If I execute the aplication in apache and a proxypass to servlet, the
  aplication has a timeout between comet events that I dont understand.

  You can test it:

  Aplication in tomcat 
  directly:http://california.lirondo.com:8081/msn/Messenger.html
  --- It works very good (is needed to use diferents navegators for
  conect diferent users)
  Aplication in apache:http://california.lirondo.com/msn/Messenger.html
  -- If you are patient, you can test that works fine but is s slow

  Help please, thanks!

  On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:

   Hi,

   I don't have an Apache+Tomcat setup, so I can only guess what may be
   happening: There are two basic ways to do Comet.

   - Streaming (for one request, the server sends a few bytes, then later
   some more etc.)
   - Long polling (for one request, the server sends zero bytes
   initially, and just waits until it can send anything. When the client
   receives that response, it creates a new request.)

   Streaming is known not to work reliably, especially with proxies
   (unfortunately). Long polling also only works reliably, if you don't
   wait too long with your response.

   Even if you manage to set up your apache in a way that it works, you
   probably can't control how additional proxies etc (and also the
   browser) between your server and the client behave.

   Maybe this helps a little bit.
   Chris

   On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

anyone can help me please?

On 17 feb, 00:53, Fran fra...@gmail.com wrote:

 help me please

 On 16 feb, 19:54, Fran fra...@gmail.com wrote:

  I am using now Proxypass for apache. The config is:

  VirtualHost *:80
          ServerName california..com
          ServerAdmin webmas...@localhost
          DocumentRoot /var/www/
          ProxyRequests On
          Proxy *
                  Order deny,allow
                  Allow from all
          /Proxy
          ProxyPass 
  /app/com.apphttp://california..com:8081/app/com.app
          ProxyPassReverse 
  /app/com.apphttp://california..com:8081/app/com.app

          DirectoryIndex index.php
          AccessFileName .htaccess
  /VirtualHost

  The aplication is a Comet chat.
  With this configuration, the aplication executed from apache works 
  but
  some message lost.
  The error log shows:

  [error] [client ] proxy: error reading status line from 
  remote
  server california..com, 
  referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
  [error] [client ] ] proxy: Error reading from remote server
  returned by /app/com.app/messenger, 
  referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

  I read in some forum that is needed the lines in Location directive 
  of
  apache:

  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1

  If I put this, the aplications is beeing more and more slowly.

  Someone can tell me a solutions please :(

  On 15 feb, 22:47, Fran fra...@gmail.com wrote:

   Hello,

   I need your help about GWT integration in apache and tomcat.

   I have a GWT aplication that has server side. This server side is
   listening in 8081 port at tomcat.
   I need that the client side be in apache that is listening in 
   port 80,
   so I need call server side at port 8081 of tomcat.
   How can I do?

   If I run the aplication int tomcat, its works fine. But If I run 
   the
   aplication in apache, the server side dont work.

   Help me please
   Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-19 Thread Chris Lercher
I'd take a look at this:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxytimeout

Or you add parameters to your ProxyPass directive
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass



On Feb 19, 3:17 pm, Fran fra...@gmail.com wrote:
 After some tests I can to confirm that the delay between Comet events
 are constant.

 Seems that Apache apply a timeout when conects to tomcat by Proxypass

 Anyone know it?

 On 19 feb, 02:04, Fran fra...@gmail.com wrote:



  anyone know the problem? please

  On 18 feb, 00:41, Fran fra...@gmail.com wrote:

   I use Comet that its Long polling.
   I think that the problem is a timeout that is applied by tomcat when
   apache conect the proxy to the tomcat.

   If I execute the aplication directly in tomcat. Its works fine.
   If I execute the aplication in apache and a proxypass to servlet, the
   aplication has a timeout between comet events that I dont understand.

   You can test it:

   Aplication in tomcat 
   directly:http://california.lirondo.com:8081/msn/Messenger.html
   --- It works very good (is needed to use diferents navegators for
   conect diferent users)
   Aplication in apache:http://california.lirondo.com/msn/Messenger.html
   -- If you are patient, you can test that works fine but is s slow

   Help please, thanks!

   On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:

Hi,

I don't have an Apache+Tomcat setup, so I can only guess what may be
happening: There are two basic ways to do Comet.

- Streaming (for one request, the server sends a few bytes, then later
some more etc.)
- Long polling (for one request, the server sends zero bytes
initially, and just waits until it can send anything. When the client
receives that response, it creates a new request.)

Streaming is known not to work reliably, especially with proxies
(unfortunately). Long polling also only works reliably, if you don't
wait too long with your response.

Even if you manage to set up your apache in a way that it works, you
probably can't control how additional proxies etc (and also the
browser) between your server and the client behave.

Maybe this helps a little bit.
Chris

On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

 anyone can help me please?

 On 17 feb, 00:53, Fran fra...@gmail.com wrote:

  help me please

  On 16 feb, 19:54, Fran fra...@gmail.com wrote:

   I am using now Proxypass for apache. The config is:

   VirtualHost *:80
           ServerName california..com
           ServerAdmin webmas...@localhost
           DocumentRoot /var/www/
           ProxyRequests On
           Proxy *
                   Order deny,allow
                   Allow from all
           /Proxy
           ProxyPass 
   /app/com.apphttp://california..com:8081/app/com.app
           ProxyPassReverse 
   /app/com.apphttp://california..com:8081/app/com.app

           DirectoryIndex index.php
           AccessFileName .htaccess
   /VirtualHost

   The aplication is a Comet chat.
   With this configuration, the aplication executed from apache 
   works but
   some message lost.
   The error log shows:

   [error] [client ] proxy: error reading status line from 
   remote
   server california..com, 
   referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
   [error] [client ] ] proxy: Error reading from remote 
   server
   returned by /app/com.app/messenger, 
   referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

   I read in some forum that is needed the lines in Location 
   directive of
   apache:

   SetEnv force-proxy-request-1.0 1
   SetEnv proxy-nokeepalive 1

   If I put this, the aplications is beeing more and more slowly.

   Someone can tell me a solutions please :(

   On 15 feb, 22:47, Fran fra...@gmail.com wrote:

Hello,

I need your help about GWT integration in apache and tomcat.

I have a GWT aplication that has server side. This server side 
is
listening in 8081 port at tomcat.
I need that the client side be in apache that is listening in 
port 80,
so I need call server side at port 8081 of tomcat.
How can I do?

If I run the aplication int tomcat, its works fine. But If I 
run the
aplication in apache, the server side dont work.

Help me please
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 

Re: tomcat and apache problem

2010-02-19 Thread Fran
Thanks Chris,

I put the ProxyTimeout directive to 1 and now seems that the
aplications have timeout 1.
Now the problem is that the aplication close the conection and dont is
hearing the future comet events

:(

On 19 feb, 15:29, Chris Lercher cl_for_mail...@gmx.net wrote:
 I'd take a look at 
 this:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxytimeout

 Or you add parameters to your ProxyPass 
 directivehttp://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

 On Feb 19, 3:17 pm, Fran fra...@gmail.com wrote:

  After some tests I can to confirm that the delay between Comet events
  are constant.

  Seems that Apache apply a timeout when conects to tomcat by Proxypass

  Anyone know it?

  On 19 feb, 02:04, Fran fra...@gmail.com wrote:

   anyone know the problem? please

   On 18 feb, 00:41, Fran fra...@gmail.com wrote:

I use Comet that its Long polling.
I think that the problem is a timeout that is applied by tomcat when
apache conect the proxy to the tomcat.

If I execute the aplication directly in tomcat. Its works fine.
If I execute the aplication in apache and a proxypass to servlet, the
aplication has a timeout between comet events that I dont understand.

You can test it:

Aplication in tomcat 
directly:http://california.lirondo.com:8081/msn/Messenger.html
--- It works very good (is needed to use diferents navegators for
conect diferent users)
Aplication in apache:http://california.lirondo.com/msn/Messenger.html
-- If you are patient, you can test that works fine but is s slow

Help please, thanks!

On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:

 Hi,

 I don't have an Apache+Tomcat setup, so I can only guess what may be
 happening: There are two basic ways to do Comet.

 - Streaming (for one request, the server sends a few bytes, then later
 some more etc.)
 - Long polling (for one request, the server sends zero bytes
 initially, and just waits until it can send anything. When the client
 receives that response, it creates a new request.)

 Streaming is known not to work reliably, especially with proxies
 (unfortunately). Long polling also only works reliably, if you don't
 wait too long with your response.

 Even if you manage to set up your apache in a way that it works, you
 probably can't control how additional proxies etc (and also the
 browser) between your server and the client behave.

 Maybe this helps a little bit.
 Chris

 On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

  anyone can help me please?

  On 17 feb, 00:53, Fran fra...@gmail.com wrote:

   help me please

   On 16 feb, 19:54, Fran fra...@gmail.com wrote:

I am using now Proxypass for apache. The config is:

VirtualHost *:80
        ServerName california..com
        ServerAdmin webmas...@localhost
        DocumentRoot /var/www/
        ProxyRequests On
        Proxy *
                Order deny,allow
                Allow from all
        /Proxy
        ProxyPass 
/app/com.apphttp://california..com:8081/app/com.app
        ProxyPassReverse 
/app/com.apphttp://california..com:8081/app/com.app

        DirectoryIndex index.php
        AccessFileName .htaccess
/VirtualHost

The aplication is a Comet chat.
With this configuration, the aplication executed from apache 
works but
some message lost.
The error log shows:

[error] [client ] proxy: error reading status line from 
remote
server california..com, 
referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
[error] [client ] ] proxy: Error reading from remote 
server
returned by /app/com.app/messenger, 
referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

I read in some forum that is needed the lines in Location 
directive of
apache:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

If I put this, the aplications is beeing more and more slowly.

Someone can tell me a solutions please :(

On 15 feb, 22:47, Fran fra...@gmail.com wrote:

 Hello,

 I need your help about GWT integration in apache and tomcat.

 I have a GWT aplication that has server side. This server 
 side is
 listening in 8081 port at tomcat.
 I need that the client side be in apache that is listening in 
 port 80,
 so I need call server side at port 8081 of tomcat.
 How can I do?

 If I run the aplication int tomcat, its works fine. But If I 
 run the
 aplication in apache, the server side dont work.

 Help me please
 

Re: tomcat and apache problem

2010-02-19 Thread Chris Lercher
The timeout for your connections should be _shorter_ than the
ProxyTimeout, so setting it to 1 second may not be an ideal choice...


On Feb 20, 1:29 am, Fran fra...@gmail.com wrote:
 Thanks Chris,

 I put the ProxyTimeout directive to 1 and now seems that the
 aplications have timeout 1.
 Now the problem is that the aplication close the conection and dont is
 hearing the future comet events

 :(

 On 19 feb, 15:29, Chris Lercher cl_for_mail...@gmx.net wrote:



  I'd take a look at 
  this:http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxytimeout

  Or you add parameters to your ProxyPass 
  directivehttp://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

  On Feb 19, 3:17 pm, Fran fra...@gmail.com wrote:

   After some tests I can to confirm that the delay between Comet events
   are constant.

   Seems that Apache apply a timeout when conects to tomcat by Proxypass

   Anyone know it?

   On 19 feb, 02:04, Fran fra...@gmail.com wrote:

anyone know the problem? please

On 18 feb, 00:41, Fran fra...@gmail.com wrote:

 I use Comet that its Long polling.
 I think that the problem is a timeout that is applied by tomcat when
 apache conect the proxy to the tomcat.

 If I execute the aplication directly in tomcat. Its works fine.
 If I execute the aplication in apache and a proxypass to servlet, the
 aplication has a timeout between comet events that I dont understand.

 You can test it:

 Aplication in tomcat 
 directly:http://california.lirondo.com:8081/msn/Messenger.html
 --- It works very good (is needed to use diferents navegators for
 conect diferent users)
 Aplication in apache:http://california.lirondo.com/msn/Messenger.html
 -- If you are patient, you can test that works fine but is s slow

 Help please, thanks!

 On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:

  Hi,

  I don't have an Apache+Tomcat setup, so I can only guess what may be
  happening: There are two basic ways to do Comet.

  - Streaming (for one request, the server sends a few bytes, then 
  later
  some more etc.)
  - Long polling (for one request, the server sends zero bytes
  initially, and just waits until it can send anything. When the 
  client
  receives that response, it creates a new request.)

  Streaming is known not to work reliably, especially with proxies
  (unfortunately). Long polling also only works reliably, if you don't
  wait too long with your response.

  Even if you manage to set up your apache in a way that it works, you
  probably can't control how additional proxies etc (and also the
  browser) between your server and the client behave.

  Maybe this helps a little bit.
  Chris

  On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

   anyone can help me please?

   On 17 feb, 00:53, Fran fra...@gmail.com wrote:

help me please

On 16 feb, 19:54, Fran fra...@gmail.com wrote:

 I am using now Proxypass for apache. The config is:

 VirtualHost *:80
         ServerName california..com
         ServerAdmin webmas...@localhost
         DocumentRoot /var/www/
         ProxyRequests On
         Proxy *
                 Order deny,allow
                 Allow from all
         /Proxy
         ProxyPass 
 /app/com.apphttp://california..com:8081/app/com.app
         ProxyPassReverse 
 /app/com.apphttp://california..com:8081/app/com.app

         DirectoryIndex index.php
         AccessFileName .htaccess
 /VirtualHost

 The aplication is a Comet chat.
 With this configuration, the aplication executed from apache 
 works but
 some message lost.
 The error log shows:

 [error] [client ] proxy: error reading status line 
 from remote
 server california..com, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
 [error] [client ] ] proxy: Error reading from remote 
 server
 returned by /app/com.app/messenger, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

 I read in some forum that is needed the lines in Location 
 directive of
 apache:

 SetEnv force-proxy-request-1.0 1
 SetEnv proxy-nokeepalive 1

 If I put this, the aplications is beeing more and more slowly.

 Someone can tell me a solutions please :(

 On 15 feb, 22:47, Fran fra...@gmail.com wrote:

  Hello,

  I need your help about GWT integration in apache and tomcat.

  I have a GWT aplication that has server side. This server 
  side is
  listening in 8081 port at tomcat.
  I need that the client side be in apache that is 

Re: tomcat and apache problem

2010-02-19 Thread Chris Lercher
BTW, here's a link about timeouts + Comet:
http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-19 Thread Fran
If I dont put a short timeout, the aplication isnt good.
Do you imagine that the MSN Messenger delay 15 seconds to show you the
contact list?

I need that the solution works as the aplication in tomcat. If I
execute the aplication on tomcat, it work without timeout. So I need
when the aplication works in apache, seems that is working in tomcat.

Im going to show the url that you tell me. Thanks!

On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:
 BTW, here's a link about timeouts + 
 Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-19 Thread Fran
I finally read it but seems that they cant help me. They arent use my
technical that is a Comet long polling technique.

I am reading the apache log and I find a curious error:

[error] [client 127.0.0.1] (OS 10060)A connection attempt failed
because the connected party did not properly respond after a period of
time, or established connection failed because connected host has
failed to respond.  : proxy: error reading response

It could be the cause of the conection close last the reception of the
first comet event.


On 20 feb, 02:08, Fran fra...@gmail.com wrote:
 If I dont put a short timeout, the aplication isnt good.
 Do you imagine that the MSN Messenger delay 15 seconds to show you the
 contact list?

 I need that the solution works as the aplication in tomcat. If I
 execute the aplication on tomcat, it work without timeout. So I need
 when the aplication works in apache, seems that is working in tomcat.

 Im going to show the url that you tell me. Thanks!

 On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

  BTW, here's a link about timeouts + 
  Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-19 Thread dablack
Fran,

I use an Apache/Tomcat configuration and am very satisfied with its
performance; however, I use the mod_jk module rather than the
mod_proxy module. Have you looked into using the mod_jk module? With
it the communication between Apache and Tomcat are instantaneous. The
link http://tomcat.apache.org/connectors-doc/ can help you get more
information on this module and how to get it and use it. If you are
interested, I would be happy to share excerpts from my configuration
files to show how I've configured the connection.

On Feb 19, 7:24 pm, Fran fra...@gmail.com wrote:
 I finally read it but seems that they cant help me. They arent use my
 technical that is a Comet long polling technique.

 I am reading the apache log and I find a curious error:

 [error] [client 127.0.0.1] (OS 10060)A connection attempt failed
 because the connected party did not properly respond after a period of
 time, or established connection failed because connected host has
 failed to respond.  : proxy: error reading response

 It could be the cause of the conection close last the reception of the
 first comet event.

 On 20 feb, 02:08, Fran fra...@gmail.com wrote:

  If I dont put a short timeout, the aplication isnt good.
  Do you imagine that the MSN Messenger delay 15 seconds to show you the
  contact list?

  I need that the solution works as the aplication in tomcat. If I
  execute the aplication on tomcat, it work without timeout. So I need
  when the aplication works in apache, seems that is working in tomcat.

  Im going to show the url that you tell me. Thanks!

  On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:

   BTW, here's a link about timeouts + 
   Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-19 Thread Chris Lercher
The timeout is for the max time the app server gets to respond. If it
closes the connection earlier (which it should do, once it sends its
response), then the delay is shorter. This is what long polling is all
about. So if you set the delay to 15 seconds, it doesn't mean you have
to wait for 15 seconds every time. That's only, when the server
doesn't send the response within 15 seconds.

But as dablack says, probably mod_jk is the better solution anyway.
However, like I said earlier, there may be additional proxies between
your server and the client. So if it doesn't work correctly with
mod_proxy, this could indicate, that there is some problem in the way
the app server and the client interact. I have the feeling, that the
server maybe doesn't close its connection, so the proxy won't (always)
flush its contents. This triggers a timeout on the proxy or on the
client (depending on which is shorter).

On Feb 20, 2:08 am, Fran fra...@gmail.com wrote:
 If I dont put a short timeout, the aplication isnt good.
 Do you imagine that the MSN Messenger delay 15 seconds to show you the
 contact list?

 I need that the solution works as the aplication in tomcat. If I
 execute the aplication on tomcat, it work without timeout. So I need
 when the aplication works in apache, seems that is working in tomcat.

 Im going to show the url that you tell me. Thanks!

 On 20 feb, 01:57, Chris Lercher cl_for_mail...@gmx.net wrote:



  BTW, here's a link about timeouts + 
  Comet:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-18 Thread Fran
anyone know the problem? please

On 18 feb, 00:41, Fran fra...@gmail.com wrote:
 I use Comet that its Long polling.
 I think that the problem is a timeout that is applied by tomcat when
 apache conect the proxy to the tomcat.

 If I execute the aplication directly in tomcat. Its works fine.
 If I execute the aplication in apache and a proxypass to servlet, the
 aplication has a timeout between comet events that I dont understand.

 You can test it:

 Aplication in tomcat 
 directly:http://california.lirondo.com:8081/msn/Messenger.html
 --- It works very good (is needed to use diferents navegators for
 conect diferent users)
 Aplication in apache:http://california.lirondo.com/msn/Messenger.html
 -- If you are patient, you can test that works fine but is s slow

 Help please, thanks!

 On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:

  Hi,

  I don't have an Apache+Tomcat setup, so I can only guess what may be
  happening: There are two basic ways to do Comet.

  - Streaming (for one request, the server sends a few bytes, then later
  some more etc.)
  - Long polling (for one request, the server sends zero bytes
  initially, and just waits until it can send anything. When the client
  receives that response, it creates a new request.)

  Streaming is known not to work reliably, especially with proxies
  (unfortunately). Long polling also only works reliably, if you don't
  wait too long with your response.

  Even if you manage to set up your apache in a way that it works, you
  probably can't control how additional proxies etc (and also the
  browser) between your server and the client behave.

  Maybe this helps a little bit.
  Chris

  On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

   anyone can help me please?

   On 17 feb, 00:53, Fran fra...@gmail.com wrote:

help me please

On 16 feb, 19:54, Fran fra...@gmail.com wrote:

 I am using now Proxypass for apache. The config is:

 VirtualHost *:80
         ServerName california..com
         ServerAdmin webmas...@localhost
         DocumentRoot /var/www/
         ProxyRequests On
         Proxy *
                 Order deny,allow
                 Allow from all
         /Proxy
         ProxyPass 
 /app/com.apphttp://california..com:8081/app/com.app
         ProxyPassReverse 
 /app/com.apphttp://california..com:8081/app/com.app

         DirectoryIndex index.php
         AccessFileName .htaccess
 /VirtualHost

 The aplication is a Comet chat.
 With this configuration, the aplication executed from apache works but
 some message lost.
 The error log shows:

 [error] [client ] proxy: error reading status line from remote
 server california..com, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
 [error] [client ] ] proxy: Error reading from remote server
 returned by /app/com.app/messenger, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

 I read in some forum that is needed the lines in Location directive of
 apache:

 SetEnv force-proxy-request-1.0 1
 SetEnv proxy-nokeepalive 1

 If I put this, the aplications is beeing more and more slowly.

 Someone can tell me a solutions please :(

 On 15 feb, 22:47, Fran fra...@gmail.com wrote:

  Hello,

  I need your help about GWT integration in apache and tomcat.

  I have a GWT aplication that has server side. This server side is
  listening in 8081 port at tomcat.
  I need that the client side be in apache that is listening in port 
  80,
  so I need call server side at port 8081 of tomcat.
  How can I do?

  If I run the aplication int tomcat, its works fine. But If I run the
  aplication in apache, the server side dont work.

  Help me please
  Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-17 Thread Fran
anyone can help me please?

On 17 feb, 00:53, Fran fra...@gmail.com wrote:
 help me please

 On 16 feb, 19:54, Fran fra...@gmail.com wrote:

  I am using now Proxypass for apache. The config is:

  VirtualHost *:80
          ServerName california..com
          ServerAdmin webmas...@localhost
          DocumentRoot /var/www/
          ProxyRequests On
          Proxy *
                  Order deny,allow
                  Allow from all
          /Proxy
          ProxyPass /app/com.apphttp://california..com:8081/app/com.app
          ProxyPassReverse 
  /app/com.apphttp://california..com:8081/app/com.app

          DirectoryIndex index.php
          AccessFileName .htaccess
  /VirtualHost

  The aplication is a Comet chat.
  With this configuration, the aplication executed from apache works but
  some message lost.
  The error log shows:

  [error] [client ] proxy: error reading status line from remote
  server california..com, 
  referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
  [error] [client ] ] proxy: Error reading from remote server
  returned by /app/com.app/messenger, 
  referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

  I read in some forum that is needed the lines in Location directive of
  apache:

  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1

  If I put this, the aplications is beeing more and more slowly.

  Someone can tell me a solutions please :(

  On 15 feb, 22:47, Fran fra...@gmail.com wrote:

   Hello,

   I need your help about GWT integration in apache and tomcat.

   I have a GWT aplication that has server side. This server side is
   listening in 8081 port at tomcat.
   I need that the client side be in apache that is listening in port 80,
   so I need call server side at port 8081 of tomcat.
   How can I do?

   If I run the aplication int tomcat, its works fine. But If I run the
   aplication in apache, the server side dont work.

   Help me please
   Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-17 Thread Chris Lercher
Hi,

I don't have an Apache+Tomcat setup, so I can only guess what may be
happening: There are two basic ways to do Comet.

- Streaming (for one request, the server sends a few bytes, then later
some more etc.)
- Long polling (for one request, the server sends zero bytes
initially, and just waits until it can send anything. When the client
receives that response, it creates a new request.)

Streaming is known not to work reliably, especially with proxies
(unfortunately). Long polling also only works reliably, if you don't
wait too long with your response.

Even if you manage to set up your apache in a way that it works, you
probably can't control how additional proxies etc (and also the
browser) between your server and the client behave.

Maybe this helps a little bit.
Chris

On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:
 anyone can help me please?

 On 17 feb, 00:53, Fran fra...@gmail.com wrote:



  help me please

  On 16 feb, 19:54, Fran fra...@gmail.com wrote:

   I am using now Proxypass for apache. The config is:

   VirtualHost *:80
           ServerName california..com
           ServerAdmin webmas...@localhost
           DocumentRoot /var/www/
           ProxyRequests On
           Proxy *
                   Order deny,allow
                   Allow from all
           /Proxy
           ProxyPass /app/com.apphttp://california..com:8081/app/com.app
           ProxyPassReverse 
   /app/com.apphttp://california..com:8081/app/com.app

           DirectoryIndex index.php
           AccessFileName .htaccess
   /VirtualHost

   The aplication is a Comet chat.
   With this configuration, the aplication executed from apache works but
   some message lost.
   The error log shows:

   [error] [client ] proxy: error reading status line from remote
   server california..com, 
   referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
   [error] [client ] ] proxy: Error reading from remote server
   returned by /app/com.app/messenger, 
   referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

   I read in some forum that is needed the lines in Location directive of
   apache:

   SetEnv force-proxy-request-1.0 1
   SetEnv proxy-nokeepalive 1

   If I put this, the aplications is beeing more and more slowly.

   Someone can tell me a solutions please :(

   On 15 feb, 22:47, Fran fra...@gmail.com wrote:

Hello,

I need your help about GWT integration in apache and tomcat.

I have a GWT aplication that has server side. This server side is
listening in 8081 port at tomcat.
I need that the client side be in apache that is listening in port 80,
so I need call server side at port 8081 of tomcat.
How can I do?

If I run the aplication int tomcat, its works fine. But If I run the
aplication in apache, the server side dont work.

Help me please
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-17 Thread Fran
I use Comet that its Long polling.
I think that the problem is a timeout that is applied by tomcat when
apache conect the proxy to the tomcat.

If I execute the aplication directly in tomcat. Its works fine.
If I execute the aplication in apache and a proxypass to servlet, the
aplication has a timeout between comet events that I dont understand.

You can test it:

Aplication in tomcat directly: 
http://california.lirondo.com:8081/msn/Messenger.html
--- It works very good (is needed to use diferents navegators for
conect diferent users)
Aplication in apache: http://california.lirondo.com/msn/Messenger.html
-- If you are patient, you can test that works fine but is s slow


Help please, thanks!



On 17 feb, 23:46, Chris Lercher cl_for_mail...@gmx.net wrote:
 Hi,

 I don't have an Apache+Tomcat setup, so I can only guess what may be
 happening: There are two basic ways to do Comet.

 - Streaming (for one request, the server sends a few bytes, then later
 some more etc.)
 - Long polling (for one request, the server sends zero bytes
 initially, and just waits until it can send anything. When the client
 receives that response, it creates a new request.)

 Streaming is known not to work reliably, especially with proxies
 (unfortunately). Long polling also only works reliably, if you don't
 wait too long with your response.

 Even if you manage to set up your apache in a way that it works, you
 probably can't control how additional proxies etc (and also the
 browser) between your server and the client behave.

 Maybe this helps a little bit.
 Chris

 On Feb 17, 8:56 pm, Fran fra...@gmail.com wrote:

  anyone can help me please?

  On 17 feb, 00:53, Fran fra...@gmail.com wrote:

   help me please

   On 16 feb, 19:54, Fran fra...@gmail.com wrote:

I am using now Proxypass for apache. The config is:

VirtualHost *:80
        ServerName california..com
        ServerAdmin webmas...@localhost
        DocumentRoot /var/www/
        ProxyRequests On
        Proxy *
                Order deny,allow
                Allow from all
        /Proxy
        ProxyPass 
/app/com.apphttp://california..com:8081/app/com.app
        ProxyPassReverse 
/app/com.apphttp://california..com:8081/app/com.app

        DirectoryIndex index.php
        AccessFileName .htaccess
/VirtualHost

The aplication is a Comet chat.
With this configuration, the aplication executed from apache works but
some message lost.
The error log shows:

[error] [client ] proxy: error reading status line from remote
server california..com, 
referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
[error] [client ] ] proxy: Error reading from remote server
returned by /app/com.app/messenger, 
referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

I read in some forum that is needed the lines in Location directive of
apache:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

If I put this, the aplications is beeing more and more slowly.

Someone can tell me a solutions please :(

On 15 feb, 22:47, Fran fra...@gmail.com wrote:

 Hello,

 I need your help about GWT integration in apache and tomcat.

 I have a GWT aplication that has server side. This server side is
 listening in 8081 port at tomcat.
 I need that the client side be in apache that is listening in port 80,
 so I need call server side at port 8081 of tomcat.
 How can I do?

 If I run the aplication int tomcat, its works fine. But If I run the
 aplication in apache, the server side dont work.

 Help me please
 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



tomcat and apache problem

2010-02-16 Thread Fran
Hello,

I need your help about GWT integration in apache and tomcat.

I have a GWT aplication that has server side. This server side is
listening in 8081 port at tomcat.
I need that the client side be in apache that is listening in port 80,
so I need call server side at port 8081 of tomcat.
How can I do?

If I run the aplication int tomcat, its works fine. But If I run the
aplication in apache, the server side dont work.

Help me please
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-16 Thread Fran
I am using now Proxypass for apache. The config is:

VirtualHost *:80
ServerName california..com
ServerAdmin webmas...@localhost
DocumentRoot /var/www/
ProxyRequests On
Proxy *
Order deny,allow
Allow from all
/Proxy
ProxyPass /app/com.app http://california..com:8081/app/com.app
ProxyPassReverse /app/com.app 
http://california..com:8081/app/com.app

DirectoryIndex index.php
AccessFileName .htaccess
/VirtualHost

The aplication is a Comet chat.
With this configuration, the aplication executed from apache works but
some message lost.
The error log shows:

[error] [client ] proxy: error reading status line from remote
server california..com, referer:
http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E73A.cache.html
[error] [client ] ] proxy: Error reading from remote server
returned by /app/com.app/messenger, referer:
http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E73A.cache.html


I read in some forum that is needed the lines in Location directive of
apache:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

If I put this, the aplications is beeing more and more slowly.


Someone can tell me a solutions please :(

On 15 feb, 22:47, Fran fra...@gmail.com wrote:
 Hello,

 I need your help about GWT integration in apache and tomcat.

 I have a GWT aplication that has server side. This server side is
 listening in 8081 port at tomcat.
 I need that the client side be in apache that is listening in port 80,
 so I need call server side at port 8081 of tomcat.
 How can I do?

 If I run the aplication int tomcat, its works fine. But If I run the
 aplication in apache, the server side dont work.

 Help me please
 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: tomcat and apache problem

2010-02-16 Thread Fran
help me please

On 16 feb, 19:54, Fran fra...@gmail.com wrote:
 I am using now Proxypass for apache. The config is:

 VirtualHost *:80
         ServerName california..com
         ServerAdmin webmas...@localhost
         DocumentRoot /var/www/
         ProxyRequests On
         Proxy *
                 Order deny,allow
                 Allow from all
         /Proxy
         ProxyPass /app/com.apphttp://california..com:8081/app/com.app
         ProxyPassReverse 
 /app/com.apphttp://california..com:8081/app/com.app

         DirectoryIndex index.php
         AccessFileName .htaccess
 /VirtualHost

 The aplication is a Comet chat.
 With this configuration, the aplication executed from apache works but
 some message lost.
 The error log shows:

 [error] [client ] proxy: error reading status line from remote
 server california..com, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...
 [error] [client ] ] proxy: Error reading from remote server
 returned by /app/com.app/messenger, 
 referer:http://california..com/app/com.app/2179BCD97ED1043BAEE2BAA974B2E7...

 I read in some forum that is needed the lines in Location directive of
 apache:

 SetEnv force-proxy-request-1.0 1
 SetEnv proxy-nokeepalive 1

 If I put this, the aplications is beeing more and more slowly.

 Someone can tell me a solutions please :(

 On 15 feb, 22:47, Fran fra...@gmail.com wrote:

  Hello,

  I need your help about GWT integration in apache and tomcat.

  I have a GWT aplication that has server side. This server side is
  listening in 8081 port at tomcat.
  I need that the client side be in apache that is listening in port 80,
  so I need call server side at port 8081 of tomcat.
  How can I do?

  If I run the aplication int tomcat, its works fine. But If I run the
  aplication in apache, the server side dont work.

  Help me please
  Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.