IRC log for #tomcat on 20100917

00:01.13*** join/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
00:47.17*** join/#tomcat jieryn-w (~jieryn@gentoo/contributor/jieryn)
00:50.17*** join/#tomcat JabDesign (~Jabber@c-68-48-252-100.hsd1.md.comcast.net)
01:05.27*** join/#tomcat 92AAA48I6 (~quassel@c-76-123-109-141.hsd1.fl.comcast.net)
01:46.47jieryn-wi find lots of bad search hits for getting HTTPS working with apache httpd+tomcat
01:47.17jieryn-wi have ip vhosts, but the ips are all bound to one single eth using aliases
01:47.43jieryn-wi also have many non-https, non-j2ee, vhosts which i need to keep around
01:48.05jieryn-wanyhow, can someone recommend good tutorial for this kind of thing?
01:53.17jasonbjieryn-w: I wrote up a detailed tutorial on it, with step-by-step instructions, including the commands to run in our book Tomcat: The Definitive Guide (O'Reilly).
01:54.00jasonbOh, actually, I misread what you wrote above.. you're talking about configuring Apache httpd for HTTPS, not Tomcat.
01:54.49jasonbThat's a more complex configuration, and yes, you'll find endless bad pages about it.
01:55.00*** part/#tomcat Primer (~daniel@www.ceregatti.org)
01:56.53*** join/#tomcat Primer (~daniel@www.ceregatti.org)
01:58.04jieryn-wjasonb: that's the problem.. too many useless posts
01:58.21jieryn-wi'd like to just let apache manage all the SSL stuff for us
01:59.08jieryn-wmaybe i should remove apache httpd from the picture entirely though; i just kind of assumed that i'd get address already in use exception if i bind to alias:443
01:59.20jasonbYou can.. and requests can be proxied to Tomcat via either HTTP or AJP (unencrypted in both cases)..  And then you'd need to configure Tomcat to write URL responses as if the whole thing is running under HTTPS.
01:59.27jieryn-wi use mod_proxy
02:00.07jasonbI strongly suggest running Tomcat stand-alone.  You lose half of your Tomcat's performance by proxying all Tomcat requests through Apache httpd.
02:00.35jasonbPlus, Tomcat stand-alone is far easier to configure than httpd --> Tomcat
02:00.46jieryn-wi agree !!!
02:00.51jieryn-wi love tc :)
02:01.15jieryn-wok, so do you know specifically if i can bind multiple times to :443, e.g., for each of these aliased ip addrs?
02:01.30jasonbNope, once per IP address.
02:01.41jieryn-wwell, i have about 40 or so ip addrs
02:01.49jieryn-wbut they are all going through one eth, aliased 39 times
02:02.02jasonbIf you can give Tomcat an IP address where it can have port 443, then you can bind to 443..
02:02.18jieryn-wi should just test this real quick
02:02.22jasonbIt doesn't matter that it's all going through one NIC.  That part's fine.
02:02.29jieryn-wsee if i can bind to   alias1:10000 and alias2:10000
02:02.59jieryn-wyour T:TDG, is it very recent?
02:03.00jasonbIn fact, on Linux you can use iptables, and remap port 443 to a different port number of your choice where Tomcat is running HTTPS.
02:03.26jasonbjieryn-w: It is recent enough (2nd Edition), and covers Tomcat 6 in a very up to date way.
02:03.27jieryn-wi'm checking if my corporate books 24x7 has it
02:04.28*** join/#tomcat karstensrage (~karstensr@c-24-4-116-211.hsd1.ca.comcast.net)
02:05.28jieryn-wgroovy, we're on 6.0.18
02:05.56jasonbYup.. then it's just right.
02:06.10jasonbYou should really upgrade to 6.0.29 though.. and that should work just fine.
02:06.20jieryn-wi don't get to control the server
02:06.29jieryn-wbut yep, i think .30 was released, or is nearing release, soonish
02:06.48jieryn-wwe have a SuSE linux support contract and only get stuff from their official servers
02:07.18jasonbbah.
02:09.13jieryn-wdrat, we don't have it
02:09.16jieryn-wi'll have to request it
02:10.50jasonbYeah.  You'll find lots of answers in there..
02:14.47*** join/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
02:16.55*** join/#tomcat iredux (~michaelg@mail2.creditcards.com)
02:25.48*** join/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
02:28.31jieryn-wawesome
02:28.44jieryn-wi just did a simple test of binding, and i CAN bind multiple times to the same port with different ip addr
02:28.52jieryn-weven though those ip addrs are all through the same eth
02:28.53jieryn-ww00t
02:28.59jieryn-wso i think i can remove apache from the picture ....
02:30.02jieryn-wthe only advanced feature i'm using from it is mod_cache
02:40.49*** join/#tomcat Zer0_Cool (debian-tor@gateway/tor-sasl/zer0cool/x-42999816)
02:47.52jasonbI told you you could.
02:48.59Zer0_Coolhi
02:49.02Zer0_Coolwahts up
02:51.23jasonbjieryn-w: Are you using a memory cache or a disk cache?
02:55.01jieryn-wdisk
02:55.14jieryn-wwith a lot of ram available for ext3
02:55.22jieryn-wso hopefully it "degrades" into a mem cache
02:56.00jieryn-wanyway, the decrease in complexity for httpd && tomcat --> tomcat may be worth losing a bit of performance gain for mod_cache
02:56.34jieryn-wfor each of my vhosts/ipaddrs i have a separate user, and now tomcat is failing to bind to :80 :443 ! shit
03:02.57jasonbIt would have to run as root to bind to privileged port numbers.
03:03.21jasonbThat's why people tend to bind it to 8443, and then use something to remap 443 to 8443.
03:03.33jasonb(for instance, iptables or authbind)
03:03.49jasonbI've used iptables most of the time, and I do suggest it.
03:04.11jieryn-w8000/8443 ?
03:04.16jieryn-wor rather, 8080/8443
03:04.28jasonbYou will likely also find that Tomcat does not underperform versus Apache httpd..
03:04.45jasonbYeah, 8080 and 8443.
03:04.47jieryn-wjetty supports a setuid, does tomcat have anything like that ?
03:05.16*** join/#tomcat gk (~gk@unaffiliated/gk)
03:07.36jasonbA setuid binary?
03:07.45jieryn-wyes
03:08.09jieryn-wwell, i should be more specific, jetty can be launched as root and then configured to change user itself down to some other id
03:08.11jasonbHmm, I wonder if it runs the whole JVM process as root in that case?
03:08.20jieryn-wmm..interesting
03:09.03jasonbNah, with Tomcat, there are just known ways of remapping ports.. it's not built into Tomcat itself.  Tomcat is pure Java, all except for the APR connector code, and you'd normally not use that.
03:09.47jasonbOkay, I'm heading out for a bit.. I'll be back later.. cheers..
03:11.01jieryn-wthanks jasonb , good evening
03:11.05jieryn-wjasonb++
03:12.16jasonbjieryn-w: You're welcome.  Cheers.
03:55.31*** join/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
03:56.10*** join/#tomcat tsuyoi (panda@92-55-242-8.net.pbthawe.eu)
03:57.31*** join/#tomcat tsuyoi (panda@unaffiliated/akmal)
04:24.41*** part/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
04:55.28*** join/#tomcat sunit (7ab01fb7@gateway/web/freenode/ip.122.176.31.183)
04:56.12sunitI am using Apache Tomcat/6.0.29 on red hat enterprise linux 5 with 1.6.0_17-b04 sun jdk
04:57.39sunitI have installed openbravo erp and when try to access through browser with http://127.0.01:8080/openbravomp14
04:58.05sunitwe get error as The requested resource () is not available.
04:58.32Zer0_Coolcheck the web.xml
04:58.47sunitsee catalina log in http://dpaste.org/cY1f/
04:59.49sunit<PROTECTED>
05:00.10sunitsee http://dpaste.org/a3Nc/ for localhost log
05:00.35sunithttp://dpaste.org/wV9C/ for tomcat manager log
05:02.11sunitstarting tomcat catalina command  at http://dpaste.org/8hVu/
05:03.46sunitZero0_cool I am checking web.xml
05:07.25*** join/#tomcat mahiti_skt (~mahiti@122.166.127.74)
05:20.31sunitZero what shall I check in web.xml ?
05:58.19*** join/#tomcat mattock (~samuli@dyn55-11.yok.fi)
06:07.58*** join/#tomcat jasonb (~jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)
06:13.54*** join/#tomcat Pseudonym (~ajb@bromage.elder-gods.net)
06:14.42PseudonymTomcat 6.0.24, Java 1.6.0_18, Ubuntu 10.04.  Anyone around?
06:15.44Zer0_Coolyea
06:15.46Zer0_Coolo/
06:15.48Zer0_CoolPseudonym:
06:15.49PseudonymHi again.
06:16.03Zer0_Coolwhats up
06:16.07Zer0_Coolhi
06:16.14PseudonymStill having trouble hosting my app.
06:16.32Pseudonym<PROTECTED>
06:16.32Pseudonym<PROTECTED>
06:16.34Pseudonym<PROTECTED>
06:16.34Pseudonym<PROTECTED>
06:16.43PseudonymFor some reason, I'm getting no complaint.
06:17.09PseudonymWhich suggests that the servlet isn't getting loaded.
06:18.16PseudonymOh, duh.  I know.  I could bump up the log level.
06:21.11*** join/#tomcat loddafnir1 (~mike@91-67-249-50-dynip.superkabel.de)
06:39.20*** join/#tomcat relachs (~relachs@f055106048.adsl.alicedsl.de)
06:47.38*** join/#tomcat Alagar (~Administr@122.164.172.12)
07:09.46*** join/#tomcat mattock1 (~samuli@93.106.136.138)
07:10.50*** join/#tomcat cofeineSunshine (~justinas@78-56-241-76.static.zebra.lt)
07:20.02*** join/#tomcat epapi (~epapi@outgoing.txt.it)
07:27.05*** join/#tomcat drindt (~drindt@89.204.153.65)
08:10.05*** part/#tomcat Pseudonym (~ajb@bromage.elder-gods.net)
08:18.38*** join/#tomcat serge_hid (~serge_hid@93.185.192.67)
08:21.39*** join/#tomcat jazzanova_ (~boris@77.127.40.246)
08:21.41jazzanova_hi
08:22.26*** join/#tomcat Zer0_Cool (debian-tor@gateway/tor-sasl/zer0cool/x-42999816)
08:22.55jazzanova_when tomcat works as an apache module, does it ever unload ? does it run until apache is shutdown ? is it like a "process" ?
08:24.14jazzanova_can a java servlet allocate memomry, put soemthing in it, and then expect to find it still there, on the next http request ?
08:28.34deeboservlets with state are bad idea
08:28.39deebouse session data
08:28.47deebooutside the scope of this channel tho
08:39.44*** join/#tomcat ExtraSpice (~XtraSpice@78-57-168-219.static.zebra.lt)
09:15.50*** join/#tomcat }ls{ (~}ls{@p5DD1DB62.dip.t-dialin.net)
09:39.54*** join/#tomcat mattock (~samuli@dyn55-11.yok.fi)
09:41.47*** part/#tomcat Narcissus (~alex@unaffiliated/narcissus)
09:57.26*** join/#tomcat akmal (panda@unaffiliated/akmal)
10:45.59*** join/#tomcat dvayanu (~another@ds87-230-56-22.dedicated.hosteurope.de)
10:47.47*** join/#tomcat yalu (~yalu@ip-83-134-114-123.dsl.scarlet.be)
10:50.38*** join/#tomcat Narcissus (~alex@unaffiliated/narcissus)
11:16.38*** join/#tomcat medthomas (~chatzilla@91.109.172.64)
11:22.35*** join/#tomcat Yisas (d509d306@gateway/web/freenode/ip.213.9.211.6)
11:22.45YisasHello
11:23.19YisasI am facing a problem with TOMCAT 6
11:23.43YisasI am trying to connect Apache 2.2.13 with Tomcat using JKMount
11:24.44Yisasbut I keep getting this error [Thu Sep 16 08:35:44 2010] [6688:4508] [error] mod_jk.c (2549): Could not get endpoint for worker=testing
11:25.14Yisasany idea?
11:25.30*** join/#tomcat iredux (~iredux@cpe-70-120-199-184.austin.res.rr.com)
11:31.58YisasI am trying to connect Apache 2.2.13 with Tomcat 6 using JKMount 1.2.28 but I keep getting this error
11:32.14Yisas[Thu Sep 16 08:35:44 2010] [6688:4508] [error] mod_jk.c (2549): Could not get endpoint for worker=testing
11:32.22Yisas[13:25] Version Information: TOMCAT version 6.0.18, Windows 2003 Server SP 2, JAVA 1.6.0_13
11:33.39Yisasany idea why I am getting these errors?
11:34.56YisasThese is the configuration of the connector
11:35.09Yisasworker.testing.type=ajp13
11:35.18Yisasworker.testing.connection_pool_size=20
11:35.23Yisasworker.testing.connection_pool_timeout=1
11:35.28Yisasworker.testing.socket_keepalive=1
11:35.32Yisasworker.testing.retries=10
11:35.37Yisasworker.testing.retry_interval=1000
11:35.41Yisasworker.testing.lbfactor=1
11:35.48Yisasworker.testing.socket_timeout=5
11:35.53Yisasworker.testing.socket_connect_timeout=5000
12:11.12*** join/#tomcat sluimers (~rogier@82-171-16-94.ip.telfort.nl)
12:11.43sluimersHi, I have tomcat working next to apache but nothing deploys, not even the manager or examples
12:14.36sluimerslogs are on http://ubuntuforums.org/showthread.php?t=1567810
12:16.34YisasHi, all... any idea?? it is quite urgent
12:54.35*** join/#tomcat iredux (~michaelg@mail2.creditcards.com)
12:58.45*** join/#tomcat clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net)
13:20.03*** join/#tomcat schmolly159 (~schmolly1@rrcs-76-79-50-2.west.biz.rr.com)
13:36.20*** join/#tomcat IceFacesIsAFix (~IceFacesI@xdsl-89-0-146-199.netcologne.de)
13:37.39*** join/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
13:58.25*** join/#tomcat akmal (panda@unaffiliated/akmal)
14:55.45*** join/#tomcat epapi (~epapi@outgoing.txt.it)
14:59.45*** join/#tomcat epapi (~epapi@outgoing.txt.it)
15:43.33*** join/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
16:08.57*** join/#tomcat jasonb (~jasonb@m4d0536d0.tmodns.net)
16:37.19*** join/#tomcat jasonb (~jasonb@m4b0536d0.tmodns.net)
17:05.02*** join/#tomcat jasonb (~jasonb@dsl092-009-225.sfo1.dsl.speakeasy.net)
17:53.53*** join/#tomcat campee (~campee@c-76-102-243-161.hsd1.ca.comcast.net)
17:54.01campeeif you want to forward apache to tomcat, is there anything bad about using mod_proxy over mod_ajp?
17:59.26jieryn-wmod_proxy is quite nice for that
18:00.29*** join/#tomcat jasonb (~jasonb@12.201.129.162)
18:15.42*** join/#tomcat tsuyoi (panda@shellium/member/giantpanda)
18:31.23*** join/#tomcat IceFacesIsAFix_ (~IceFacesI@xdsl-89-0-66-62.netcologne.de)
18:36.22*** join/#tomcat [diecast] (~kgarland@unaffiliated/diecast/x-4821952)
18:38.19*** part/#tomcat [diecast] (~kgarland@unaffiliated/diecast/x-4821952)
18:43.42*** join/#tomcat }ls{ (~}ls{@p4FF0A5B8.dip.t-dialin.net)
18:45.08*** join/#tomcat dvayanu (~another@p578E9D44.dip.t-dialin.net)
18:47.45*** join/#tomcat IceFacesIsAFix_ (~IceFacesI@xdsl-89-0-66-62.netcologne.de)
19:09.19*** join/#tomcat dvayanu (~another@p578E9D44.dip.t-dialin.net)
19:26.22*** join/#tomcat dvayanu (~another@p578E9D44.dip.t-dialin.net)
19:28.55*** join/#tomcat km (~km@little-black-box.vmware.com)
20:00.52*** join/#tomcat Alagar (~Administr@122.164.179.78)
20:17.00*** join/#tomcat acidjnk (acid@124-229-103-86.dynamic.dsl.tng.de)
20:17.02*** join/#tomcat cofeineSunshine (~justinas@78-56-241-76.static.zebra.lt)
20:17.29*** join/#tomcat heiko (~heiko@dslb-094-222-059-209.pools.arcor-ip.net)
20:19.25heikohi. i'm trying to get config options into a webservice from outside the war, so i can configure the service on the server and just replace the war with a new version. i use tomcat6. i don't know what to google for, since i don't know what an appropriate approach would be. pointers would be appreciated.
20:29.09randrewjcampee: mod_proxy_ajp is easy to configure.
20:31.56randrewjheiko: it is typical to have settings in WEB-INF. Esp since the servlet spec requires some configuration in WEB-INF/web.xml. what you are trying to do is probably very application specific.
20:37.13*** join/#tomcat prgrmr_ (~prgrmr@unaffiliated/prgrmr)
20:39.02heikorandrewj: yes, i want to set application specific config. is it possible/sensible to have that outside the war file, though? i'd like my production config to just sit on the server
20:41.19jasonbheiko: If your webapp either already implements features that make it possible, or if you're writing the webapp and can make it work, it's most convenient to have per-webapp-instance configuration outside of the webapp for obvious reasons.
20:42.00heikojasonb: i'm writing the webapp, and wonder how to go about configuring it properly
20:42.22heikobut i don't know which concepts are appropriate for what i want.
20:43.58heikocould i put config options in some xml file in $CATALINA_HOME and retrieve the config options from within my app?
20:54.41randrewjheiko: the spring framework has features to read in xml files to configure an ApplicationContext from files on the classpath or from arbitrary files.
20:55.26heikoouch, i was hoping to use something smaller than spring :) i'd really just like to get 2-3 key/value pairs from somewhere outside my war
21:00.38jasonbYes, do something smaller than spring.  :/
21:01.54jasonbheiko: A decent pattern I've seen in practice is: have your webapp look for a system property like -Dmywebapp.config=/myconfigs/configfile.properties and read that at webapp startup, and use those values.
21:02.04jasonbThat way, you can set as many of those in the Tomcat JVM as you want.
21:02.09*** join/#tomcat calavera (~calavera_@83.37.247.124)
21:08.29heikook, so i'd pass a resourcename as an environment property, then use the classloader to get that resource, and get configuration from in there?
21:28.35jasonbheiko: Not really.  What I'd suggest is, look for the system property, and if it is defined, read the file directly like: File configFile = new File(propertyValue);  .. and then open and read it..
21:28.52jasonbIt's really simple, and works just fine.
21:29.04heikoi see
21:29.20heikoi'll try that, thanks :)
21:30.01heikoa system property would be an "export FOO=file" on a unixy system, right?
21:30.09jasonbAlso, if you set that in JAVA_OPTS like: JAVA_OPTS="-Dmywebapp.config=/myconfigs/configfile.properties" (plus other startup opts) then you can change files by just changing this environment variable in Tomcat's environment.
21:30.31jasonbLike:  export JAVA_OPTS="-Dmywebapp.config=/myconfigs/configfile.properties"
21:30.52heikooh, it's a JAVA_OPT thing
21:31.07heikothanks, trying :)
21:31.26jasonbWell, JAVA_OPTS is used by catalina.sh to start the Tomcat JVM with special startup arguments.
21:39.37heikoerr. would i get at the system properties via "(Context) new InitialContext().lookup("java:comp/env")"?
21:57.32*** join/#tomcat km (~km@little-black-box.vmware.com)
21:59.46*** join/#tomcat tsuyoi (panda@92-55-242-8.net.pbthawe.eu)
21:59.46*** join/#tomcat tsuyoi (panda@shellium/member/giantpanda)
22:13.56heikogot it, my service is configured. thanks, jasonb!
22:20.02jasonbheiko: You're welcome.
22:20.09jasonbheiko: Pretty simple, eh?
22:20.37heikojasonb: it is :) feels a little brutal, somehow, but i appreciate that it gets the job done.
22:22.31jasonbheiko: After you do it that way for a bit, you'll realize how natural it is to Java.. Java always has system properties.. and it's actually okay for a webapp to read an absolute filesystem path.  And, you've separated the configuration out of the webapp cleanly.
22:23.21heikothe clean separation of config and webapp is good, yes. but it seems to me that the application server could provide configuration in a less low-level way
22:23.23jasonbAnd, to top it all off, the implementation is simple, readable, tiny, and fast.
22:23.26*** join/#tomcat mattock1 (~samuli@dyn55-11.yok.fi)
22:24.05heikoat first i was looking at server.xml and context.xml, but couldn't figure out what went where
22:25.20jasonbThere are supported features of servlet containers where it can provide configuration at the container level (outside the webapp), but once you research each one of those (there are several ways of doing it) you'll find that each one of them is overly difficult or abstract.. either difficult to understand the configuration, or difficult for people to *find* the configuration, or difficult for a webapp to hook up to it, etc.
22:26.10heikothat's the sense i got while googling. i was baffled and confused, and wondering if i was even looking at something relevant to my needs.
22:26.40heikobut then, that keeps happening to me with java ee technologies :)
22:27.55jasonbI can tell you from experience, this particular use case is very much like that.
22:28.36heikocool, i'm glad i've got this sorted out. this was rather frustrating at first.
22:28.47jasonbAlso, the system property way is 100% servlet container implementation independent.. you can be sure that it is, because it is so simple.
22:28.55heikooh yes ...
22:29.12jasonbAlso, it does not violate anything in the Java Servlet Specification.
22:29.24heikoi've been shocked how much container dependent stuff is going on with webservices
22:29.56heikoi tried getting my service to run in glassfish once, and noticed that i had no idea how to migrate the user configuration for authentication %)
22:30.09jasonbWell, that happens..  there's competition and money / contracts to win in the SOA space.
22:30.26heikoright
22:31.01heikowell, i do enjoy the service approach to architecture, so far - writing a bunch of REST services and clients, and it's fun so far
22:31.14heikotime will tell if it was a good idea :) but it does feel neat, so far
22:31.51heikoi worry that i might overlook some requirements or lack experience to make good design decisions, of course
22:32.09heikostill, fun stuff :)
22:32.29*** join/#tomcat mattock (~samuli@dyn55-11.yok.fi)
22:37.46*** join/#tomcat acidjnk (acid@124-229-103-86.dynamic.dsl.tng.de)
22:44.38*** join/#tomcat Narcissus (~alex@millsie.net)
22:44.38*** join/#tomcat Narcissus (~alex@unaffiliated/narcissus)
22:48.10jasonbheiko: Are you using Jersey?
22:49.14heikojasonb: yes
23:07.16jasonbheiko: You're not finding that being servlet container impl dependent, are you?
23:54.32heikojasonb: i didn't notice anything container-dependent about jersey, no. just the way you configure users in a given container, that was a bit of a surprise to me.

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