Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 980549BBC for ; Sat, 25 Aug 2012 14:25:42 +0000 (UTC) Received: (qmail 23858 invoked by uid 500); 25 Aug 2012 14:25:39 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 23803 invoked by uid 500); 25 Aug 2012 14:25:38 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 23791 invoked by uid 99); 25 Aug 2012 14:25:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2012 14:25:38 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fjanon@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qc0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2012 14:25:30 +0000 Received: by qcab12 with SMTP id b12so2143726qca.18 for ; Sat, 25 Aug 2012 07:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Jg4kdAwu5qxGkmuTP3/wiBdpQc6FuZMx18W8M2CRLgQ=; b=v8iIOnytmbFzlhRqr2KB0GWeF70N+NiwWugExeINGADiFiCXuujTnyiBhNVJj2423Q VBJ/1SwEZ3gp3bpKkrgi34Q0SYTObO2iDINJrEA5zgDLg/wa4smY12Az/bm70wF2pDPH KH1FbLlU45KtBJpGSgjLOLcJgAM1/JJLZC4+Ks+bnRJC5iUIJGIEZq+3RM+SuRc5X9Bd JcA0alO06npj8dgmLOi27IhL8czyzbPtZJOFKLkG349XOl799xy27kAyREzN1NRozEMZ M3hlI9zRsyytagGB0M+7hKICnJz9xxgsn5QXysiId0RtN9dZCFZqfpDsBjIYCID2KADR p3FA== Received: by 10.229.102.155 with SMTP id g27mr4127702qco.109.1345904709100; Sat, 25 Aug 2012 07:25:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.219.142 with HTTP; Sat, 25 Aug 2012 07:24:48 -0700 (PDT) In-Reply-To: References: From: Fred Janon Date: Sat, 25 Aug 2012 16:24:48 +0200 Message-ID: Subject: Re: Issue building the Unix daemon (jsvc) with the "configure" script in Tomcat7 To: Tomcat Users List Content-Type: multipart/alternative; boundary=0023544706d816670604c817dc99 --0023544706d816670604c817dc99 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Martin. I get a warning in the system log at boot time, I don't understand what it means or where it comes from: *warning: `jsvc' uses 32-bit capabilities (legacy support in use)* Any idea? Thanks Fred On Sat, Aug 25, 2012 at 3:11 PM, Martin Gainty wrote: > > Its amazing what you can do with god access! > > do a quick netstat -ab | grep 80 to make sure port 80 is not already > taken..you dont want to accidentally step on Apache HTTP Server > put hostname:80 in your browser too > > //if port 80 is not bound to Apache or IIS and you want to start on port > 80 dont forget to change the connector port=3D"8080" to "80" on server.xm= l > > //if Port 80 does not startup and netstat showed port 80 is NOT bound > //${catalina.home}/conf/catalina.policy is the arbiter of which tomcat > entities permission(s) for OS resources ..file access and SocketPermissio= n > generally > // permissions granted for all Tomcat entities on $(catalina.home) to > access localhost on Port 80 via Socket > grant codeBase "file:${catalina.home}/-" { > permission java.net.SocketPermission "*.localhost:80", "connect"; > }; > > HTH > Martin > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugt= e > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAt= es pas le > destinataire pr=E9vu, nous te demandons avec bont=E9 que pour satisfaire > informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou la= copie > de ceci est interdite. Ce message sert =E0 l'information seulement et n'a= ura > pas n'importe quel effet l=E9galement obligatoire. =C9tant donn=E9 que le= s email > peuvent facilement =EAtre sujets =E0 la manipulation, nous ne pouvons acc= epter > aucune responsabilit=E9 pour le contenu fourni. > > > > From: fjanon@gmail.com > > Date: Sat, 25 Aug 2012 11:59:16 +0200 > > Subject: Re: Issue building the Unix daemon (jsvc) with the "configure" > script in Tomcat7 > > To: mgainty@hotmail.com > > CC: users@tomcat.apache.org > > > > It looks like that was it, some directories (logs, work...) were create= d > > with the wrong user permissions during my previous attempts at running > > daemon without sudo. > > > > I deleted all the dirs and files created by ec2-user and ran "sudo > > ./daemon.sh start". Tomcat started without any errors and I can see the > > home web page. > > > > Now that it's running I wonder what do we get at running Tomcat as a > > service on Linux, beside being able to access the privileged ports? > Which I > > don't, I use the iptables, maybe Tomcat would be faster using port 80 > > directly? > > > > The only thing I would like to do now is to get the logs created with t= he > > tomcat user AND tomcat *group*. At the moment the logs are RW to the > tomcat > > user only, not the group. > > > > [ec2-user@ip-10-212-133-29 logs]$ ls -l > > -rw------- 1 tomcat tomcat 2937 Aug 25 09:47 catalina.2012-08-25.log > > -rw------- 1 root root 3069 Aug 25 09:48 catalina-daemon.out > > -rw------- 1 root root 5 Aug 25 09:47 catalina-daemon.pid > > -rw------- 1 tomcat tomcat 0 Aug 25 09:47 host-manager.2012-08-25.lo= g > > -rw------- 1 tomcat tomcat 445 Aug 25 09:47 localhost.2012-08-25.log > > -rw-r--r-- 1 tomcat tomcat 743 Aug 25 09:49 > > localhost_access_log.2012-08-25.txt > > -rw------- 1 tomcat tomcat 0 Aug 25 09:47 manager.2012-08-25.log > > > > Thanks all for your help. > > > > Fred > > > > On Sat, Aug 25, 2012 at 11:30 AM, Fred Janon wrote: > > > > > Hi Martin, > > > > > > I realized that some of the directories were created with the ec2-use= r > in > > > some of my previous tries before running daemon.sh. I am deleting all > these > > > dirs/files and see if daemon.sh works now. > > > > > > Cheers, > > > > > > Fred > > > > > > > > > On Sat, Aug 25, 2012 at 9:20 AM, Fred Janon wrote: > > > > > >> Thanks for the suggestions Martin, I'll give them a try in a couple = of > > >> hours, I've got to do something now. > > >> > > >> I tried the same daemon script at boot time from init.d and I get th= e > > >> same issue, it runs under root. Does that mean that my setting for t= he > > >> tomcat user for jsvc is not working? I assumed that jsvc would take > that > > >> identity to do everything, including creating the dirs and files. > > >> > > >> Thanks > > >> > > >> Fred > > >> > > >> On Sat, Aug 25, 2012 at 3:40 AM, Martin Gainty >wrote: > > >> > > >>> save yourself a ton of permission-errors grief > > >>> > > >>> login tomcat > > >>> mkdir /datadisk1/tomcat/conf/Catalina/localhost > > >>> BTW when you do a > > >>> ls -al /datadisk1/tomcat/conf/Catalina/localhost > > >>> you should have god rights rwd pretty much everything > > >>> > > >>> > > >>> sudo is tricky because you'll need to add tomcat user to run the > tomcat > > >>> daemon(sh) to > > >>> > > >>> /etc/sudoers > > >>> > > >>> but then you'll only have permission to run daemon(.sh) > > >>> access to temp, work and log folders have not been granted > > >>> > > >>> > > >>> > > >>> cd $CATALINA_BASE > > >>> chown tomcat work > > >>> chown tomcat logs > > >>> chown tomcat temp > > >>> > > >>> Your clock is 6 hours ahead of me so you will receive this email ve= ry > > >>> early am..i assume you're in CET > > >>> I'll check back SAT roughly 8am CST > > >>> Martin Gainty > > >>> ______________________________________________ > > >>> Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de > confidentialit=E9 > > >>> > > >>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > > >>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede > unbefugte > > >>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese > Nachricht > > >>> dient lediglich dem Austausch von Informationen und entfaltet keine > > >>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit > von > > >>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > >>> > > >>> Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous = n'=EAtes > pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour sati= sfaire > informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou la= copie > de ceci est interdite. Ce message sert =E0 l'information seulement et n'a= ura > pas n'importe quel effet l=E9galement obligatoire. =C9tant donn=E9 que le= s email > peuvent facilement =EAtre sujets =E0 la manipulation, nous ne pouvons acc= epter > aucune responsabilit=E9 pour le contenu fourni. > > >>> > > >>> > > >>> > > >>> > > >>> > From: fjanon@gmail.com > > >>> > Date: Sat, 25 Aug 2012 00:22:50 +0200 > > >>> > Subject: Re: Issue building the Unix daemon (jsvc) with the > > >>> "configure" script in Tomcat7 > > >>> > To: users@tomcat.apache.org > > >>> > > >>> > > > >>> > Hi Jeff, > > >>> > > > >>> > I tried both: > > >>> > > > >>> > [ec2-user@ip-10-34-89-185 bin]$ ./daemon.sh start > > >>> > Cannot set group id for user 'tomcat' > > >>> > Error validating user 'tomcat' > > >>> > > > >>> > With sudo, I get the permissions issue. ec2-user is a sudoer. > > >>> > > > >>> > sudo ./daemon.sh start > > >>> > > > >>> > *SEVERE: Unable to create directory for deployment: > > >>> > /datadisk1/tomcat/conf/Catalina/localhost* > > >>> > Aug 24, 2012 1:29:12 PM org.apache.catalina.startup.HostConfig > > >>> > deployDirectory > > >>> > INFO: Deploying web application directory > > >>> /datadisk1/tomcat/webapps/examples > > >>> > Aug 24, 2012 1:29:12 PM org.apache.catalina.core.StandardContext > > >>> > postWorkDirectory > > >>> > *WARNING: Failed to create work directory > > >>> > [/datadisk1/tomcat/work/Catalina/localhost/examples] for context > > >>> [/examples] > > >>> > * > > >>> > Aug 24, 2012 1:29:13 PM org.apache.jasper.EmbeddedServletOptions > > > >>> > *SEVERE: The scratchDir you specified: > > >>> > /datadisk1/tomcat/work/Catalina/localhost/examples is unusable.* > > >>> > > > >>> > I am trying to see the whole command passed to jsvc but I am not > > >>> fluent in > > >>> > shell scripts and I can't get to echo it yet. > > >>> > > > >>> > Fred > > >>> > > > >>> > On Fri, Aug 24, 2012 at 10:45 PM, Jeff MAURY < > jeffmaury@jeffmaury.com > > >>> >wrote: > > >>> > > > >>> > > It probably means your current user (ec2-user) has not the > rights to > > >>> run as > > >>> > > tomcat user. > > >>> > > Try the same command with sudo in front, if ec2-user is part of > the > > >>> sudoers > > >>> > > > > >>> > > Jeff > > >>> > > > > >>> > > > > >>> > > On Fri, Aug 24, 2012 at 4:09 PM, Fred Janon > > >>> wrote: > > >>> > > > > >>> > > > Ah! Thanks Jeff, you are right, thanks. I checked and the > OpenJDK > > >>> > > installed > > >>> > > > is not the full JDK (??? confusing). I had to install the > > >>> OpenJDK-dev to > > >>> > > > get the full JDK. > > >>> > > > > > >>> > > > I managed to build the jsvc (yeah!), now I am getting an erro= r > > >>> after > > >>> > > > starting tomcat using daemon.sh, it seems that it runs a root= , > not > > >>> tomcat > > >>> > > > as I configured setenv.sh. tomcat cannot create some dirs, > > >>> reported in > > >>> > > > catalina-daemon.out. > > >>> > > > > > >>> > > > If I launch tomcat without being root, I get this error: > > >>> > > > > > >>> > > > [ec2-user@ip-10-34-89-185 bin]$ ./daemon.sh start > > >>> > > > Cannot set group id for user 'tomcat' > > >>> > > > Error validating user 'tomcat' > > >>> > > > > > >>> > > > Not sure what this means, I have a tomcat user in the tomcat > group. > > >>> > > > > > >>> > > > If I launch tomcat using that command: > > >>> > > > > > >>> > > > sudo ./daemon.sh start > > >>> > > > > > >>> > > > with setenv.sh: > > >>> > > > > > >>> > > > export CATALINA_HOME=3D/datadisk1/tomcat > > >>> > > > export CATALINA_OPTS=3D"-server -Xms128M -Xmx512M" > > >>> > > > export JAVA_HOME=3D/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jr= e > > >>> > > > export TOMCAT_USER=3Dtomcat > > >>> > > > > > >>> > > > then catalina-daemon.out shows: > > >>> > > > > > >>> > > > Aug 24, 2012 1:29:11 PM > > >>> org.apache.catalina.core.AprLifecycleListener > > >>> > > init > > >>> > > > SEVERE: An incompatible version 1.1.22 of the APR based Apach= e > > >>> Tomcat > > >>> > > > Native library is installed, while Tomcat requires version > 1.1.24 > > >>> > > > Aug 24, 2012 1:29:11 PM > > >>> org.apache.catalina.core.AprLifecycleListener > > >>> > > init > > >>> > > > SEVERE: An incompatible version 1.1.22 of the APR based Apach= e > > >>> Tomcat > > >>> > > > Native library is installed, while Tomcat requires version > 1.1.24 > > >>> > > > Aug 24, 2012 1:29:11 PM > > >>> org.apache.catalina.core.AprLifecycleListener > > >>> > > init > > >>> > > > SEVERE: An incompatible version 1.1.22 of the APR based Apach= e > > >>> Tomcat > > >>> > > > Native library is installed, while Tomcat requires version > 1.1.24 > > >>> > > > Aug 24, 2012 1:29:11 PM > > >>> org.apache.catalina.core.AprLifecycleListener > > >>> > > init > > >>> > > > SEVERE: An incompatible version 1.1.22 of the APR based Apach= e > > >>> Tomcat > > >>> > > > Native library is installed, while Tomcat requires version > 1.1.24 > > >>> > > > Aug 24, 2012 1:29:11 PM > > >>> org.apache.catalina.core.AprLifecycleListener > > >>> > > init > > >>> > > > SEVERE: An incompatible version 1.1.22 of the APR based Apach= e > > >>> Tomcat > > >>> > > > Native library is installed, while Tomcat requires version > 1.1.24 > > >>> > > > Aug 24, 2012 1:29:11 PM org.apache.coyote.AbstractProtocol in= it > > >>> > > > INFO: Initializing ProtocolHandler ["http-bio-8080"] > > >>> > > > Aug 24, 2012 1:29:11 PM org.apache.coyote.AbstractProtocol in= it > > >>> > > > INFO: Initializing ProtocolHandler ["ajp-bio-8009"] > > >>> > > > Aug 24, 2012 1:29:11 PM org.apache.catalina.startup.Catalina > load > > >>> > > > INFO: Initialization processed in 1316 ms > > >>> > > > Aug 24, 2012 1:29:12 PM > org.apache.catalina.core.StandardService > > >>> > > > startInternal > > >>> > > > INFO: Starting service Catalina > > >>> > > > Aug 24, 2012 1:29:12 PM org.apache.catalina.core.StandardEngi= ne > > >>> > > > startInternal > > >>> > > > INFO: Starting Servlet Engine: Apache Tomcat/7.0.29 > > >>> > > > Aug 24, 2012 1:29:12 PM org.apache.catalina.startup.HostConfi= g > > >>> start > > >>> > > > *SEVERE: Unable to create directory for deployment: > > >>> > > > /datadisk1/tomcat/conf/Catalina/localhost* > > >>> > > > Aug 24, 2012 1:29:12 PM org.apache.catalina.startup.HostConfi= g > > >>> > > > deployDirectory > > >>> > > > INFO: Deploying web application directory > > >>> > > > /datadisk1/tomcat/webapps/examples > > >>> > > > Aug 24, 2012 1:29:12 PM > org.apache.catalina.core.StandardContext > > >>> > > > postWorkDirectory > > >>> > > > *WARNING: Failed to create work directory > > >>> > > > [/datadisk1/tomcat/work/Catalina/localhost/examples] for > context > > >>> > > > [/examples] > > >>> > > > * > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.jasper.EmbeddedServletOptions > > >>> > > >>> > > > *SEVERE: The scratchDir you specified: > > >>> > > > /datadisk1/tomcat/work/Catalina/localhost/examples is > unusable.* > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.catalina.startup.HostConfi= g > > >>> > > > deployDirectory > > >>> > > > INFO: Deploying web application directory > > >>> /datadisk1/tomcat/webapps/ROOT > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.catalina.core.StandardContext > > >>> > > > postWorkDirectory > > >>> > > > WARNING: Failed to create work directory > > >>> > > > [/datadisk1/tomcat/work/Catalina/localhost/_] for context [] > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.jasper.EmbeddedServletOptions > > >>> > > >>> > > > SEVERE: The scratchDir you specified: > > >>> > > > /datadisk1/tomcat/work/Catalina/localhost/_ is unusable. > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.catalina.startup.HostConfi= g > > >>> > > > deployDirectory > > >>> > > > INFO: Deploying web application directory > > >>> /datadisk1/tomcat/webapps/docs > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.catalina.core.StandardContext > > >>> > > > postWorkDirectory > > >>> > > > WARNING: Failed to create work directory > > >>> > > > [/datadisk1/tomcat/work/Catalina/localhost/docs] for context > > >>> [/docs] > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.jasper.EmbeddedServletOptions > > >>> > > >>> > > > SEVERE: The scratchDir you specified: > > >>> > > > /datadisk1/tomcat/work/Catalina/localhost/docs is unusable. > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.catalina.startup.HostConfi= g > > >>> > > > deployDirectory > > >>> > > > INFO: Deploying web application directory > > >>> > > /datadisk1/tomcat/webapps/manager > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.catalina.core.StandardContext > > >>> > > > postWorkDirectory > > >>> > > > WARNING: Failed to create work directory > > >>> > > > [/datadisk1/tomcat/work/Catalina/localhost/manager] for conte= xt > > >>> > > [/manager] > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.jasper.EmbeddedServletOptions > > >>> > > >>> > > > SEVERE: The scratchDir you specified: > > >>> > > > /datadisk1/tomcat/work/Catalina/localhost/manager is unusable= . > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.catalina.startup.HostConfi= g > > >>> > > > deployDirectory > > >>> > > > INFO: Deploying web application directory > > >>> > > > /datadisk1/tomcat/webapps/host-manager > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.catalina.core.StandardContext > > >>> > > > postWorkDirectory > > >>> > > > WARNING: Failed to create work directory > > >>> > > > [/datadisk1/tomcat/work/Catalina/localhost/host-manager] for > > >>> context > > >>> > > > [/host-manager] > > >>> > > > Aug 24, 2012 1:29:13 PM > org.apache.jasper.EmbeddedServletOptions > > >>> > > >>> > > > SEVERE: The scratchDir you specified: > > >>> > > > /datadisk1/tomcat/work/Catalina/localhost/host-manager is > unusable. > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.coyote.AbstractProtocol > start > > >>> > > > INFO: Starting ProtocolHandler ["http-bio-8080"] > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.coyote.AbstractProtocol > start > > >>> > > > INFO: Starting ProtocolHandler ["ajp-bio-8009"] > > >>> > > > Aug 24, 2012 1:29:13 PM org.apache.catalina.startup.Catalina > start > > >>> > > > INFO: Server startup in 1613 ms > > >>> > > > > > >>> > > > I am not sure my "export TOMCAT_USER=3Dtomcat" is right, or i= f I > am > > >>> missing > > >>> > > > something. > > >>> > > > > > >>> > > > Regards, > > >>> > > > > > >>> > > > Fred > > >>> > > > > > >>> > > > On Fri, Aug 24, 2012 at 12:01 PM, Jeff MAURY < > > >>> jeffmaury@jeffmaury.com > > >>> > > > >wrote: > > >>> > > > > > >>> > > > > Fred, > > >>> > > > > > > >>> > > > > you are getting confused by the term OpenJDK. It comes in t= wo > > >>> flavor, > > >>> > > JRE > > >>> > > > > and JDK. I have some .h files on my Ubuntu server, but not > under > > >>> > > > > /usr/lib/jvm/java-1.6.0-openjdk but under > > >>> /usr/lib/jvm/java-6-openjdk > > >>> > > > > > > >>> > > > > Regards > > >>> > > > > Jeff > > >>> > > > > > > >>> > > > > > > >>> > > > > On Fri, Aug 24, 2012 at 8:52 AM, Fred Janon < > fjanon@gmail.com> > > >>> wrote: > > >>> > > > > > > >>> > > > > > Hi Jeff, > > >>> > > > > > > > >>> > > > > > Thanks, but I read the instructions and requirements for = a > C > > >>> compiler > > >>> > > > an > > >>> > > > > > the JDK. As shown in my original message there is a JDK > > >>> > > > > > > > >>> > > > > > > /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/* > > >>> > > > > > > > >>> > > > > > but no "jni_md.h" in the Open JDK. As I said the "jni_md.= h" > > >>> seems to > > >>> > > be > > >>> > > > > in > > >>> > > > > > the Windows JDK, but not in the Linux one. > > >>> > > > > > > > >>> > > > > > Cheers, > > >>> > > > > > > > >>> > > > > > Fred > > >>> > > > > > > > >>> > > > > > On Fri, Aug 24, 2012 at 7:51 AM, Jeff MAURY < > > >>> jeffmaury@jeffmaury.com > > >>> > > > > > >>> > > > > > wrote: > > >>> > > > > > > > >>> > > > > > > You need a JDK to be installed on your machine and it > seems > > >>> you've > > >>> > > > > only a > > >>> > > > > > > JRE > > >>> > > > > > > > > >>> > > > > > > Jeff > > >>> > > > > > > > > >>> > > > > > > > > >>> > > > > > > On Thu, Aug 23, 2012 at 10:12 PM, Fred Janon < > > >>> fjanon@gmail.com> > > >>> > > > wrote: > > >>> > > > > > > > > >>> > > > > > > > Hi, > > >>> > > > > > > > > > >>> > > > > > > > I am trying to build the Unix deamon jsvc in AWS EC2 > > >>> Linux. I did > > >>> > > > not > > >>> > > > > > > > install Tomcat7 that comes with the AWS Linux, I > downloaded > > >>> > > Tomcat7 > > >>> > > > > > from > > >>> > > > > > > > the Apache Tomcat website, I installed it and ran > Tomcat7 > > >>> > > > > successfully. > > >>> > > > > > > Now > > >>> > > > > > > > I am trying to build the daemon to run Tomcat7 as a > > >>> daemon. I get > > >>> > > > an > > >>> > > > > > > error > > >>> > > > > > > > running the "configure" script as indicated in the > Tomcat > > >>> > > > > > documentation. > > >>> > > > > > > I > > >>> > > > > > > > did a lot of searching on the web and cannot find a > > >>> solution to > > >>> > > > this > > >>> > > > > > > issue. > > >>> > > > > > > > I am not fluent in shell scripting, so my > understanding of > > >>> > > > > "configure" > > >>> > > > > > is > > >>> > > > > > > > very limited. > > >>> > > > > > > > > > >>> > > > > > > > Do I need to regenerate the "configure" script or do = I > > >>> need to > > >>> > > > modify > > >>> > > > > > the > > >>> > > > > > > > script? > > >>> > > > > > > > > > >>> > > > > > > > The error is: > > >>> > > > > > > > *checking for JDK os include directory... Cannot find > > >>> jni_md.h in > > >>> > > > > > > > /usr/lib/jvm/jre/* > > >>> > > > > > > > *configure: error: You should retry > --with-os-type=3DSUBDIR* > > >>> > > > > > > > * > > >>> > > > > > > > * > > >>> > > > > > > > It looks like *"jni_md.h"* is part of the Windows JDK= , > > >>> *but it's > > >>> > > > not > > >>> > > > > in > > >>> > > > > > > the > > >>> > > > > > > > Linux OpenJDK on CentOS.* > > >>> > > > > > > > > > >>> > > > > > > > I don't really understand why the message says > > >>> "*with-os-type*" > > >>> > > > where > > >>> > > > > > it > > >>> > > > > > > > seems to mean JDK? > > >>> > > > > > > > > > >>> > > > > > > > As indicated in the INSTALL.txt below, I am reporting > the > > >>> issue, > > >>> > > > > hoping > > >>> > > > > > > > that someone can give me a solution or a patch for th= e > > >>> script... > > >>> > > > > > > > > > >>> > > > > > > > "Depending on your JDK layout, configure might fail t= o > > >>> find the > > >>> > > JNI > > >>> > > > > > > > machine dependant include file (jni_md.h). If that's > the > > >>> case use > > >>> > > > the > > >>> > > > > > > > --with-os-type=3D parameter where subdir poin= ts > to > > >>> the > > >>> > > > > directory > > >>> > > > > > > > within JDK include directory containing jni_md.h file= . > > >>> > > > > > > > If your operating system is supported, configure will > go > > >>> thru > > >>> > > > > cleanly, > > >>> > > > > > > > otherwise it will report an error (please send us the > > >>> details of > > >>> > > > your > > >>> > > > > > > > OS/JDK, or a patch against the sources)." > > >>> > > > > > > > > > >>> > > > > > > > Below is the console output running configure and som= e > > >>> > > information > > >>> > > > > > about > > >>> > > > > > > > the jdk installed. > > >>> > > > > > > > > > >>> > > > > > > > [ec2-user@ip-10-244-162-78 unix]$ *./configure* > > >>> > > > > > > > *** Current host *** > > >>> > > > > > > > checking build system type... i686-pc-linux-gnu > > >>> > > > > > > > checking host system type... i686-pc-linux-gnu > > >>> > > > > > > > checking cached host system type... ok > > >>> > > > > > > > *** C-Language compilation tools *** > > >>> > > > > > > > checking for gcc... gcc > > >>> > > > > > > > checking for C compiler default output file name... > a.out > > >>> > > > > > > > checking whether the C compiler works... yes > > >>> > > > > > > > checking whether we are cross compiling... no > > >>> > > > > > > > checking for suffix of executables... > > >>> > > > > > > > checking for suffix of object files... o > > >>> > > > > > > > checking whether we are using the GNU C compiler... y= es > > >>> > > > > > > > checking whether gcc accepts -g... yes > > >>> > > > > > > > checking for gcc option to accept ANSI C... none need= ed > > >>> > > > > > > > checking for ranlib... ranlib > > >>> > > > > > > > checking for strip... strip > > >>> > > > > > > > *** Host support *** > > >>> > > > > > > > checking C flags dependant on host system type... ok > > >>> > > > > > > > *** Java compilation tools *** > > >>> > > > > > > > *checking for JDK os include directory... Cannot find > > >>> jni_md.h in > > >>> > > > > > > > /usr/lib/jvm/jre/* > > >>> > > > > > > > *configure: error: You should retry > --with-os-type=3DSUBDIR* > > >>> > > > > > > > > > >>> > > > > > > > [ec2-user@ip-10-244-162-78 unix]$ find / -name > 'jni_md.h' > > >>> > > > > 2>/dev/null > > >>> > > > > > > > > > >>> > > > > > > > [ec2-user@ip-10-244-162-78 unix]$ find / -name '*jni*= ' > > >>> > > 2>/dev/null > > >>> > > > > > > > /usr/share/java-jni > > >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > >>> > > > > >>> > /datadisk1/tomcat/bin/commons-daemon-1.0.10-native-src/windows/src/javajn= i.c > > >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > >>> > > > > >>> > /datadisk1/tomcat/bin/commons-daemon-1.0.10-native-src/windows/include/ja= vajni.h > > >>> > > > > > > > > > >>> > > > > > > > Installed Packages > > >>> > > > > > > > java-1.6.0-openjdk.i686 > > >>> > > installed > > >>> > > > > > > > > > >>> > > > > > > > ---------------------------------------- > > >>> > > > > > > > [ec2-user@ip-10-244-162-78 unix]$ *./configure > > >>> > > > > > > > -with-java=3D/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/= jre* > > >>> > > > > > > > *** Current host *** > > >>> > > > > > > > checking build system type... i686-pc-linux-gnu > > >>> > > > > > > > checking host system type... i686-pc-linux-gnu > > >>> > > > > > > > checking cached host system type... ok > > >>> > > > > > > > *** C-Language compilation tools *** > > >>> > > > > > > > checking for gcc... gcc > > >>> > > > > > > > checking for C compiler default output file name... > a.out > > >>> > > > > > > > checking whether the C compiler works... yes > > >>> > > > > > > > checking whether we are cross compiling... no > > >>> > > > > > > > checking for suffix of executables... > > >>> > > > > > > > checking for suffix of object files... o > > >>> > > > > > > > checking whether we are using the GNU C compiler... y= es > > >>> > > > > > > > checking whether gcc accepts -g... yes > > >>> > > > > > > > checking for gcc option to accept ANSI C... none need= ed > > >>> > > > > > > > checking for ranlib... ranlib > > >>> > > > > > > > checking for strip... strip > > >>> > > > > > > > *** Host support *** > > >>> > > > > > > > checking C flags dependant on host system type... ok > > >>> > > > > > > > *** Java compilation tools *** > > >>> > > > > > > > checking JAVA_HOME... > > >>> /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre > > >>> > > > > > > > *checking for JDK os include directory... Cannot find > > >>> jni_md.h in > > >>> > > > > > > > /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/* > > >>> > > > > > > > *configure: error: You should retry > --with-os-type=3DSUBDIR* > > >>> > > > > > > > > > >>> > > > > > > > ----------------------------------------- > > >>> > > > > > > > configure script excerpt: > > >>> > > > > > > > > > >>> > > > > > > > echo "$as_me:$LINENO: checking for JDK os include > > >>> directory" > > >>> > > > >&5 > > >>> > > > > > > > echo $ECHO_N "checking for JDK os include directory..= . > > >>> $ECHO_C" > > >>> > > >&6 > > >>> > > > > > > > JAVA_OS=3DNONE > > >>> > > > > > > > if test -f $JAVA_HOME/$JAVA_INC/jni_md.h > > >>> > > > > > > > then > > >>> > > > > > > > JAVA_OS=3D"" > > >>> > > > > > > > else > > >>> > > > > > > > for f in $JAVA_HOME/$JAVA_INC/*/jni_md.h > > >>> > > > > > > > do > > >>> > > > > > > > if test -f $f; then > > >>> > > > > > > > JAVA_OS=3D`dirname $f` > > >>> > > > > > > > JAVA_OS=3D`basename $JAVA_OS` > > >>> > > > > > > > echo " $JAVA_OS" > > >>> > > > > > > > break > > >>> > > > > > > > fi > > >>> > > > > > > > done > > >>> > > > > > > > if test "x$JAVA_OS" =3D "xNONE"; then > > >>> > > > > > > > echo "$as_me:$LINENO: result: Cannot find jni_md.h in > > >>> > > > > > > > ${JAVA_HOME}/${OS}" >&5 > > >>> > > > > > > > echo "${ECHO_T}Cannot find jni_md.h in > ${JAVA_HOME}/${OS}" > > >>> >&6 > > >>> > > > > > > > { { echo "$as_me:$LINENO: error: You should retry > > >>> > > > > > > > --with-os-type=3DSUBDIR" >&5 > > >>> > > > > > > > echo "$as_me: error: You should retry > > >>> --with-os-type=3DSUBDIR" > > >>> > > >&2;} > > >>> > > > > > > > { (exit 1); exit 1; }; } > > >>> > > > > > > > fi > > >>> > > > > > > > fi > > >>> > > > > > > > > > >>> > > > > > > > ----------------------------------------- > > >>> > > > > > > > > > >>> > > > > > > > Thanks > > >>> > > > > > > > > > >>> > > > > > > > Fred > > >>> > > > > > > > > > >>> > > > > > > > > >>> > > > > > > > > >>> > > > > > > > > >>> > > > > > > -- > > >>> > > > > > > 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 > > >>> > > > > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > -- > > >>> > > > > 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 > > >>> > > > > > > >>> > > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > -- > > >>> > > 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 > > >>> > > > > >>> > > >> > > >> > > > > > --0023544706d816670604c817dc99--