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 <[email protected]> > 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-name>MyService</servlet-name> > <servlet-class>com.mysite.server.MyServiceImpl</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>MyService</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 <[email protected]> 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/[email protected]/msg67701.html > > > > :( > > > > On 20 feb, 19:13, Fran <[email protected]> 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 <[email protected]> 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="20000" > > > > 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 <[email protected]> wrote: > > > > > > > I am configuring mod_jk > > > > > > > For tomat, in server.xml : > > > > > > > <Connector > > > > > connectionTimeout="20000" > > > > > 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
