IRC log for #tomcat on 20090118

00:39.48*** join/#tomcat cvasilak (n=cvasilak@ppp6-6.adsl.forthnet.gr)
00:49.16GurrakaIs there a simple application to test DB? Like connect and read a couple rows?
00:55.02dvayanusilly you
01:08.00*** join/#tomcat [[thufir]] (n=thufir@S01060016ec23af88.vs.shawcable.net)
01:12.20*** join/#tomcat clajo04_ (n=clajo04_@cpe-67-243-136-111.nyc.res.rr.com)
01:26.31deeboslow tomcat?
01:26.37deebotomcat in itself doesnt really do anything :)
01:26.42deeboits your app that is slow
01:37.49GurrakaYeah, but would be nice if its possible to tweak whatever settings there is to make it as fast as possible
02:01.48*** join/#tomcat MHSL (n=Linux@cm18.eta6.maxonline.com.sg)
02:19.28GurrakaCould using mysql-connector-java-3.1.6 cause slowdowns compared to latest 5.1?
02:19.39GurrakaOr is it more feature releases?
02:38.13*** join/#tomcat harpoon (n=harpoon@p5082DED1.dip.t-dialin.net)
03:06.42*** join/#tomcat bijoo_webdev (n=bijoo_we@c-98-204-54-131.hsd1.dc.comcast.net)
03:45.25*** part/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
03:45.42*** join/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
03:47.10*** part/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
03:47.24*** join/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
04:49.26*** join/#tomcat acidjnk (i=acid@pD950814E.dip0.t-ipconnect.de)
05:32.36*** join/#tomcat bindaas (n=chatzill@122.160.42.236)
05:33.31*** join/#tomcat bindaas (n=chatzill@122.160.42.236)
06:17.49*** join/#tomcat level3 (n=level3@89.31.88.219)
08:17.21*** join/#tomcat vikumar (n=Vimal@nat/redhat-in/x-987b685c05035ae7)
09:00.47*** join/#tomcat Gurraka (n=ASugg774@90-224-37-73-no61.tbcn.telia.com)
09:31.38*** join/#tomcat keith__ (n=keith@c-98-232-29-19.hsd1.wa.comcast.net)
09:49.33keith__Can someone please help me? I am having issues setting my classpath so I can use JDBC with Tomcat. I can get it to set correctly for my profile by editing .bashrc, but I cannot seem to set it system wide. I tried editing /etc/environment but that also didn't work. (Tomcat 6.0.18, Java 1.6.0_10, Ubuntu 8.10)
10:07.51*** join/#tomcat loddafnir (n=mike@chello080108111137.5.11.univie.teleweb.at)
10:11.07*** part/#tomcat level3 (n=level3@89.31.88.219)
10:25.52*** join/#tomcat Aaronluke (n=Aaronluk@unaffiliated/aaronluke)
10:43.06*** join/#tomcat Aaronluke (n=Aaronluk@unaffiliated/aaronluke)
10:54.27*** part/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
11:10.40*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
11:23.20*** join/#tomcat dvayanu (n=another@ppp-88-217-53-157.dynamic.mnet-online.de)
11:32.03*** join/#tomcat hurra (n=hans@stargazer.st-peter.stw.uni-erlangen.de)
11:43.26GurrakaTry putting the jars in $CATALINA_HOME/lib
11:47.53*** join/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
11:48.01GurrakaI can now replicate what goes slow in my application, but is there a way I can debug to see what it does on a request? I got two sections, one of them is slow one is fast.
11:48.21GurrakaMaybe more a Java question. :)
11:50.06kjkoster5489Garruka: what have you found so far?
11:50.15bender183Gurraka: you want to see heap usage and gc and etc?
11:50.38bender183cacti + java snmp + netsnmp
11:50.51bender183proxy javasnmp to netsnmp
11:51.02bender183or
11:51.05bender183enable jmx
11:51.13kjkoster5489jconsole, visualvm
11:51.18kjkoster5489zabbix + zapcat
11:51.20bender183and fire up jconsole
11:51.39GurrakaI can se heapusage and gc with java-monitor
11:51.45bender183herm never heard of any of those
11:51.58GurrakaIts the same application
11:52.05bender183ok
11:52.19GurrakaRunning one same server, just that certain requests are slow and some are slow depending on what page you request.
11:52.21*** part/#tomcat hurra (n=hans@stargazer.st-peter.stw.uni-erlangen.de)
11:52.40GurrakaWas thinking it would be an easy way to just follow each request
11:53.00GurrakaAs it's server specific and not possible to replicate on localsystem.
11:53.08kjkoster5489What can help is split the problem between Java and your (presumed) database.
11:53.35bender183wow zabbix looks impressive
11:53.37kjkoster5489... using p6spy.
11:53.43GurrakaYes, I integrated p6spy without any results
11:54.16bender183thx for the heads up kind sir kjkoster5489
11:54.22GurrakaOn my localsystem that is, will add it to the live system later tonight.
11:54.40kjkoster5489But you can't reproduce the problem locally anyway, you said.
11:55.37kjkoster5489bender183: I use Zabbix for the machine-level monitoring of my infrastructure. Java-level stuff I use Java-monitor for, but if you want to use Zabbix for that too, you can use Zapcat to bridge JMX to Zabbix.
11:55.43kjkoster5489oh
11:55.46kjkoster5489heh
11:55.59GurrakaTrue - but as some content loads fine from database I thought it might be more application fault than db
11:56.02*** join/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
11:56.05Gurraka:)
11:59.21GurrakaIs there a way to integrate p6spy without tomcat restart? On localsystem, I had to add -Dp6.home to tomcat_opts
12:02.25GurrakaRuled out DB as placing an empty .jsp also gives over a second when placing in webappdir
12:08.41kjkoster5489bender183: I use Zabbix for the machine-level monitoring of my infrastructure. Java-level stuff I use Java-monitor for, but if you want to use Zabbix for that too, you can use Zapcat to bridge JMX to Zabbix.
12:08.52kjkoster5489Zabbix is a resource hog, though.
12:09.52kjkoster5489Garruka: if the data sources are defined entirely in the webapp and you have the driver in WEB-INF/lib you may get away with just a context redeploy.
12:10.09kjkoster5489For that particular webapp it's just as bad as a restart, though.
12:13.09GurrakaYeah, that would be fine.
12:13.32GurrakaBut tried on my localsystem, no DB access is made on accessing a test.jsp file.
12:13.48Gurrakatest.jsp only outputs a line of text and takes over a second to load if in webbapp dir
12:14.02GurrakaOn an empty webapp dir, it loads in couple of ms
12:14.56GurrakaMust be a library thats taking time to process
12:16.57kjkoster5489This is not the first hit on the JSP that you're timing, is it?
12:17.02kjkoster5489They need to be compiled.
12:19.53GurrakaNo, every reload
12:20.07kjkoster5489Just checking.
12:20.31GurrakaI appreciate it, must have forgotten something really vital.
12:20.54kjkoster5489Is that machine the one that runs on its marksweep GC and not the scavenge GC?
12:21.01Gurrakayes
12:21.29kjkoster5489Well, your machine is bogged down in garbage collects, as I explained on Java-monitor.
12:21.55kjkoster5489It has no time to deal with your pesky jsp's.
12:21.57kjkoster5489;)
12:23.30GurrakaBut on same machine I can run the jsp in an empty webappdir and get response time of 29 ms
12:24.16kjkoster5489So you have two tomcats or one?
12:24.24GurrakaOne tomcat, different vhosts
12:24.38kjkoster5489...
12:25.44kjkoster5489Does that 'slow' webapp have servlet filters in the web.xml?
12:26.57GurrakaYes, a couple of them
12:28.11kjkoster5489Does your test.jsp match with any of them?
12:28.28GurrakaYes, they are global /*
12:29.03kjkoster5489That explains your difference in speed.
12:29.51GurrakaYe, but need to find out which of them is making it slow.
12:29.53kjkoster5489Do any these filters cause database queries to be run?
12:30.04GurrakaNot according to p6spy in thelocal environemnt
12:30.12GurrakaNothing is logged when loading the .jsp
12:30.28kjkoster5489hmm.
12:30.44GurrakaYeah, thats what I've been saying all morning. :)
12:30.45kjkoster5489Other extrernal systems (ldap, web services)
12:31.15Gurrakano ldap, nothing should be external.
12:31.40GurrakaCan check traffic on load.
12:31.46kjkoster5489file access?
12:33.02GurrakaMost likely some fileaccess, like logwriting
12:33.54GurrakaPut logging to minimal and still same speeds
12:35.49kjkoster5489What is your -Xmx setting?
12:36.23kjkoster5489If your system is running on marksweep and not scavenge, all other tuning is pointless: you have too little memory.
12:41.21Gurraka-server -Xms512M -Xmx4096M -XX:MaxPermSize=1024M -Djava.awt.headless=true
12:42.24kjkoster5489When you posted on Java-monitor, was it with these settings?
12:43.20GurrakaYes, all I added was -server
12:43.31Gurrakaand headless=true
12:44.34kjkoster5489So your tomcat ate all the 4G?
12:44.45kjkoster5489That's a lot of memory.
12:45.44GurrakaBut it doesnt show on logging like mrtg that its using alot of memory?
12:46.18kjkoster5489What does Java-monitor say about memory use?
12:46.27kjkoster5489heap memory
12:50.02GurrakaLast report said 20% heap, 43% non-heap, 0% fp
12:50.05Gurrakafds
12:53.23kjkoster5489It only uses 20% of that 4G...
12:53.36kjkoster5489Strange. Why does it still run on the marksweep gc?
12:56.47GurrakaIs that heapusage for just the application or overal for tomcat?
12:58.19GurrakaBy the way, is there a donation page on java-monitor?
12:58.58GurrakaCould atleast buy you a couple beers for your help so far. :)
13:10.53*** join/#tomcat trifon (n=chatzill@79-100-46-249.btc-net.bg)
13:16.05*** join/#tomcat bindaas (n=chatzill@122.160.42.236)
13:28.52dvayanuhello guys
13:37.28Gurrakahey
13:37.49GurrakaKjkoster: Found a reason to the high GC, its running         System.gc() on each request.
13:38.02GurrakaCould that cause a bit slowness maybe?
13:39.47dvayanuoh mfg :-)
13:39.54dvayanuadd -XX:disableEplicitGC
13:40.02dvayanuexplicit
13:40.22dvayanuXX:+DisableExplicitGC
13:40.44GurrakaI tell you the same, not the author of that code line thou
13:41.12GurrakaGuess its not as noticable when running lower GC
13:41.31GurrakaI guess it takes longer to run a GC if XMX value is higher?
13:41.41dvayanunot necessary
13:41.46dvayanuit depends on spaces
13:41.57GurrakaRunning multiple applications then?
13:42.07dvayanuit depends on the size of each space
13:42.20dvayanurunning multiple applications?
13:42.30GurrakaMultiple sites that is
13:42.40dvayanuno, same tomcat instance
13:42.49dvayanuthe memory settings are per hvm
13:42.52dvayanujvm
13:43.05dvayanuwhat you should do is 1) disable explicit gc, its a really stupid idea
13:43.18dvayanu2) set ms to the same value as mx
13:43.36GurrakaWould that disable any system.gc calls?
13:43.48dvayanuyes, the first option would disable all system.gc calls
13:45.29GurrakaExactly what I need
13:45.32GurrakaThanks
13:45.51GurrakaI guess I got some much needed headcutting when I get back to the office on monday. :)
13:46.01dvayanubut you should reallly really really considering setting same values in mx and ms
13:46.12Gurrakayeah, xmx and xms is set
13:46.45Gurraka-server -Xms512M -Xmx4096M -XX:MaxPermSize=1024M -Djava.awt.headless=true
13:48.43dvayanunono
13:48.48dvayanuset them both to the SAME value
13:48.53dvayanunot two different values
13:51.55*** join/#tomcat yassine (n=yassine@unaffiliated/yassine)
13:52.16dvayanuhey yassine
13:52.48yassinehey dvayanu
14:18.58*** join/#tomcat trifon_ (n=chatzill@79-100-33-10.btc-net.bg)
14:27.16*** join/#tomcat trifon__ (n=chatzill@79.100.217.144)
14:40.15*** join/#tomcat lonel (i=r0ny@203.206.208.204)
14:40.19lonelhi
14:40.28loneldo i need to get JNDIRealm?
14:40.39lonelis it available as jar?
14:47.41*** join/#tomcat nixblicker (n=nixblick@dslb-088-074-036-041.pools.arcor-ip.net)
14:49.33*** join/#tomcat trifon (n=chatzill@79-100-36-125.btc-net.bg)
14:55.18*** join/#tomcat trifon (n=chatzill@79.100.223.220)
14:58.17*** join/#tomcat trifon_ (n=chatzill@79-100-47-213.btc-net.bg)
15:11.33*** join/#tomcat trifon__ (n=chatzill@79-100-43-93.btc-net.bg)
17:15.48*** join/#tomcat trifon_ (n=chatzill@79-100-176-231.btc-net.bg)
17:25.48*** join/#tomcat trifon_ (n=chatzill@79-100-39-249.btc-net.bg)
18:00.24*** join/#tomcat karstensrage (n=karstens@c-24-23-190-107.hsd1.ca.comcast.net)
18:09.36*** join/#tomcat trifon (n=chatzill@79-100-178-226.btc-net.bg)
18:11.48*** join/#tomcat tnek (n=chatzill@193.15.169.50)
18:16.31tnekI added a line in tomcat-users.xml to let me use the admin and manager applications. I kept the file as it was except from that. Should I change the passwords on the users tomcat, both and role1 to something else? What could someone do to my system if I don't? (my tomcat-users.xml http://pastebin.com/de0200ab )
18:21.06*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
18:21.45kjkoster5489Garukka: Whaaaat!?
18:25.53*** join/#tomcat trifon_ (n=chatzill@79-100-46-68.btc-net.bg)
18:26.08kjkoster5489lonel: what problem do you want to solve?
18:26.30lonelkjkoster5489: thanks for asking
18:26.35loneli resolved it
18:26.42kjkoster5489Gurakka: I meant to 'Whaaat!?' at you.
18:26.46kjkoster5489lonel: np
18:26.50loneli was integrating ldap users with tomcat
18:27.17kjkoster5489Good to hear it works.
18:28.28lonelyeah awesome
18:37.14*** join/#tomcat keith80403 (n=keith804@71-208-237-158.hlrn.qwest.net)
18:41.38*** join/#tomcat trifon_ (n=chatzill@79-100-35-6.btc-net.bg)
18:53.11GurrakaKjkoster: Yeah, system.gc() was the badguy. Why we saw so many GCs
18:53.53kjkoster5489Great catch. Was that your code?
18:54.07GurrakaNot mine, but one of our developers.
18:54.42kjkoster5489I'd love to hear his reasoning.
18:54.56kjkoster5489And see the test cases that demonstrate that this was the better implementation.
18:55.05Gurrakalol, don't think there is any reasoning behind it.
18:56.02kjkoster5489Uhm. About that beer you spoke of.
18:56.07GurrakaThanks for all your help thou.
18:56.14kjkoster5489np
18:56.29GurrakaYeah? you could use it for a new babybottle if you prefer that. :)
18:56.37kjkoster5489I'm visiting all Java-monitor users that I can travel to from the Netherlands.
18:57.04kjkoster5489I was wondering if you are withing a hundred km's or so from the Dutch border?
18:57.42kjkoster5489My kid uses beer bottles to put lego-men into.
18:57.51GurrakaI think its a bit further than that, Sweden here.
18:57.52Gurrakalol
18:58.15GurrakaAren't you afraid he would cut himself?
18:58.30GurrakaNot intenionally ofcourse, but by accident
18:59.47kjkoster5489Well, Sweden should be doable, if you are in the south somewhere.
19:00.00kjkoster5489A little cut won't hurt him.
19:00.50kjkoster5489I don't have a donation page for Java-monitor. Thanks for the offer.
19:01.06kjkoster5489I donate to PJ from Groklaw every year, if you know who that is.
19:01.12kjkoster5489She needs the money more than I do.
19:01.43kjkoster5489What would really help me, would be for you to respond to the thread on Java-monitor and tell everyone the solution you found.
19:04.15GurrakaYeah, I will.
19:04.29GurrakaI like the inpuit I got there so far, I'll keep an eye on it.
19:04.41kjkoster5489That, and demonstrate Java-monitor to everyone you meet. :-)
19:04.46kjkoster5489Thanks for the compliment.
19:04.48GurrakaPJ from Groklaw?
19:05.02kjkoster5489She covers the SCO vs IMB trials.
19:05.11kjkoster5489http://www.groklaw.net/
19:06.06kjkoster5489IBM I mean
19:06.07kjkoster5489She is building an archive of all the trial documents, plus commenting (read: translating) on them.
19:07.16GurrakaNice, not heard of it
19:07.37kjkoster5489Don't worry about that, not many people have.
19:08.17kjkoster5489She has built a strong community around her and is more or less signlehandedly cementing a legal foundation for GPL and Linux and OSS in general.
19:09.11kjkoster5489Just one last question: was System.gc() on the JSP pages, or in the webapp's code itself?
19:09.15kjkoster5489How did you find it?
19:11.56GurrakaIt was in the webbapp, in the class handling URLRewrites
19:13.14kjkoster5489One of the servlet filter classes?
19:13.31GurrakaYes, the main one
19:14.18GurrakaIt called a method to clean a bufferlog, and in the same method it sent System.GC()
19:14.41kjkoster5489Is the code using weak references?
19:15.35GurrakaNot sure what that is, sorry. Just a lowlevel javaprogrammer
19:17.23kjkoster5489e.g. http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/WeakReference.html
19:17.49kjkoster5489Basically it is a way to reference objects without preventing the GC to collect it. Makes for efficient caches if used well.
19:18.23kjkoster5489When I see them used, the programmers usually also start using System.gc() to steer the behaviour of the references.
19:18.39GurrakaNo, nothing in the method atleast
19:18.43kjkoster5489They are a sign of a junior programmer trying to be clever.
19:18.49kjkoster5489Just checking. :)
19:19.21GurrakaThanks. :) Better to find more bugs while at it... :D
19:19.53GurrakaAlso did a projectsearch for gc() and its the only reference to it
19:19.54kjkoster5489Have you changed the system yet to remove the gc() calls, or do you have to wait until Monday?
19:20.29kjkoster5489I am curious how much the performance improved for you.
19:20.47kjkoster5489Your case makes nice textbook material. :)
19:20.56kjkoster5489brb
19:21.33GurrakaI did it for a testproject and already seen very good performance
19:21.42GurrakaFrom 1.7 seconds to 87 ms. :)
19:21.54GurrakaJust by commenting one row
19:23.19GurrakaIf I put on a normal load it went up to 7-8s
19:23.50GurrakaWill do another performance test tomorrow. :)
19:29.18kjkoster5489Impressive.
19:29.38kjkoster5489Let us know what your next bottleneck is. ;-)
19:31.13Gurrakalol
19:31.41GurrakaCan't see how noone of the core programmers not seen it
19:38.26*** join/#tomcat trifon_ (n=chatzill@77-85-191-182.btc-net.bg)
19:40.04*** join/#tomcat bizboo (n=bizboo@meu77-1-82-241-107-111.fbx.proxad.net)
19:40.49*** join/#tomcat keith__ (n=keith@c-98-232-29-19.hsd1.wa.comcast.net)
19:42.14keith__Can someone please help me with this error I am receiving: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I think all I should need to do is set the CLASSPATH correctly, but I nothing I try seems to fix the problem. (Tomcat 6.0.18, Java 1.6.0_10, Ubuntu 8.10)
19:43.12kjkoster5489keith__: where have you entered the JDBC url? In what file?
19:43.40keith__kjkoster5489: I have a short scriptlet in index.jsp, is that what you are asking?
19:44.04kjkoster5489Ok. So you have not defined in a context xml file?
19:44.35keith__kjkoster5489: No...
19:44.45kjkoster5489Cool.
19:45.03kjkoster5489Where have you placed the mysql JDBC driver JAR file?
19:46.02keith__kjkoster5489: I installed it form the ubuntu repository. It is located in /usr/share/java/mysql.jar.
19:46.26kjkoster5489You should not use the ubuntu repo for that.
19:46.37keith__kjkoster5489: oh? Why is that?
19:46.48kjkoster5489Just download it and place it in your WEB-INF/lib filder.
19:47.23kjkoster5489Well, in the Java domain, the repackaging that goes on in the various distro's tend to randomly move stuff around and give it new names.
19:47.43kjkoster5489That makes it really hard for me (FreeBSD guy) to help you (Ubuntu guy).
19:48.03kjkoster5489So, I stick to the files as they are distributed.
19:48.14keith__kjkoster5489: Well, if it helps... JDBC works just fine from a .java file when I have the CLASSPATH set correctly.
19:48.17kjkoster5489The repackaged ones are for experienced admins.
19:48.32kjkoster5489I know, but classpaths are really different for Tomcat serrvers.
19:49.09keith__kjkoster5489: OK. I thought about trying what you said, but it annoyed me that I couldn't figure out the classpath way. Guess I like a challenge. :)
19:49.27keith__kjkoster5489: Let me copy it over and try it now though
19:49.51kjkoster5489Cool.
19:50.21keith__kjkoster5489: Is there a recommended link for the JDBC? Or should I just google it?
19:50.47keith__kjkoster5489: dumb question, SUN's site, right?
19:51.23kjkoster5489JDBC API is in Java, so you already have it. You just need a driver from mysql.
19:51.23keith__kjkoster5489: Actually, it isn't sun, is it? *sigh*
19:51.42keith__kjkoster5489: so the mysql site?
19:51.47kjkoster5489Java is Open Source.
19:51.54kjkoster5489Google: download mysql driver. :-)
19:52.44kjkoster5489Here is some discussion on repackaging: http://java-monitor.com/forum/showthread.php?t=4
19:52.58kjkoster5489And here http://java-monitor.com/forum/showthread.php?t=33
19:54.25*** join/#tomcat bindaas (n=chatzill@122.160.42.236)
19:55.11keith__kjkoster5489: Do I want to ignore the "myodbc-installer"?
19:55.21kjkoster5489Are you using an installer?
19:55.58keith__kjkoster5489: I just downloaded the tarball from the mysql site, it has a bin and a lib folder inside
19:56.27kjkoster5489Something like mysql-connector-*.jar is what you need.
19:56.56keith__kjkoster5489: Nothing like that... (would the installer create that file?)
19:56.58kjkoster5489I use mysql-connector-java-5.1.5-bin.jar
19:58.37kjkoster5489You didn't download the ODBC driver, did you?
19:59.04kjkoster5489You can also copy over your /usr/share/java/mysql.jar over.
19:59.22keith__kjkoster5489: That might be easier...
19:59.35keith__kjkoster5489: and yes, I did download the ODBC driver...
20:00.21keith__kjkoster5489: Didn't notice that, I have the right on now
20:00.24kjkoster5489http://dev.mysql.com/downloads/connector/j/5.1.html in case you change your mind.
20:05.34keith__kjkoster5489: So I should put it in /var/lib/tomcat6/webapps/ROOT/WEB-INF/lib? or/var/lib/tomcat6/lib?
20:07.53kjkoster5489Depends where you configured the databsource.
20:07.59kjkoster5489Hence my qustion earlier.
20:08.25kjkoster5489Put it into your WEB-INF/lib for now, and move it to tomcat/lib once you start using context xml files.
20:08.53keith__kjkoster5489: Ah... there we go... different error this time. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure. Does this mean it is seeing the driver correctly?
20:09.03kjkoster5489Yes.
20:09.38kjkoster5489What is the host your configured and can you connect to it from the tomcat machine on port 3306?
20:10.09keith__kjkoster5489: I don't understand the question
20:10.19kjkoster5489This is a network connection error.
20:10.31kjkoster5489You entered a JDBC url that has a host name in it.
20:10.47keith__kjkoster5489: I am running it on localhost
20:10.49kjkoster5489Or MySQL is not accepting remote connections.
20:10.59kjkoster5489'remote' being networked.
20:11.03kjkoster5489Is MYSQL running?
20:11.21keith__kjkoster5489: yes
20:12.02*** join/#tomcat wltjr (n=wltjr@unaffiliated/wltjr)
20:16.16*** join/#tomcat trifon (n=chatzill@77-85-190-16.btc-net.bg)
20:17.56keith__kjkoster5489: Any thoughts on why a connection isn't being made?
20:18.04kjkoster5489Firewall?
20:18.16kjkoster5489MySQL not accepting network connections?
20:18.37kjkoster5489Please pastebin the full error stacktrace.
20:18.44keith__kjkoster5489: On localhost? And as I said, my java file connects to the database fine
20:18.48keith__kjkoster5489: ok
20:18.55kjkoster5489good point.
20:20.25keith__kjkoster5489: This is interesting... :)
20:20.27keith__kjkoster5489: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
20:21.21kjkoster5489Hahaha, I love repackaged tomcats.
20:21.26kjkoster5489Hang on...
20:21.57kjkoster5489http://java-monitor.com/forum/showthread.php?t=134
20:21.59kjkoster5489To see.
20:22.12kjkoster5489Or just download a normal Tomcat from Apache.org
20:22.32keith__kjkoster5489: So this is happening because of the repackaging?
20:22.58kjkoster5489Someone secured the Tomcat that you downloaded.
20:23.12keith__kjkoster5489: Is that good or bad? lol
20:23.13kjkoster5489For experts that is useful. For normal people, that is confusing.
20:23.24kjkoster5489:-)
20:23.48keith__kjkoster5489: I probably should learn how to use the security manager at some point, eh?
20:24.11kjkoster5489The thread on Java-monitor will help you onto that route.
20:24.42keith__kjkoster5489: Do you know of a good Tomcat tutorial? or are the tomcat docs the best resource?
20:25.12kjkoster5489The security manager is a Java thing, so stick with the Sun docs.
20:25.26kjkoster5489http://java.sun.com/j2se/1.5.0/docs/guide/security/PolicyFiles.html
20:26.59keith__Oh... but Tomcat implements the Java Security Manager where normal java code wouldn't, right?
20:27.17kjkoster5489The *ubuntu* repackaged tomcat does.
20:27.30kjkoster5489Let's lay blame in the right place. :)
20:27.35keith__kjkoster5489: Right. lol
20:27.47keith__kjkoster5489: Is it some sort of add on module for tomcat?
20:27.49kjkoster5489:-)
20:28.45kjkoster5489No, the security manager is a standard part of Java.
20:29.00kjkoster5489Your browser uses it to lock down applets.
20:29.38keith__Ah... so normal java code running in the terminal would not be affected, but the browser uses it to protect you from malicious scripts?
20:29.41kjkoster5489Ubuntu's tomcat just enabled it where most Java apps do not enable it.
20:29.55kjkoster5489Right. Same security manager.
20:30.04kjkoster5489It is really a cool tool.
20:30.50keith__kjkoster5489: I hate trying to learn too many things at once. It is never possible to learn just one thing at a time, is it? lol
20:31.06kjkoster5489Especially when you are dealing with Java.
20:31.33keith__kjkoster5489: I am getting further and further away from my goal of learning jsp. :-D
20:31.36kjkoster5489If you do not want to invest the time, use the tomcat from Apache.org. That is the reference for me too.
20:34.56keith__kjkoster5489: Who exactly does the security manager protect? The person visiting the page?
20:35.21keith__kjkoster5489: Or the server?
20:35.42kjkoster5489It sandboxes the Tomcat so that if someone manages to take control of Tomcat, he can only do what the app could do already.
20:35.52kjkoster5489So it protectes the OS and the server.
20:36.06kjkoster5489Think of a webapp as a bizarre applet. :)
20:36.16keith__kjkoster5489: gotcha, haha.
20:36.39kjkoster5489It is used by JSP hostign companies to lock down what you can and cannot do in your JSP.
20:37.00kjkoster5489You, as a developer can use it to avoid opening the wrong files and sockets.
20:37.11keith__kjkoster5489: Makes sense
20:38.12keith__kjkoster5489: What does the admin package for tomcat let you do?
20:38.21*** join/#tomcat Atanasov (i=Atanasov@dslb-088-064-090-196.pools.arcor-ip.net)
20:38.47kjkoster5489I'm not sure. I delete all webapps when I unpack a new Tomat.
20:39.06keith__kjkoster5489: I installed it from the repo, but I am not sure what it does. :)
20:39.21keith__kjkoster5489: or where it even installed for that matter
20:39.40Atanasovhello tomcat gurus, geetz from Munich :)
20:39.44kjkoster5489No idea. I never use repackaged Tomcats.
20:39.51kjkoster5489Hello Atanasov
20:40.06keith__kjkoster5489: Do you set up your own security? or is that not an issue for you?
20:40.49kjkoster5489My Tomcat servers do not use a security manager. I delete unused webapps and connectors and firewall of unused ports that remain (8005).
20:41.21kjkoster5489For larger setups, they end up behind Apache anyway, so then there is no way to get at my Tomcats anyway.
20:41.36kjkoster5489I still plan to start using the security manager.
20:41.42kjkoster5489someday...
20:42.00keith__kjkoster5489: Behind apache?
20:42.13kjkoster5489Apache httpd.
20:42.30keith__kjkoster5489: Oh, is tomcat is not a full web server?
20:42.37kjkoster5489Yes, it is.
20:42.42jasonbkeith__: It is.
20:42.55kjkoster5489It does not do php out of the box and I need PHP as well as JSP.
20:43.16kjkoster5489I could use the PHP servlet, but I am happy with Apache and Tomcat together.
20:43.43keith__ah, ok... interesting
20:43.45keith__do I want to edit /conf/policy.d/04.webapps.policy?
20:44.09kjkoster5489That's nonstandard.
20:44.13kjkoster5489You tell me. :-)
20:44.29jasonbRunning Tomcat behind Apache httpd results in a loss of about half or more of your Tomcat's performance.
20:44.51keith__kjkoster5489: Let me guess, that structure is a debian thing too? :p
20:45.10jasonbkeith__: Why do you believe you need to use the Java security manager?
20:45.23keith__jasonb: Because I am locked down. :-D
20:45.33kjkoster5489jasonb: I know, I know.
20:45.40kjkoster5489Someday.maybe.
20:46.07keith__jasonb: I am running tomcat from the repositories, and I am thinking it would be better for now to just download it from apache
20:47.07jasonbYour site can perform much better if Tomcat is the first-contact web server, proxying some requests to Apache httpd (for PHP) than if you set up the reverse configuration where Apache httpd is the first contact web server and proxies most requests to Tomcat.
20:47.11keith__kjkoster5489: Why do you need jsp and php? Can't jsp do everything php can do?
20:48.07jasonbkeith__: Probably it would be better to download it from Apache.  OR, download my RPM package and run that, which is effectively the from-Apache official release binaries integrated with a very well working Linux init script.
20:48.16kjkoster5489I run a PHP-based forum (java-monitor.com) that has some custom code in it for the monitoring tool. I am a Java dude, so I have not written the monitoring part in PHP.
20:48.31kjkoster5489It sounds messier than it is.
20:48.50keith__kjkoster5489: Oh, that forum is yours?
20:48.55kjkoster5489Yes, it is.
20:49.09keith__kjkoster5489: That explains why you seem partial to it... :D
20:49.14kjkoster5489I'm trying to build a community there.
20:49.37keith__kjkoster5489: What type of community?
20:49.48kjkoster5489*shrug* I know I'm basically spamming this channel, but I believe that I help enough people to offset the bother.
20:50.09kjkoster5489People running Java in production. The administrative side of Java.
20:50.37kjkoster5489Admins who have to deal with Tomcat or JBoss. Developers who are also doing clean deployments.
20:51.01keith__kjkoster5489: Ah, nifty
20:51.35keith__kjkoster5489: Thanks for your help, btw
20:51.42kjkoster5489Plus, I find it convenient to not have to repeat myself, so I post my help on Java-monitor and past the URLs into my IRC client when a question comes up again.
20:51.44kjkoster5489np
20:52.12kjkoster5489Helping eachother seems to set the engineers apart from a lot of other types of people. ;)
20:52.16keith__It will take me a few mins to install tomcat from apache I am sure, but I think it will work once I do
20:52.36keith__I always look forward to the day I know enough to help people... ;-D
20:53.26kjkoster5489It's the easiest way to learn new stuff.
20:54.43keith__Core vs. Deployer... ?
20:55.08jasonbkeith__: It's fun.  But, the sad part is: after you spend literally years finding the not-so-intuitive solutions for things, and then you literally give away the answer to people, then they don't believe you and refuse to take advantage of the solution.  :(
20:55.32kjkoster5489Core.
20:55.35keith__jasonb: Yeah, that would be annoying
20:55.53jasonbkeith__: That's actually the most common outcome, sadly.
20:55.59kjkoster5489jasonb: charge more.
20:56.46keith__jasonb: Have you used gparted?
20:56.51jasonbkjkoster5489: In the OSS community, everyone seems to want to painfully figure everything out for themselves, and don't want to pay for the answer, when a moderately priced solution would actually be less costly than all their time they'd spend on finding the same answer.  heh!
20:56.57jasonbkeith__: Of course.
20:57.21keith__jasonb: Just checking, I recommended it to someone this morning to format a flash drive
20:57.46jasonbkeith__: gparted is one of those almost hidden gems of OSS.
20:57.47keith__jasonb: They said, oh... I have never used that, I'll try it in Windows first and use that as a last resort. lol
20:57.55jasonbheh.. See?!
20:58.16keith__It isn't exactly rocket science to figure out. :p
20:58.16jasonbalso uses System Rescue CD.
20:58.41keith__They apparently wanted a simple one liner for the terminal
20:59.02keith__That just seems more complicated
20:59.18keith__especially for someone who doesn't seem to know much about Ubuntu
20:59.20keith__:D
21:00.08jasonbuses Fedora.
21:00.20keith__jasonb: same general principle though
21:00.26jasonbSure.
21:01.20keith__I usually follow advice, though I do like to understand the advice. :-D
21:02.24keith__For example, if kjkoster5489 had just told me to download Tomcat from Apache and it would fix my problem, I might have been skeptical without understanding why. :D
21:03.10keith__On that note...
21:03.20keith__kjkoster5489: Why Core? What is the Deployer?
21:03.26keith__:)
21:05.28kjkoster5489Dunno, I always use Core.
21:05.36kjkoster5489:-)
21:06.53jasonbCore = the core of Tomcat.. the servlet container + web server itself.
21:07.10jasonbDeployer = an Ant-based webapp deployer (stand-alone).. you don't really need it.
21:07.32keith__Is it more for larger scale production environments?
21:07.42jasonb"it"?
21:07.49keith__the Deployer
21:08.00jasonbNot necessarily.
21:08.35jasonbIMHO, it's for people who really want to use Ant to do automated deployments, and need a good code example to either look at or incorporate into their existing Ant build file(s).
21:09.04keith__ah, gotcha
21:11.34keith__So, is /var/lib/tomcat6 the "standard" path? or is that a Debian/Ubuntu thing too?
21:15.14kjkoster5489ubunti
21:15.38kjkoster5489The standard layout is what your find in the zip, and you are free to put it where you like.
21:16.04keith__I know, but I can never decide where to put things, lol.
21:16.16kjkoster5489I use the home dir of the Tomcat user, others use /opt or /usr/local.
21:16.46keith__The tomcat user doesn't have a home directory... :D
21:16.51keith__not for me, that is
21:17.48keith__What is the deal with /opt? Why do some programs install there? Shouldn't most programs be in /usr?
21:18.02keith__or /var in the case of web servers?
21:21.09kjkoster5489I think solaris uses /opt by default.
21:21.14kjkoster5489*shurg*
21:21.57keith__I think Ubuntu uses /opt for installing eclipse... I just thought there was supposed to be a convention and I can never understand it. lol
21:23.13kjkoster5489I just follow my own conventions on my own machines, and the admin's conventions on other people's boxes.
21:29.30*** join/#tomcat trifon_ (n=chatzill@77-85-191-219.btc-net.bg)
21:34.19kjkoster5489'night all
21:57.23*** join/#tomcat geaaru (n=geaaru@host230-209-dynamic.50-79-r.retail.telecomitalia.it)
21:57.58geaaru<PROTECTED>
21:58.11geaaruservlet is instantiated 2 time and so for any HTTP request servlet is called two time
21:58.13geaaruwhy?
22:54.17*** join/#tomcat bender183 (i=politico@unaffiliated/bender183)
22:58.47*** join/#tomcat bender183 (i=politico@unaffiliated/bender183)
23:00.39*** part/#tomcat bender183 (i=politico@unaffiliated/bender183)
23:00.54*** join/#tomcat bender183 (n=OWinNOW@unaffiliated/bender183)
23:44.34*** join/#tomcat localt (n=chatzill@c-98-221-250-160.hsd1.nj.comcast.net)
23:46.54localtHello, I'm using Tomcat 6.0.18 & Java 1.6.0.7. I'm trying to have the following logic: JSP page with a form, posted and handled by a source servlet (not JSP). I want to response to be a popup message (I.E "completed") and to go back to another JSP (like Home.jsp). The form is posted via AJAX. How can this be done?

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.