From owner-freebsd-java@FreeBSD.ORG Fri Feb 6 23:09:07 2009 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD1B106566B for ; Fri, 6 Feb 2009 23:09:07 +0000 (UTC) (envelope-from freebsd-java@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 33B468FC17 for ; Fri, 6 Feb 2009 23:09:06 +0000 (UTC) (envelope-from freebsd-java@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LVZok-0003oh-4A for freebsd-java@freebsd.org; Fri, 06 Feb 2009 23:09:02 +0000 Received: from 81.210.237.210 ([81.210.237.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2009 23:09:02 +0000 Received: from saper by 81.210.237.210 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2009 23:09:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-java@freebsd.org From: Marcin Cieslak Date: Sat, 07 Feb 2009 00:08:44 +0100 Lines: 154 Message-ID: <498CC2FC.6050804@system.pl> References: <498B4E6C.40305@telenix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.237.210 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.19) Gecko/20090131 SeaMonkey/1.1.14 In-Reply-To: <498B4E6C.40305@telenix.org> Sender: news Subject: Re: still trying to get tomcat working X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2009 23:09:08 -0000 Chuck, It is very difficult for me to understand your report. Could you please provide a real error messages being reported? "Burped messily and died" does not really describe the problem you are experiencing! > I finally found a writeup on tomcat6 configuration which was new enough not to > rely on Linux executeables. Anyhow, early in that writeup, it's talking about > using the jsvc java package. I used a little script I wrote myself some years > ago to scan all of the ports plists for any mention of "jsvc". I found the > tarball that's dropped into the tomcat6 bin/ subdir, but not a port to build it, > did I miss an important port? I tried to unpack it and build it, but when the > jsvc's configure script realizes it's in FreeBSD-8.0 (I run current), it burped > messily and died, guess it can't handle superior OS quality. I *sense* this is the issue related to "config.guess" and "config.sub" files. Can you copy over the /usr/ports/Templates/config.guess and config.sub files to replace the files bundled with the application you are trying to configure? In the real port Makefile those files got overwritten behind the scenes if you specify GNU_CONFIGURE=yes (see /usr/ports/Mk/bsd.port.mk around line 3612 for details if you are interested) Are you sure you really need jsvc for anything? > I found what's described > as a very vanilla "conf/server.xml" (one of tomcat6's config files) but it seems > to want some minor modifications, and the fields aren't described, only given on > example.... damn, I Hate things which only give one example, but no description, > if your setup isn't precisely what the author's is, I can't figure out where to > go with things. All that instructions I've seen so far, they all fall in that > category. First things first. Are you successful in running a freshly built, plain tomcat 6.0 without any applications/patches/configuration file changes? On my machine (7-STABLE as of Feb 1st, amd64) I just did: % cd /usr/ports/www/tomcat6 % make .... (among others) Installation settings: Destination directory: /usr/local/apache-tomcat6.0 Location of JDK: /usr/local/diablo-jdk1.5.0 Location of Java port: java/diablo-jdk15 Running as (user/group): www/www HTTP port: 8180 Shutdown listener port: 8005 AJP 1.3 connector port: 8009 Logfile stdout: /usr/local/apache-tomcat6.0/logs/stdout.log Logfile stderr: /usr/local/apache-tomcat6.0/logs/stderr.log ===> Applying FreeBSD patches for apache-tomcat-6.0.18 >> Removing unneeded files... [ DONE ] >> Customizing server.xml... [ DONE ] ===> Configuring for apache-tomcat-6.0.18 % sudo make install ===> Installing for apache-tomcat-6.0.18 ===> apache-tomcat-6.0.18 depends on file: /usr/local/diablo-jdk1.5.0/bin/java - found ===> Generating temporary packing list ===> Checking if www/tomcat6 already installed >> Creating destination directory... [ DONE ] >> Copying files to destination directory... Installing local configuration file: /usr/local/apache-tomcat6.0/conf/logging.properties Installing local configuration file: /usr/local/apache-tomcat6.0/conf/tomcat-users.xml Installing local configuration file: /usr/local/apache-tomcat6.0/conf/catalina.properties Installing local configuration file: /usr/local/apache-tomcat6.0/conf/catalina.policy Installing local configuration file: /usr/local/apache-tomcat6.0/conf/context.xml Installing local configuration file: /usr/local/apache-tomcat6.0/conf/server.xml Installing local configuration file: /usr/local/apache-tomcat6.0/conf/web.xml [ DONE ] >> Creating log files... [ DONE ] >> Creating symlink to tools.jar... [ DONE ] >> Fixing ownership settings... [ DONE ] >> Fixing permissions... [ DONE ] Apache Tomcat 6.0.18 has been installed in /usr/local/apache-tomcat6.0. ===> Installing rc.d startup script(s) ===> Registering installation for apache-tomcat-6.0.18 Since I prefer to use JDK6 on my machine I have added two lines to /etc/rc.conf: tomcat60_enable=YES tomcat60_java_version=1.6 Then I did /usr/local/etc/rc.d/tomcat6 start after a while, my /usr/local/apache-tomcat6.0/logs/stderr.log was empty and my /usr/local/apache-tomcat6.0/logs/stdout.log looked like this: INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.6.0/jre/lib/amd64/server:/usr/local/jdk1.6.0/jre/lib/amd64:/usr/local/jdk1.6.0/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib:%LOCALBASE%/lib Feb 7, 2009 12:02:39 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8180 Feb 7, 2009 12:02:39 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1007 ms Feb 7, 2009 12:02:39 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Feb 7, 2009 12:02:39 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Feb 7, 2009 12:02:41 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Feb 7, 2009 12:02:41 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Feb 7, 2009 12:02:41 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8180 Feb 7, 2009 12:02:41 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Feb 7, 2009 12:02:41 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/47 config=null Feb 7, 2009 12:02:41 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1682 ms netstat confirms that the server is listening on the TCP port: %netstat -an | grep 8180 tcp46 0 0 *.8180 *.* LISTEN A browser connected to the http://localhost:8180/ displays a webpage that says, among others: If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! Are you able to get that far? Only after _this_ one can jump into understanding and changing the server.xml file. Once basic Tomcat setup works, the webpage http://localhost:8180/docs/config/index.html will give you a complete reference to the server.xml file. --Marcin