What could be the cause of defunct tomcat7 process ?
I was running tomcat7 production server for several days, and then suddenly it was **unreachable** by the http port. Strangely though, the background processes **were still running** as can be seen by the logs. So i tried to stop tomcat7 using `invoke-rc.d tomcat7 stop` from my *debian wheezy* box. But still the process is still there, with the defunct flag. I tried `kill -9 pid` and `killall -9 java`, but still the process is there - still occupying the port, causing me cannot start a new tomcat with the port is already used error. I had to reboot. And everything is normal from there. But i'm curious of what might cause this kind of situation ? There's no big loads whatsoever. Only some background processes running, scraping. I can see nothing suspicious from the logs. What should i do if this happens again to get to the **real cause** and fix it ? Here's my connector settings : Connector port=8080 address=127.0.0.1 maxParameterCount=500 maxPostSize=25 scheme=http secure=false protocol=org.apache.coyote.http11.Http11AprProtocol connectionTimeout=2 disableUploadTimeout=false connectionUploadTimeout=30 maxThreads=500 processorCache=500 URIEncoding=UTF-8 / My tomcat version : **7.0.28-4+deb7u1** My VM args : JAVA_OPTS=-Djava.awt.headless=true -Dspring.profiles.active=background,production -XX:-UseSplitVerifier -javaagent:/var/lib/tomcat7/spring-instrument-3.2.3.RELEASE.jar -server -Xms4G -Xmx4G -XX:MaxPermSize=128m -XX:+DisableExplicitGC -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tomcat7/dump -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -Djava.net.preferIPv4Stack=true jdk version : **7u60** -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: [OT] [Fwd: TomEE Professional Support]
I also got it. What i did was clicking on the unsubscribe button and gave mailchimp the reason why. On Wed, Nov 13, 2013 at 8:56 PM, Leon Rosenberg rosenberg.l...@gmail.comwrote: I got it too. I think its easier to delete and forget it, as to debate about it. ;-) regards Leon On Wed, Nov 13, 2013 at 2:15 PM, André Warnier a...@ice-sa.com wrote: Hi. I got the following email in my personal email inbox. Isn't there some rule, or at least some matter of self-control, in not using email addresses collected on this list for commercial promotion ? Original Message From: - Wed Nov 13 13:48:37 2013 X-Mozilla-Status: 0001 X-Mozilla-Status2: Return-Path: bounce-mc.us3_22715643.227889-aw=ice-sa.com@mail173. us4.mcsv.net X-Original-To: a...@ice-sa.com Delivered-To: andre.warn...@ice-sa.com Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=205.201.128.173; helo=mail173.us4.mcsv.net; envelope-from=bounce-mc.us3_22715643.227889-aw=ice-sa.com@ mail173.us4.mcsv.net; receiver=a...@ice-sa.com Received: from mail173.us4.mcsv.net (mail173.us4.mcsv.net[205.201.128.173]) by tor.combios.es (Postfix) with ESMTP id DCFAB3C0AD2 for a...@ice-sa.com ; Wed, 13 Nov 2013 13:48:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=k1; d= mail173.us4.mcsv.net; h=Subject:From:Reply-To:To:Date:Message-ID:List- Unsubscribe:Sender:Content-Type:MIME-Version; i=gurkanerdogdu=3Dyahoo.com@ mail173.us4.mcsv.net; bh=Mxp5nGTBAhJ4tiDlAEgNxpJYWwM=; b=Ocyx3ymgzmK11vA3/+524g885jWe0hlVlLQwFLGw052EepxX/u3JqrGTIZv6+afps8yWKhHqpMRz DR1JqSg9JPIfmn6xVzPvr5X/5Ve5g78ZKmZm5BmxmCRNyqB4fIc5+iLuIas31KKRImjm5cpEh8P5 RAauIo5RquVVHcBgVbU= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=k1; d= mail173.us4.mcsv.net; b=BmLvRK7R5zl2/VRFdLZ09BJy50nOQFBXLcUoHLPQqfO o7DkgQbmi8Ug7bwNHNpotAwBLuXBIp2sW w8nzt6XeIcHys59itcvcLBKCt6zoR1 vBv1RFw1OMSwlwuilV8u0zcNtNcav+LdWoW8zAnksyWOWL /knOPWkSMr9PbtPhtB4=; Received: from (127.0.0.1) by mail173.us4.mcsv.net id hgdqg0174lg1 for a...@ice-sa.com; Wed, 13 Nov 2013 12:47:58 + (envelope-from bounce-mc.us3_22715643.227889-aw=ice-sa@mail173.us4.mcsv.net) Subject: TomEE Professional Support From: Apache TomEE Support gurkanerdo...@yahoo.com Reply-To: Apache TomEE Support gurkanerdo...@yahoo.com To: a...@ice-sa.com Date: Wed, 13 Nov 2013 12:47:58 + Message-ID: 9781cf0ccdac7604f1f7fd52ea052bfdbb3.20131113124746@mail173. us4.mcsv.net X-Mailer: MailChimp Mailer - **CID105b909b64a052bfdbb3** X-Campaign: mailchimp9781cf0ccdac7604f1f7fd52e.105b909b64 X-campaignid: mailchimp9781cf0ccdac7604f1f7fd52e.105b909b64 X-Report-Abuse: Please report abuse for this campaign here: http://www.mailchimp.com/abuse/abuse.phtml?u=9781cf0ccdac7604f1f7fd52eid= 105b909b64e=a052bfdbb3 X-MC-User: 9781cf0ccdac7604f1f7fd52e x-accounttype: ff List-Unsubscribe: mailto:unsubscribe-9781cf0ccdac7604f1f7fd52e- 105b909b64-a052bfd...@mailin1.us2.mcsv.net?subject=unsubscribe, http://blogspot.us3.list-manage.com/unsubscribe?u= 9781cf0ccdac7604f1f7fd52eid=b75a8245a1e=a052bfdbb3c=105b909b64 Sender: Apache TomEE Support gurkanerdogdu=yahoo.com@ mail173.us4.mcsv.net x-mcda: FALSE Content-Type: multipart/alternative; boundary=_--=_MCPart_ 1458955636 MIME-Version: 1.0 20% off TomEE Support from Java EE Guru Gurkan Erdogdu. He really knows Apache Tomcat, TomEE and related Java EE projects in source code level! Email not displaying correctly? View it in your browser (http://us3.campaign-archive1.com/?u= 9781cf0ccdac7604f1f7fd52eid=105b909b64e=a052bfdbb3) . ** Support for Apache TomEE (http://blogspot.us3.list- manage1.com/track/click?u=9781cf0ccdac7604f1f7fd52eid= bceee0c9bae=a052bfdbb3) Funs BUY NOW (http://blogspot.us3.list-manage.com/track/click?u= 9781cf0ccdac7604f1f7fd52eid=6a24f4ee0ee=a052bfdbb3) ** TomEE Support : 20% Off ** professional TomEE Support with NO HIDDEN COST! divimg src=http://blogspot.us3.list-manage.com/qr/coupon?e= a052bfdbb3data=eyJjaWQiOiIxMDViOTA5YjY0IiwidW lkIjoiOTc4MWNmMGNjZGFjNzYwNGYxZjdmZDUyZSIsImNvZGUiOiIzYzE0OT g3NDIxIiwidGV4dCI6IjIwJSBvZmYgMSBUb21FRSBTdXBwb3J0IiwidGlkIj oiOTcxMDJlZDgyNiIsInVzZXMiOjF9s=2 alt=20% off 1 TomEE Support title=20% off 1 TomEE Supporta href= http://9781cf0ccdac7604f1f7fd52e. 105b909b64.list-manage.com/3c14987421 alt= style=display:none;margin- left:-px;/a/div http://blogspot.us3.list-manage.com/track/click?u= 9781cf0ccdac7604f1f7fd52eid=909133d7cde=a052bfdbb3 ** TomEE Support Discount Would you like to get Apache TomEE
How to force undeployOldVersions ?
I have had a good experience doing the parallel deployment with the latest stable build of tomcat7, by using autoDeploy after copying a newer version of WAR to the appbase. As i can see from my manager app, there are 2 versions running, the newer one is serving new requests as expected. The problem is that, although with undeployOldVersions=true, the old version of the webapp is still there. From what i've seen from catalina.out, there's a ThreadLocal issues that are being used by 3rd party classes and i assumes this is the output of the undeployment process failing. Is there a way that i can 'force' the undeployOldVersions ? I've thought about using ant task to undeploy, but it seems that i cannot specify the version to undeploy. -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: How to force undeployOldVersions ?
Hello. I forgot to mention that i've made sure from manager app that the old webapp has 0 sessions, so i think this should have triggered the undeploying process. Here's my host's attributes : Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true undeployOldVersions=true And i've just done some greps on catalina.out, and i got this related output : WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'undeployOldVersions' to 'true' did not find a matching property. I've seen that in the onfig it's indeed undeployOldVersions, and the value of true is also fine. I wonder what might be the cause of the warning. I'm using debian wheezy's tomcat7 packages. On Sat, Nov 2, 2013 at 9:42 PM, Albert Kam moonblade.w...@gmail.com wrote: I have had a good experience doing the parallel deployment with the latest stable build of tomcat7, by using autoDeploy after copying a newer version of WAR to the appbase. As i can see from my manager app, there are 2 versions running, the newer one is serving new requests as expected. The problem is that, although with undeployOldVersions=true, the old version of the webapp is still there. From what i've seen from catalina.out, there's a ThreadLocal issues that are being used by 3rd party classes and i assumes this is the output of the undeployment process failing. Is there a way that i can 'force' the undeployOldVersions ? I've thought about using ant task to undeploy, but it seems that i cannot specify the version to undeploy. -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: How to force undeployOldVersions ?
My apologies. My assumption was wrong about using the latest stable build. My debian wheezy's version on tomcat7 package is 7.0.28-4. I wonder how do i upgrade to the latest version without sacrificing all the good stuffs already provided in wheezy, maybe something like updating tomcat's jars ? Is it a bad idea ? Thanks for pointing this out, really appreciate it ! On Sat, Nov 2, 2013 at 11:50 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2013/11/2 Albert Kam moonblade.w...@gmail.com: Hello. I forgot to mention that i've made sure from manager app that the old webapp has 0 sessions, so i think this should have triggered the undeploying process. Here's my host's attributes : Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true undeployOldVersions=true And i've just done some greps on catalina.out, and i got this related output : WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'undeployOldVersions' to 'true' did not find a matching property. I've seen that in the onfig it's indeed undeployOldVersions, and the value of true is also fine. I wonder what might be the cause of the warning. I'm using debian wheezy's tomcat7 packages. 3-rd party packages are usually rather old. Looking at that error message it seems that yours does not have this feature. What x.y.z version of Tomcat is that? You need Tomcat 7.0.32 or later. http://tomcat.apache.org/oldnews-2012.html#Tomcat_7.0.32_Released Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
How to log response time ?
Hello. I'm currently using tomcat 7.0.28-4 on debian wheezy, along with APR connector. I'm having a slow response when accessing the webapp. Based on google chrome's tool to inspect req/response's time, i found out that it takes at around 1 second (around 400ms connecting, sending 1ms, 600ms waiting, receiving 1ms) for to successfully fetch my initial htmp response, which is slow, considering the time needed is excluding the additional resources files like css and js. The returned html has 4.5kbytes only, not compressed. 1. Content-Language: en 2. Content-Type: text/html;charset=utf-8 3. Date: Sun, 03 Nov 2013 05:06:19 GMT 4. Server: myserver.com 5. Transfer-Encoding: chunked I tried turning on and off the compression, but doesnt have any effects. Here's my connector config : Connector port=80 maxParameterCount=500 maxPostSize=25 scheme=http secure=false protocol=org.apache.coyote.http11.Http11AprProtocol connectionTimeout=2 disableUploadTimeout=false connectionUploadTimeout=30 maxThreads=500 processorCache=500 URIEncoding=UTF-8 / Now, the backend's processing (in my case, an mvc controller) logging shows that it took 75ms, and the ui rendering took 25ms. I would like to find out how long does it take for the connector to return this response. Is it possible for me to log this information ? I also thought that the connection could be a problem, but my inspection on different websites, they all have very good response time even for html response 10 times bigger than mine, and i'm sure that the response is not cached (not 304 not modified). -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: How to log response time ?
My apology. I also forgot to mention that currently i have no reverse proxy in front of tomcat for the time being. Please share your thoughts on this. Thanks ! On Sun, Nov 3, 2013 at 12:23 PM, Albert Kam moonblade.w...@gmail.comwrote: Hello. I'm currently using tomcat 7.0.28-4 on debian wheezy, along with APR connector. I'm having a slow response when accessing the webapp. Based on google chrome's tool to inspect req/response's time, i found out that it takes at around 1 second (around 400ms connecting, sending 1ms, 600ms waiting, receiving 1ms) for to successfully fetch my initial htmp response, which is slow, considering the time needed is excluding the additional resources files like css and js. The returned html has 4.5kbytes only, not compressed. 1. Content-Language: en 2. Content-Type: text/html;charset=utf-8 3. Date: Sun, 03 Nov 2013 05:06:19 GMT 4. Server: myserver.com 5. Transfer-Encoding: chunked I tried turning on and off the compression, but doesnt have any effects. Here's my connector config : Connector port=80 maxParameterCount=500 maxPostSize=25 scheme=http secure=false protocol=org.apache.coyote.http11.Http11AprProtocol connectionTimeout=2 disableUploadTimeout=false connectionUploadTimeout=30 maxThreads=500 processorCache=500 URIEncoding=UTF-8 / Now, the backend's processing (in my case, an mvc controller) logging shows that it took 75ms, and the ui rendering took 25ms. I would like to find out how long does it take for the connector to return this response. Is it possible for me to log this information ? I also thought that the connection could be a problem, but my inspection on different websites, they all have very good response time even for html response 10 times bigger than mine, and i'm sure that the response is not cached (not 304 not modified). -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: How to log response time ?
I think this doesnt matter now. I've tried accessing the website from different places, and with different results. 0.17ms from Berlin, 0.4ms from US, 0.9ms from Jakarta and Melbourne. So it's indeed the connection problem. On Sun, Nov 3, 2013 at 12:24 PM, Albert Kam moonblade.w...@gmail.comwrote: My apology. I also forgot to mention that currently i have no reverse proxy in front of tomcat for the time being. Please share your thoughts on this. Thanks ! On Sun, Nov 3, 2013 at 12:23 PM, Albert Kam moonblade.w...@gmail.comwrote: Hello. I'm currently using tomcat 7.0.28-4 on debian wheezy, along with APR connector. I'm having a slow response when accessing the webapp. Based on google chrome's tool to inspect req/response's time, i found out that it takes at around 1 second (around 400ms connecting, sending 1ms, 600ms waiting, receiving 1ms) for to successfully fetch my initial htmp response, which is slow, considering the time needed is excluding the additional resources files like css and js. The returned html has 4.5kbytes only, not compressed. 1. Content-Language: en 2. Content-Type: text/html;charset=utf-8 3. Date: Sun, 03 Nov 2013 05:06:19 GMT 4. Server: myserver.com 5. Transfer-Encoding: chunked I tried turning on and off the compression, but doesnt have any effects. Here's my connector config : Connector port=80 maxParameterCount=500 maxPostSize=25 scheme=http secure=false protocol=org.apache.coyote.http11.Http11AprProtocol connectionTimeout=2 disableUploadTimeout=false connectionUploadTimeout=30 maxThreads=500 processorCache=500 URIEncoding=UTF-8 / Now, the backend's processing (in my case, an mvc controller) logging shows that it took 75ms, and the ui rendering took 25ms. I would like to find out how long does it take for the connector to return this response. Is it possible for me to log this information ? I also thought that the connection could be a problem, but my inspection on different websites, they all have very good response time even for html response 10 times bigger than mine, and i'm sure that the response is not cached (not 304 not modified). -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: Getting error 403 forbidden while using HTTP PUT method
You were stating that it's ok for GET, and not for PUT. But what about POST methods ? Are they doing okay ? Some suggestions : I wonder whether the HiddenHttpMethodFilter is reached. You have many filters, and maybe one of them could be causing this ? To answer this, you might consider extending HiddenHttpMethodFilter and add logging to it, and register it to replace HiddenHttpMethodFilter in your web.xml If POST handlers are doing fine, then another idea is to just forget about the PUT just to test things out : - comment out the HiddenHttpMethodFilter and it's mapping in the web.xml - convert your controller methods from using PUT to POST - no changes needed in the ui forms, since it actually emulates PUT by using POST + hidden _method=PUT when you use form:form - If after using POST, and it's still 403, then the problem is not with the PUT, it might be something else. On Fri, Oct 4, 2013 at 9:24 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Getting error 403 forbidden while using HTTP PUT method !-- security-constraint web-resource-collection web-resource-nameABC/web-resource-name url-pattern/api/mode/url-pattern http-methodDELETE/http-method http-methodPUT/http-method http-methodHEAD/http-method http-methodOPTIONS/http-method http-methodTRACE/http-method http-methodGET/http-method http-methodPOST/http-method /web-resource-collection user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint -- !-- security-constraint web-resource-collection web-resource-nameABC/web-resource-name url-pattern/*/url-pattern http-methodPUT/http-method /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint Looks like the above is the problem: you have a constraint on the PUT method, but no other methods. What were you expecting? There's no such constraint indicated; all of the above is commented out. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Cannot access webapp outside the server box using a public domain name
I have a case where accessing the webapp within the server box is fine, but accessing the webapp from outside the server box using the domain name is problematic, but not so using the public ip address, which is accessible. The content of the webapp is just a single index.html, so no JSPs, no classes are involved. - On my web server, which is set for the public domain myweb.com, curl http://myweb.com works curl http://public-ip-address also works note : i registered the domain from the domain robot - On external nodes (not on the web server), i tried to access curl http://myweb.com fails But : curl http://public-ip-address works - Both on the web server and external nodes, nslookup myweb.com works, and returns the public ip address correctly - I have even disabled ipv6 in my /etc/hosts and domain mapping So my current host file is very simple : 127.0.0.1 localhost - Here my output of version.sh Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME:/usr/lib/jvm/java-7-oracle Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.28 Server built: Dec 8 2012 06:51:43 Server number: 7.0.28.0 OS Name:Linux OS Version: 3.2.0-4-amd64 Architecture: amd64 JVM Version:1.7.0_25-b15 JVM Vendor: Oracle Corporation - Here's my server.xml ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.core.ThreadLocalLeakPreventionListener / Service name=Catalina Connector port=80 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 address=my-public-ip-address / Engine name=Catalina defaultHost=myweb.com Host name=myweb.com appBase=webapps unpackWARs=true autoDeploy=true Aliasmyweb.com/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / /Host /Engine /Service /Server - Here's my ifconfig : root@Debian-70-wheezy-64-minimal:/home/moonblade# ifconfig eth0 Link encap:Ethernet HWaddr d4:3d:7e:d8:ba:27 inet addr:public-ip-address Bcast:public-ip-address Mask:255.255.255.224 inet6 addr: public-ip-address-v6/64 Scope:Link inet6 addr: another-public-ip-address-v6/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:290094 errors:0 dropped:0 overruns:0 frame:0 TX packets:169056 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:241176295 (230.0 MiB) TX bytes:27580533 (26.3 MiB) Interrupt:43 Base address:0x6000 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:192 errors:0 dropped:0 overruns:0 frame:0 TX packets:192 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:26625 (26.0 KiB) TX bytes:26625 (26.0 KiB) - no firewall, as the iptables are still empty : root@Debian-70-wheezy-64-minimal:/home/moonblade# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination - my system Linux Debian-70-wheezy-64-minimal 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux Am i missing something in my server.xml ? -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: Cannot access webapp outside the server box using a public domain name
How exactly does it fail ? Sorry, it failed with error message stating that it cannot connect to the myweb.com:80; nslookup disregards the local hosts file What's with the other nodes' local hosts file ? These lines gave me a brain jolt. It's my mistake, as i mapped myweb.com to 127.0.0.1 locally on my laptop, which is why it doesnt use dns to get the public ip. Now that i commented the local mapping in my etc/hosts, everything works great ! Thank you so much for your help ! Warm regards from Jakarta, Albert Kam On Wed, Sep 18, 2013 at 4:50 PM, André Warnier a...@ice-sa.com wrote: Albert Kam wrote: I have a case where accessing the webapp within the server box is fine, but accessing the webapp from outside the server box using the domain name is problematic, but not so using the public ip address, which is accessible. The content of the webapp is just a single index.html, so no JSPs, no classes are involved. - On my web server, which is set for the public domain myweb.com, curl http://myweb.com works curl http://public-ip-address also works note : i registered the domain from the domain robot - On external nodes (not on the web server), i tried to access curl http://myweb.com fails How exactly does it fail ? Doesn't curl have some verbose option to give you the exact failure reason ? But : curl http://public-ip-address works - Both on the web server and external nodes, nslookup myweb.com works, and returns the public ip address correctly Just for info : nslookup disregards the local hosts file.. - I have even disabled ipv6 in my /etc/hosts and domain mapping So my current host file is very simple : 127.0.0.1 localhost Yes, but this concerns only your local host, which was already working fine, as per your indications above. What's with the other nodes' local hosts file ? On the Tomcat host, can you run the following command and paste the output here ? ifconfig -a - Here my output of version.sh Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME:/usr/lib/jvm/java-7-oracle Using CLASSPATH: /usr/share/tomcat7/bin/**bootstrap.jar:/usr/share/** tomcat7/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.28 Server built: Dec 8 2012 06:51:43 Server number: 7.0.28.0 OS Name:Linux OS Version: 3.2.0-4-amd64 Architecture: amd64 JVM Version:1.7.0_25-b15 JVM Vendor: Oracle Corporation - Here's my server.xml ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.**catalina.core.JasperListener / Listener className=org.apache.**catalina.core.**JreMemoryLeakPreventionListene**r / Listener className=org.apache.**catalina.mbeans.**GlobalResourcesLifecycleListen* *er / Listener className=org.apache.**catalina.core.**ThreadLocalLeakPreventionListe**ner / Service name=Catalina Connector port=80 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 address=my-public-ip-**address / Engine name=Catalina defaultHost=myweb.com Host name=myweb.com appBase=webapps unpackWARs=true autoDeploy=true Aliasmyweb.com/Alias Valve className=org.apache.**catalina.valves.**AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / /Host /Engine /Service /Server - Here's my ifconfig : root@Debian-70-wheezy-64-**minimal:/home/moonblade# ifconfig eth0 Link encap:Ethernet HWaddr d4:3d:7e:d8:ba:27 inet addr:public-ip-address Bcast:public-ip-address Mask:255.255.255.224 inet6 addr: public-ip-address-v6/64 Scope:Link inet6 addr: another-public-ip-address-v6**/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:290094 errors:0 dropped:0 overruns:0 frame:0 TX packets:169056 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:241176295 (230.0 MiB) TX bytes:27580533 (26.3 MiB) Interrupt:43 Base address:0x6000 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:192 errors:0 dropped:0 overruns:0 frame:0 TX packets:192 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:26625 (26.0 KiB) TX bytes:26625 (26.0 KiB) - no firewall, as the iptables are still empty : root@Debian-70-wheezy-64-**minimal:/home/moonblade# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot
Re: Deploy a website downloaded from internet using wget (Tomcat 8.0 RC)
Why not create a local copy with the links converted ? Take a look at http://stackoverflow.com/questions/6348289/download-a-working-local-copy-of-a-webpage On Wed, Sep 18, 2013 at 12:09 AM, Vikram Singh vsp1...@gmail.com wrote: Hi I downloaded a website say test.org using wget utility. Now I want to deploy in Apache Tomcat 8.0 RC. That I have done it. But I want to do in this manner that I want to access test.org locally from my browser as if I am browsing on the internet because links in the test.org refers to itself. Because when I click any link it goes to Internet and not to my locally saved website. I do not know how to do this. I also searched in the Internet. Please help Thanks Vikram -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: How to store session in database
Hopefully these open source nosql-tomcat-session-managers could be helpful in your jorney : https://github.com/jcoleman/tomcat-redis-session-manager https://github.com/dawsonsystems/Mongo-Tomcat-Sessions On Fri, May 24, 2013 at 6:47 PM, Daniel Mikusa dmik...@gopivotal.comwrote: On May 24, 2013, at 7:28 AM, 杨华杰 wrote: Hi Basically I want to configure a tomcat cluster. I am using tomcat 6 and tomcat 7 and I want to store the session in database. I am looking to this document http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html . But unfortunately I didn't find any document to store session in database. Is there any? Just let me know which document I can refer. Regards, Hua Jie If you look at the Overview section of the documentation that you linked to, you'll see that there are three options for session replication. • Using session persistence, and saving the session to a shared file system (PersistenceManager + FileStore) • Using session persistence, and saving the session to a shared database (PersistenceManager + JDBCStore) • Using in-memory-replication, using the SimpleTcpCluster that ships with Tomcat 6 (lib/catalina-tribes.jar + lib/catalina-ha.jar) https://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html#Overview Documentation for the first two can be found here. https://tomcat.apache.org/tomcat-6.0-doc/config/manager.html#Nested_Components Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: [OT] Sharing lots of little pieces of data across a cluster
I am not sure this might suit you, but if i am currently thinking of http://redis.io/ Key and value storage (binary value is supported), expiry is supported, support scaling horizontally, can be set to be non-persistent (only in memory, which is fast) For more complex data structures, and more ability in queries, i would suggest http://www.mongodb.org/ They have json-like storage, expiry is also supported, scaling horizontally with sharding, support replicas for availability, and although it's always in persistent mode, the active workset would be in the mapped-memory for fast access. On Thu, Mar 21, 2013 at 7:39 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I have an in-process service that stores valid nonces on a server for a particular set of client operations. The nonces are created once, then expire after a certain amount of time. They never change. I'd like to make this in-process service into an out-of-process service that can be accessed by any node in my cluster, basically acting like a communal hash map. Memcached is the perfect application for this kind of thing, right? It is fast and simple, plus supports key expiration out of the box. Doing a bit of reading (I've never actually used memcached before), it seems like memcached is better-suited as a /cache/ -- that is, something that sits between a slow data source and clients. They suggest that you /not/ configure failover but instead allow a dying node in your memcached cluster to simply die and consider the data lost: go back to the canonical data source and re-fetch the data. In my case, I have no (other) canonical data source: I just want to use memcached. (Note that if the whole service were to fall-over and I had to restart the nonce-storage cluster and start with a completely empty database, it wouldn't be the end of the world. There would be a lot of grumbling, because everyone would have to request new nonces and re-start any transactions that were using them.) Also, the memcached servers don't really know about each other, right? So, it's not really a big, shared hashtable. Instead, it's like a bunch of separate hash tables and the client knows which server ought to have the data when it requests it based upon the key. Am I barking up the wrong tree by looking at memcached? Is there something else that would be better for me? It's a simple enough set of requirements that writing it myself could be done easily. Then again, it's a simple enough set of requirements that someone /must/ have done this before me. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRSla3AAoJEBzwKT+lPKRYGpsP+wW0kKEjm5k0p2cFrRDF9KAr y5SWi3GWCPSNRbOJkR487CRfFN9cUCuyiq1+wuQrtbhG2osdeLUIb4dS7NOCTRh8 dknyZvGQw9BrBZXvUeVQnMsLrD02YE6qgEp8hAdnLZBoKLb8EOA1FACs2qdWaBW6 8XLxI6nw5yT/y6glP35syq/MfgjFsXdn8+2Wlu5KQdc6YciUMrG/L7ifB4Huxz+S NFqVCsXJeVQU6MGpL1Bucn135WE3dHrZWJlnnP38iq2cATzo+0SM6Yq4ul2APjye EoN252a5WXddEhzMyjRKC8U89XE8ELF44WiP9NN3niEyyHh035+iK3dawhpN40qi XUw87TbnbL/4cAk8wu2d+gD3BHAFl9SrmkAcJ8lPKpn+ExSzFcgXwldc/TJah+yh M8FOGNwF4FfOeVCkAEMEltsk9YJev8IQNPSAYKtI0tzzWtckmq0ujHQpBWd/2knw YtSQALT6cjx0oyJnRTG02Jx1I6OsOQgVaHcarb8ejAAqkK3I0pge1tNroMU2QaHD gNY5wl33msB5WpHRYlsmg0y+6bshjrOrJkpPoYpxuVgGZj5zrPls5WhuFk1zgZ6Z e7j1BMMF/xVykNKS/bO1T6hqGsjCFSXCfT7WURbkkQyQ85Yiyvcmcfrt2tnVFX0x dtB4zpCWED0XLw1CbG88 =eJjT -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: HTTP 404 error when trying to run a Hello World Java Servlet while using Eclipse and Tomcat
Perhaps you would like to share : - Whether you started the tomcat successfully (as seen from the logs/catalina.out) - Whether you can access the tomcat with http://localhost:8080 (assuming you didnt change the tomcat's port) - Whether you mapped the servlet in web.xml ? - What URL did you use to access the servlet ? On Sat, Nov 3, 2012 at 2:26 AM, Talia Selitsky talq...@gmail.com wrote: Hello, I am using Eclipse version Juno and Apache Tomcat 7. I am trying to run a basic Hello World web application. I am following all of the basic steps but I keep getting a Http 404 error. The tomcat server runs fine, so I am not sure what the problem is. I have done tons of research online but none of the solutions have worked. Any help would be much appreciated. Thanks! -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
WebSocket scalability concerns
I am currently doing some research on implementing a chat system using java on the server side. I read a code example for tomcat on : http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java?view=markup 1. Horizontal scaling I imagine that this example would work great for one server, but if i had to add more servers to scale more users in the chat system, what would be the reasonable strategy to get all existing connections between multiple tomcat servers ? I am currently having a plan to run multiple sessionless tomcat servers behind a load balancer like haproxy (which they say is very performant) 2. Resource I would also consider using periodic polling instead of realtime 2-way communication if using websocket will consume much resource on the tomcat instance and therefore will be limited in the ability to serve other requests other than chat. Could anybody share his/her experience on this ? Or perhaps is there any 'normal' numbers on how many active connections can be served by a tomcat instance on RAM of 4G ? -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat maven plugin + configuring virtual host for the embedded tomcat ?
Wow, so fast ! It worked flawlessly : After adding this in the tomcat maven plugin's configuration .. aliases aliasmydomain1.com/alias aliasmydomain2.com/alias /aliases These work with tomcat7:run : http://localhost:8080 http://mydomain1.com:8080 http://mydomain2.com:8080 Bye2 tomcat:deploy ! Thanks ! On Tue, Jul 31, 2012 at 3:19 PM, Olivier Lamy ol...@apache.org wrote: Try last SNAPSHOT (see how here: http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html ) If any issue using this new feature, feel free to reopen: https://issues.apache.org/jira/browse/MTOMCAT-172 HTH, -- Olivier 2012/7/31 Albert Kam moonblade.w...@gmail.com: Hi, I have been developing with tomcat7:run happily for some months now. But then i am currently expanding the development where different domains would provide different behaviour for the same webapp (imagine multitenancy and ACLs based on the domain or the server name) To make this work in the development mode, i would have to modify the hosts file, mapping several .com domains to localhost + add some Alias to the localhost's Host Currently i am using the standalone tomcat, doing : - go to the parent module, install all modules, which results in the newest WAR for the webapp - go to the webapp project and tomcat7:deploy to it .. Not as fast-development-mode as tomcat7:run (which doesnt include installing the modules + WAR building), but this will do :-) I may be too hopeful, but is this useful enough to be added as a new feature of tomcat maven plugin ? I imagine putting these aliases in the plugin's configuration in the pom.xml .. Thanks ! On Tue, Jul 31, 2012 at 12:54 AM, Olivier Lamy ol...@apache.org wrote: Hi, Not possible currently. What is your use case ? those goals are for dev purpose. 2012/7/27 Albert Kam moonblade.w...@gmail.com: I am currently using the snapshot version of tomcat maven plugin. And i am using tomcat7:run and tomcat7:run-war-only (for webapps with overlay) actively. And the time has come for me to try out virtual host .. and as i understand it, i have to configure the host, context, etc .. But i've been using the embedded tomcat 'supplied' by the tomcat maven plugin so far, so i wonder if there's a way to configure virtual host on the embedded tomcat ? Or should i just forget embedded tomcat and setup an independent tomcat i can configure freely ? Thank you, Albert -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat maven plugin + [default] overlay
Hi, Yes, it is a reactor module, with childwebapp having dependency on the parentwebapp. Both webapps are own made (not third parties). So, i tried these : - Going to the maven parent module to do the install -- results on parentwebapp.war and childwebapp.war (overlays with parentwebapp.war) - On eclipse, on the childwebapp project, i do tomcat7:run .. Still the same error of org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory - And then i check the m2e run configuration, and i uncheck 'resolve workspace artifacts', and rerun it .. This time, the error has changed into unfamiliar apache tiles error that possibly mean the tiles' configuration file is missing or something Now this error doesnt appear if i use tomcat7:deploy on the childwebapp.war, so i assume tomcat7:run has some issues when merging parentwebapp with childwebapp, resulting in missing files .. Questions : - tomcat7:run's tomcat location to help debugging the error : Is there a temporary directory for the embedded tomcat for the merged childwebapp, so that i can check what files are probably missing after tomcat7:run merges parentwebapp and childwebapp ? - Pure tomcat7:run without building the WAR files ? Is it possible to have tomcat7:run to merge the dependant webapp modules without having to build the WAR files ? For example, tomcat7:run on childwebapp would 'magically' merges parentwebapp and childwebapp in terms of jars, classes, jsps, and other static files like xmls, properties, web files, etc (like overlay, but without making the WAR beforehand) ? Thank you ! On Tue, Jul 31, 2012 at 12:57 AM, Olivier Lamy ol...@apache.org wrote: 2012/7/26 Albert Kam moonblade.w...@gmail.com: Hello, I am having a situation where i couldnt tomcat7:run with overlay in eclipse. In the eclipse indigo, i am using the maven plugin, and have imported two maven modules, the childwebapp which depends on the parentwebapp, which is just like a skeleton, with it's own classes, jsps, static resources, but also a runnable webapp of itself. Doing tomcat7:run on the parentwebapp works well as expected .. Here's the dependency in the childwebapp's pom, and i dont have any specific overlay configuration : dependency groupIdgroup.id/groupId artifactIdparentwebapp/artifactId version${project.version}/version typewar/type scoperuntime/scope /dependency This dependency is a reactor modules ? So in this case I presume eclipse (m2e) see the build output directory rather than a war file. The plugin doesn't have any idea how your war dependency is available in an exploded mode (where are the webapp resources and/or classes etc..) try to install it first. When i try running tomcat7:run on the childwebapp, i get this error message, as if it tries to find the war of parentwebapp and try to extract it. But in my situation, i dont have the war in my development, since the eclipse maven plugin already resolves the workspace dependencies. I would imagine using the classes from the workspace instead of extracting the non-existent war file and load them into the childwebapp would solve the issue .. [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ childwebapp --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ childwebapp --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp [INFO] [INFO] --- tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp --- [INFO] Running war on http://localhost:8080/childwebapp [INFO] Creating Tomcat server configuration at C:\Users\albert\git\Startup\MavenParent\childwebapp\target\tomcat [INFO] create webapp with contextPath: /childwebapp [ERROR] fail to extract war file C:\Users\albert\git\Startup\MavenParent\parentwebapp\target\classes, reason:The source must not be a di rectory. org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory. at org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:185) at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:118) at org.apache.tomcat.maven.common.run.DefaultClassLoaderEntriesCalculator.calculateClassPathEntries(DefaultClassLoaderEntriesCalc ulator.java:149) at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo.createWebappLoader(RunMojo.java:254) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.createContext(AbstractRunMojo.java:563) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:927) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute
Re: tomcat maven plugin + configuring virtual host for the embedded tomcat ?
Sorry, forgot to mention a suggestion to document this feature in : http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html Regards, Albert On Tue, Jul 31, 2012 at 4:01 PM, Albert Kam moonblade.w...@gmail.com wrote: Wow, so fast ! It worked flawlessly : After adding this in the tomcat maven plugin's configuration .. aliases aliasmydomain1.com/alias aliasmydomain2.com/alias /aliases These work with tomcat7:run : http://localhost:8080 http://mydomain1.com:8080 http://mydomain2.com:8080 Bye2 tomcat:deploy ! Thanks ! On Tue, Jul 31, 2012 at 3:19 PM, Olivier Lamy ol...@apache.org wrote: Try last SNAPSHOT (see how here: http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html ) If any issue using this new feature, feel free to reopen: https://issues.apache.org/jira/browse/MTOMCAT-172 HTH, -- Olivier 2012/7/31 Albert Kam moonblade.w...@gmail.com: Hi, I have been developing with tomcat7:run happily for some months now. But then i am currently expanding the development where different domains would provide different behaviour for the same webapp (imagine multitenancy and ACLs based on the domain or the server name) To make this work in the development mode, i would have to modify the hosts file, mapping several .com domains to localhost + add some Alias to the localhost's Host Currently i am using the standalone tomcat, doing : - go to the parent module, install all modules, which results in the newest WAR for the webapp - go to the webapp project and tomcat7:deploy to it .. Not as fast-development-mode as tomcat7:run (which doesnt include installing the modules + WAR building), but this will do :-) I may be too hopeful, but is this useful enough to be added as a new feature of tomcat maven plugin ? I imagine putting these aliases in the plugin's configuration in the pom.xml .. Thanks ! On Tue, Jul 31, 2012 at 12:54 AM, Olivier Lamy ol...@apache.org wrote: Hi, Not possible currently. What is your use case ? those goals are for dev purpose. 2012/7/27 Albert Kam moonblade.w...@gmail.com: I am currently using the snapshot version of tomcat maven plugin. And i am using tomcat7:run and tomcat7:run-war-only (for webapps with overlay) actively. And the time has come for me to try out virtual host .. and as i understand it, i have to configure the host, context, etc .. But i've been using the embedded tomcat 'supplied' by the tomcat maven plugin so far, so i wonder if there's a way to configure virtual host on the embedded tomcat ? Or should i just forget embedded tomcat and setup an independent tomcat i can configure freely ? Thank you, Albert -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat maven plugin + configuring virtual host for the embedded tomcat ?
Hi, I have been developing with tomcat7:run happily for some months now. But then i am currently expanding the development where different domains would provide different behaviour for the same webapp (imagine multitenancy and ACLs based on the domain or the server name) To make this work in the development mode, i would have to modify the hosts file, mapping several .com domains to localhost + add some Alias to the localhost's Host Currently i am using the standalone tomcat, doing : - go to the parent module, install all modules, which results in the newest WAR for the webapp - go to the webapp project and tomcat7:deploy to it .. Not as fast-development-mode as tomcat7:run (which doesnt include installing the modules + WAR building), but this will do :-) I may be too hopeful, but is this useful enough to be added as a new feature of tomcat maven plugin ? I imagine putting these aliases in the plugin's configuration in the pom.xml .. Thanks ! On Tue, Jul 31, 2012 at 12:54 AM, Olivier Lamy ol...@apache.org wrote: Hi, Not possible currently. What is your use case ? those goals are for dev purpose. 2012/7/27 Albert Kam moonblade.w...@gmail.com: I am currently using the snapshot version of tomcat maven plugin. And i am using tomcat7:run and tomcat7:run-war-only (for webapps with overlay) actively. And the time has come for me to try out virtual host .. and as i understand it, i have to configure the host, context, etc .. But i've been using the embedded tomcat 'supplied' by the tomcat maven plugin so far, so i wonder if there's a way to configure virtual host on the embedded tomcat ? Or should i just forget embedded tomcat and setup an independent tomcat i can configure freely ? Thank you, Albert -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat maven plugin + configuring virtual host for the embedded tomcat ?
I am currently using the snapshot version of tomcat maven plugin. And i am using tomcat7:run and tomcat7:run-war-only (for webapps with overlay) actively. And the time has come for me to try out virtual host .. and as i understand it, i have to configure the host, context, etc .. But i've been using the embedded tomcat 'supplied' by the tomcat maven plugin so far, so i wonder if there's a way to configure virtual host on the embedded tomcat ? Or should i just forget embedded tomcat and setup an independent tomcat i can configure freely ? Thank you, Albert -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat maven plugin + [default] overlay
Hello, I am having a situation where i couldnt tomcat7:run with overlay in eclipse. In the eclipse indigo, i am using the maven plugin, and have imported two maven modules, the childwebapp which depends on the parentwebapp, which is just like a skeleton, with it's own classes, jsps, static resources, but also a runnable webapp of itself. Doing tomcat7:run on the parentwebapp works well as expected .. Here's the dependency in the childwebapp's pom, and i dont have any specific overlay configuration : dependency groupIdgroup.id/groupId artifactIdparentwebapp/artifactId version${project.version}/version typewar/type scoperuntime/scope /dependency When i try running tomcat7:run on the childwebapp, i get this error message, as if it tries to find the war of parentwebapp and try to extract it. But in my situation, i dont have the war in my development, since the eclipse maven plugin already resolves the workspace dependencies. I would imagine using the classes from the workspace instead of extracting the non-existent war file and load them into the childwebapp would solve the issue .. [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ childwebapp --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ childwebapp --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp [INFO] [INFO] --- tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) @ childwebapp --- [INFO] Running war on http://localhost:8080/childwebapp [INFO] Creating Tomcat server configuration at C:\Users\albert\git\Startup\MavenParent\childwebapp\target\tomcat [INFO] create webapp with contextPath: /childwebapp [ERROR] fail to extract war file C:\Users\albert\git\Startup\MavenParent\parentwebapp\target\classes, reason:The source must not be a di rectory. org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory. at org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:185) at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:118) at org.apache.tomcat.maven.common.run.DefaultClassLoaderEntriesCalculator.calculateClassPathEntries(DefaultClassLoaderEntriesCalc ulator.java:149) at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo.createWebappLoader(RunMojo.java:254) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.createContext(AbstractRunMojo.java:563) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:927) at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:476) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) What can i do to resolve this situation ? Thank you, Albert -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error
First your should find the location of your tomcat-users.xml first, which is normally located here : ${TOMCAT_HOME}\conf\tomcat-users.xml If you are using tomcat bundled with Netbeans, the ${TOMCAT_HOME} should be somewhere in personal user folder\.netbeans\nb-version\apache-tomcat-version_base\conf You should see something like this in the tomcat-users.xml : ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ /tomcat-users Now, you should modify the file : add the manager role, and assign it to a new user named 'she', for example .. ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager/ user username=she password=she roles=manager/ user username=tomcat password=tomcat roles=tomcat,manager/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ /tomcat-users When running it, and the authentication popup appears, you type she for both the user and password That should do it .. On Wed, Jul 4, 2012 at 12:37 PM, Supun Malinga sup...@wso2.com wrote: Hi, Following would be helpful. http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access thanks, On Wed, Jul 4, 2012 at 11:01 AM, she she.g...@gmail.com wrote: Dear sir, I am working with Netbeans 6.7.1 + tomcat 6.0.18 having Access to Tomcat server has not been authorized. Set the correct username and password with the manager role in the Tomcat customizer in the Server Manager. See the server log for details. init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the manager role in the Tomcat customizer in the Server Manager. See the server log for details. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment .java:224) at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment .java:132) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav a:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java: 41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) Caused by: java.lang.IllegalStateException: Access to Tomcat server has not been authorized. Set the correct username and password with the manager role in the Tomcat customizer in the Server Manager. at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394) at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:622) at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.jav a:433) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(Targ etServer.java:393) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef erences(TargetServer.java:349) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef erences(TargetServer.java:298) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedRef erences(TargetServer.java:295) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules( TargetServer.java:417) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:16 3) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java: 556) at
Re: post redirect get to the same tomcat instance in a tomcat cluster ?
Oops, i really misread the documentation, thinking it will never use session to provide that feature. Thank you for the pointers ! On Wed, Jun 13, 2012 at 7:23 PM, Pid p...@pidster.com wrote: On 13/06/2012 13:13, Pid * wrote: On 12 Jun 2012, at 18:17, Albert Kam moonblade.w...@gmail.com wrote: Hi all ! Is it possible to do POST submit to the tomcat-A, redirect happens, and then GET to the same tomcat-A again in a tomcat cluster ? And, in hope to make things easier, all the tomcat servers in the cluster are stateless wihout any sessions You contradict this statement below by saying it does use s (Oops. Fat finger + touch screen...) You contradict this statement below by saying it does use sessions, below. Just because you are not directly using a session, it does not mean that a framework isn't doing so behind the scenes. If there's no need to replicate sessions, you can still use the sticky-session mechanism to pin a session to a node. See server.xml, Engine.jvmRoute in the docs. p This needs arise because each tomcat servers will have it's own spring context (a kind of state, but not a per-user-session), and i am making use of flash attribute feature detailed in here : http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/mvc.html#mvc-flash-attributes Here are the relevant quotes from the page : Flash attributes provide a way for one request to store attributes intended for use in another. This is most commonly needed when redirecting — for example, the Post/Redirect/Get pattern. Flash attributes are saved temporarily before the redirect (typically in the session) to be made available to the request after the redirect and removed immediately. Flash attribute support is always on and does not need to enabled explicitly although if not used, it never causes HTTP session creation. On each request there is an input FlashMap with attributes passed from a previous request (if any) and an output FlashMap with attributes to save for a subsequent request. Both FlashMap instances are accessible from anywhere in Spring MVC through static methods in RequestContextUtils. -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
post redirect get to the same tomcat instance in a tomcat cluster ?
Hi all ! Is it possible to do POST submit to the tomcat-A, redirect happens, and then GET to the same tomcat-A again in a tomcat cluster ? And, in hope to make things easier, all the tomcat servers in the cluster are stateless wihout any sessions This needs arise because each tomcat servers will have it's own spring context (a kind of state, but not a per-user-session), and i am making use of flash attribute feature detailed in here : http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/mvc.html#mvc-flash-attributes Here are the relevant quotes from the page : Flash attributes provide a way for one request to store attributes intended for use in another. This is most commonly needed when redirecting — for example, the Post/Redirect/Get pattern. Flash attributes are saved temporarily before the redirect (typically in the session) to be made available to the request after the redirect and removed immediately. Flash attribute support is always on and does not need to enabled explicitly although if not used, it never causes HTTP session creation. On each request there is an input FlashMap with attributes passed from a previous request (if any) and an output FlashMap with attributes to save for a subsequent request. Both FlashMap instances are accessible from anywhere in Spring MVC through static methods in RequestContextUtils. -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Map domain names to different paths of a single webapp ?
I have checked the tuckey urlRewriter, and it seems cool, but doesnt seem to fit my needs. Anyway, you warnings make a lot of sense to me, so thanks there ! On Wed, Jun 13, 2012 at 2:29 AM, André Warnier a...@ice-sa.com wrote: Albert Kam wrote: Dear Tomcat Users ! Let's say that i have this simple webapp using Tomcat 7, and let's say the context name is albertzoo http://albertzoo.com albertzoo is not the context here, it's a Host. If you want that application to respond to the URL http://albertzoo.com/; (thus the context /), you will have to use the ROOT webapp. And then, i would like a niche site for monkeys with it's own domain : http://albertzoomonkeys.com albertzoomonkeys.com is the host. The context is /. which is actually the same as : http://albertzoo.com/monkeys In this one (barring tricks), monkeys is the context. But if the user is accessing through albertzoomonkeys.com, i dont want them to see the albertzoo.com/monkeys in their browser unless you do an external redirect, they should not see that. Is it possible to do with a single webapp context, or do i have to have different contexts(virtual hosts) for these different domains ? I think that technically, you could monkey around to achieve that. But it is probably a lot more trouble than it's worth (risks of double deployment, a mess when you undeploy or want to manage your apps etc..). Probably much better to use two separate Host, each with its own appBase (/webapps) directory; in one of them, you deploy your application as the ROOT (default) application (see the FAQ for that); in the other, you deploy *a copy* of the same application as monkeys (and, supposedly, some other animals application as ROOT). The only inconvenient is that when you update the monkeys application, you'll have to copy it to both places. But that will be much easier to manage, than to try some clever overlapping scheme which is going to come back and hit you somewhere.. Alternatively, if you feel adventurous, you could try a single Host with an Alias, and play with the URLrewrite filter (see www.tuckey.org) and internal redirects, but... you have been warned. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Observer pattern?
If you are talking about how to notify other webapps, i think you're actually talking about integration between existing applications here, which can be done using RMI (java only and using a specific port), Hessian/Burlap (support several languages + http, but not java serialization) , or even Spring's HttpInvoker (java + spring + use http). But i think it's more usual for people to just implement web services, either the RESTful way or the SOAP way, which makes use of HTTP (which doesnt normally get blocked by firewall). But if the weight of your question is on the observer pattern, which is kinda like publish / subscribe, for example, publishing change event, and the listener of that type of event will execute some code (perhaps invoking external web services), i suggest you to look at google guava's EventBus code.google.com/p/guava-libraries/wiki/EventBusExplained Updating the view without user intervention is about realtime user experience, which could involve polling or pushing changes. I am not quite familiar in this, but i think polling is about using a smart timer in javascript to fetch any data changes and then update the view appropriately. For pushing data from backend to frontend, perhaps html 5's websocket could do, and perhaps comet also ? On Wed, Jun 13, 2012 at 5:00 AM, Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov wrote: Could someone point me in the right direction. If three different web applications all rely on knowing when a piece of data changes, how does webapp #1 who makes the update, notify webapp #2 and webapp #3 that they need to make a request to update their view? For example: User of webapp #1 updates the status of something in a database and needs to inform the users of webapp #2 and webapp #3, who are updating other data yet watching for that status to change, that they need to update their view (fetch updated data from a database, or call some other method based on the changed status value). It sounds like the Observer pattern, but I don't know. Leo -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat7:run with multi maven modules changes
Aha, now the warning is gone. The cause was the old snapshot repository and pluginRepository i was still using. Thank you ! On Wed, May 9, 2012 at 1:33 PM, Olivier Lamy ol...@apache.org wrote: 2012/5/9 Albert Kam moonblade.w...@gmail.com: After the advices, i took a peek on the the eclipse maven run configuration that i use to launch tomcat7:run, and i notice the checkbox : Resolve Workspace Artifacts. Ticking that checkbox, and re-run the tomcat7:run works great now, which can see the other modules' changes without rebuilding ! Thanks a lot, i feel i can begin my fire dance now ! Anyway, i just want to report something that may not be related with this topic in case that'd be useful. I have these warnings when starting up tomcat7:run : [INFO] Scanning for projects... [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat7-maven-plugin\2.0-SNAPSHOT\maven-metadata-apa che.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset =utf-8\n Ext.onReady(Sonatype.init);\n /script\n/head... @65:8) [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat7-maven-plugin\2.0-SNAPSHOT\maven-metadata-apa che.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset =utf-8\n Ext.onReady(Sonatype.init);\n /script\n/head... @65:8) [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat-maven-plugin\2.0-SNAPSHOT\maven-metadata-apac he.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset= utf-8\n Ext.onReady(Sonatype.init);\n /script\n/head... @65:8) It looks you have bad metadata locally. Maybe a misconfigured repo manager. Delete files from C:\Users\albert\.m2\repository\org\apache\tomcat\maven\ to download all again. -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat7:run with multi maven modules changes
I notice that i have to repeat these steps so that tomcat7:run will see the newest stuffs from other maven modules : - rebuild all of my mvn modules (including my webapp module on which my tomcat7:run-ed, and other dependencies module) - clean my eclipse java project, rebuilding everything - tomcat7:run will then see the newest stuffs Note that i dont need to rebuild maven and eclipse project if i dont modify the webapp maven module, tomcat7 can automatically see the newest changes Ideally i would like to skip rebuilding everything in maven and then eclipse to see the newest changes in the other modules outside webapp module. Are there any tips to achieve this ? Thanks ! -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat7:run with multi maven modules changes
After the advices, i took a peek on the the eclipse maven run configuration that i use to launch tomcat7:run, and i notice the checkbox : Resolve Workspace Artifacts. Ticking that checkbox, and re-run the tomcat7:run works great now, which can see the other modules' changes without rebuilding ! Thanks a lot, i feel i can begin my fire dance now ! Anyway, i just want to report something that may not be related with this topic in case that'd be useful. I have these warnings when starting up tomcat7:run : [INFO] Scanning for projects... [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat7-maven-plugin\2.0-SNAPSHOT\maven-metadata-apa che.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset =utf-8\nExt.onReady(Sonatype.init);\n /script\n/head... @65:8) [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat7-maven-plugin\2.0-SNAPSHOT\maven-metadata-apa che.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset =utf-8\nExt.onReady(Sonatype.init);\n /script\n/head... @65:8) [WARNING] The metadata C:\Users\albert\.m2\repository\org\apache\tomcat\maven\tomcat-maven-plugin\2.0-SNAPSHOT\maven-metadata-apac he.snapshots.xml is invalid: end tag name /head must be the same as start tag link from line 56 (position: TEXT seen ...arset= utf-8\nExt.onReady(Sonatype.init);\n /script\n/head... @65:8) On Wed, May 9, 2012 at 1:45 AM, Jeff MAURY jeffma...@jeffmaury.com wrote: You need to write a M2E connector for a Maven MOJO that processes your projects files. I don't think this is the case for the tomcat7:run goal and it should work out of of the box in Eclipse. Just need to add a Maven lunch configuration with the proper goal. Regards Jeff On Tue, May 8, 2012 at 5:34 PM, Olivier Lamy ol...@apache.org wrote: I imagine you use tomcat7:run inside eclipse. Do that work outside eclipse ? Perso I don't have any issues as I use only command line and furthermore I don't use eclipse :-). I imagine there is some m2e connector to write 2012/5/8 Albert Kam moonblade.w...@gmail.com: I notice that i have to repeat these steps so that tomcat7:run will see the newest stuffs from other maven modules : - rebuild all of my mvn modules (including my webapp module on which my tomcat7:run-ed, and other dependencies module) - clean my eclipse java project, rebuilding everything - tomcat7:run will then see the newest stuffs Note that i dont need to rebuild maven and eclipse project if i dont modify the webapp maven module, tomcat7 can automatically see the newest changes Ideally i would like to skip rebuilding everything in maven and then eclipse to see the newest changes in the other modules outside webapp module. Are there any tips to achieve this ? Thanks ! -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Jeff MAURY Legacy code often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[tomcat maven plugin] configure vm options on embedded tomcat ?
I have successfully launched an embedded tomcat as detailed in here : http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html But i wonder whether it is possible to fork and set the extra vm arguments for the embedded tomcat launch ? I need to do it to supply javaagent argument because i am currently using spring and aop. Regards, Albert Kam - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [tomcat maven plugin] configure vm options on embedded tomcat ?
Works great now, thank you ! On Tue, May 1, 2012 at 5:45 PM, Olivier Lamy ol...@apache.org wrote: 2012/5/1 Albert Kam moonblade.w...@gmail.com: I have successfully launched an embedded tomcat as detailed in here : http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/adjust-embedded-tomcat-version.html But i wonder whether it is possible to fork and set the extra vm arguments for the embedded tomcat launch ? We do not fork a new vm. Extra vm arguments must be set via MAVEN_OPTS. I need to do it to supply javaagent argument because i am currently using spring and aop. Regards, Albert Kam - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to start Tomcat due to DISPLAY variable issue
Oh dear .. I've experienced this before. It seems that your server is running in a headless environment or without X or desktop libraries installed. Could be a init 3 in unix environment. In this case, if your JDK is = 1.4.x, it's easy to solve. =) You just need to edit your catalina.sh Add this line if you havent got one, or edit it if you already have it : JAVA_OPTS=-Djava.awt.headless=true HTH, Albert Kam On Tue, Aug 26, 2008 at 12:09 PM, Jayaraman, Gopinath [EMAIL PROTECTED] wrote: Hi Everyone, I am having this typical issue which many have faced which is below: Graphics ENV testing has failed. The Server is going to exit. Please check your configuration and retry. [2008-08-26 13:01:01.461] LogError java.lang.RuntimeException: Graphics ENV testing has failed. The Server is going to exit. Please check your configuration and retry. at jet.server.ServerEnv.$igc(jet/server/ServerEnv) at jet.server.ServerEnv.check(jet/server/ServerEnv) at jet.server.jrserver.JRRptServer.init(jet/server/jrserver/JRRptServer) at jet.server.jrserver.http.JRHttpRptServer.init(jet/server/jrserver/http/JRHttpRptServer) at jet.server.api.http.HttpUtil.initEnv(jet/server/api/http/HttpUtil) at jet.server.servlets.JRServlet.init(jet/server/servlets/JRServlet) According to suggestions from different threads, I have tried setting CATALINA_OPTS=$CATALINA_OPTS -Djava.awt.headless=true since the server is running in Solaris env. (5.8) and Tomcat 5.5.9 The production server is in a controlled environment, managed by System Admins, with limited acces to me. This was working fine one month back, but suddenly this issue started to crop up. We dont have much expertise in Tomcat here, so I could not much help from colleagues. I hope to get some pointers here. Thanks a lot in advance. Regards, Gopi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Remastering tomcat installer ..
Hello, I'm just wondering if it is possible to 'remaster' or rebuild tomcat-windows-installer, so that i could put my war files or my webapps along with it to produce a custom tomcat installer + my own webapps .. Is this legal and possible ? =) Regards, Albert Kam -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)
Re: Remastering tomcat installer ..
Hello, Thanks for the quick reply ! Could you point me the way to do this ? Like where can i find the the Installer build files for the latest tomcat release, what installer does it use (i assume it's NSIS), and how to build it .. I hope for some links. Keywords for me to search would be fantastic too :) I tried googling around, but im afraid i'm using the wrong keywords =p And the license is the Apache v2 license, am i correct ? Regards, Albert Kam On Thu, Aug 21, 2008 at 5:34 PM, Mark Thomas [EMAIL PROTECTED] wrote: Albert Kam wrote: Hello, I'm just wondering if it is possible to 'remaster' or rebuild tomcat-windows-installer, so that i could put my war files or my webapps along with it to produce a custom tomcat installer + my own webapps .. Is this legal and possible ? =) Yes on both counts, providing you adhere to the terms of the license. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)