# tomcat 5.0.28 isn't working out of the box

## dOcBrOwN

Hi!

We have some problems with tomcat 5.0.28 here. A fresh install won't work. There is just a blank page on http://<server>:8080. However a fresh 5.0.27-4 installation is doing his job. We don't know why. Are there any switches that we're missing with the new pathes etc.? Any help would be gratefully appreciated.

----------

## j-m

Some error messages from the logs, please. Ran out of crystal balls.  :Razz: 

----------

## MrSpock

I'm picking up from here.

```
emerge tomcate

/etc/init.d/tomcat start
```

gives no error at all. Browser just shows a white page.

if i do a wget http://localhost:8080/ from the console i get "ERROR 400: No Host matches server name localhost." Then i used the minimal server.xml as shown here:

```

<Server port="8005" shutdown="SHUTDOWN">

  <GlobalNamingResources>

    <!-- Used by Manager webapp -->

    <Resource name="UserDatabase" auth="Container"

              type="org.apache.catalina.UserDatabase"

      description="User database that can be updated and saved">

    </Resource>

    <ResourceParams name="UserDatabase">

      <parameter>

        <name>factory</name>

        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>

      </parameter>

      <parameter>

        <name>pathname</name>

        <value>conf/tomcat-users.xml</value>

      </parameter>

    </ResourceParams>

  </GlobalNamingResources>

  <Service name="Catalina">

    <Connector port="8080" />

    <Engine name="Catalina" defaultHost="localhost" debug="1">

      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>

      <Logger className="org.apache.catalina.logger.FileLogger"

              prefix="catalina_log." suffix=".txt"

              timestamp="true"/>

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

             resourceName="UserDatabase" />

      <Host name="localhost" debug="1" appBase="webapps"

            unpackWARs="true" autoDeploy="true"

            xmlValidation="false" xmlNamespaceAware="false">

        <Valve className="org.apache.catalina.valves.AccessLogValve"

               prefix="localhost_access_log." suffix=".txt"

               pattern="common" resolveHosts="false"/>

      </Host>

    </Engine>

  </Service>

</Server>

```

Trying again in a browser doesn't give anything in the access log nor anything usefull in catalina.out (beside the already known 'No Host...' thing)

I've never seen that with tomcat. It should have worked right away like it did with the thousand versions before  :Cool: 

Don't know what else to try.

SPOCK

----------

## enginerd

Mr Spock and Docbrown: 

I am having the exact same issue. When I emerged tomcat 5's highest revision in portage 5.0.28 I get the 

blank page problem when browsing http://localhost:8080/ Although when I browse http://localhost:8080/admin

I do get the admin console. 

I tried DocBrowns's recommendation and downgraded to 5.0.27 and got the same behavior. I am working towards

installing mod_jk2 to connect Apache 2.0 and Tomcat but so far I have not gotten a reliable tomcat install to work

with. 

Any help with this would be appreciated as I am sure we all want a reliable development environment to work with. 

Cheers,

Adam

----------

## j-m

 *enginerd wrote:*   

> 
> 
> I tried DocBrowns's recommendation and downgraded to 5.0.27 and got the same behavior. I am working towards
> 
> installing mod_jk2 to connect Apache 2.0 and Tomcat but so far I have not gotten a reliable tomcat install to work
> ...

 

Have a look at mod_jk; mod_jk2 is unsupported and no longer maintainer.

----------

## enginerd

Just got it working with Tomcat 5.0.27

The solution was to delete all the junk that 5.0.28 installed in /etc, /var, and /opt then emerge the older revision. 

I downloaded mod_jk and it seems to be working much better than mod_jk2 was - thanks for that suggestion. 

I am currently working on getting eclipse to play well with Tomcat.

----------

## dOcBrOwN

Okay but what is wrong with the new version?

----------

## enginerd

Well I can't say specifically what is wrong with the new version - all I can say is that it didnt work for me. 

I am currently trying to get the Sysdeo Plugin for eclipse to work with Tomcat 5.0.27 but its not happening either. 

My JSP/Servelet learning experience is being moderately stifled by the slowness at which i can get my environment setup. 

ARGH:twisted:

----------

## newtonian

Hi-

I know it's not the gentoo way to do it but my clients want their own tomcat installation and I can't just use 1 tomcat on my system.

So what worked for me was to download the 5.0.28 binary from apache and put it in the clients directory.  The binary runs fine on my system.

So downloding the binary is a quick and easy fix if you absolutely have to have 5.0.28

You said you typed the following commands in:

 *Quote:*   

> 
> 
> emerge tomcate
> 
> /etc/init.d/tomcat start
> ...

 

I did an emerge to help you out but when I typed:

```

emerge tomcat

/etc/init.d/tomcat5 start

```

then I typed http://localhost:8080/ into the address bar in firefox.

Version 5.0.27 was installed and worked fine.  Was there a problem with 5.028 and they pulled it as the default?

----------

## bpopp

It's probably still working, but they've stopped installing the examples by default in the new version. You need to add 'examples' to your USE flag prior to installation if you still want them. I did this in my /etc/portage/package.use file by adding the following line and then re-emerging tomcat:

```

www-servers/tomcat   examples

```

----------

## MrSpock

It still doesn't explain the "ERROR 400: No Host matches server name localhost." error.

----------

## raptor

 *bpopp wrote:*   

> It's probably still working, but they've stopped installing the examples by default in the new version. You need to add 'examples' to your USE flag prior to installation if you still want them. I did this in my /etc/portage/package.use file by adding the following line and then re-emerging tomcat:
> 
> ```
> 
> www-servers/tomcat   examples
> ...

 

I downgraded to 5.0.27 and now it works (0.28 ebuild seem to be buggy)... the problem is that  I still dont have tomcat-docs, neither status ... nor manager ?

what is wrong ?

----------

## MrSpock

I think tomcat got a new maintainer with 5.0.28

But unfortunatly nothing seems to happen lately. I googled for hours. Noone else seems to have that odd problem. I'm not able to pinpoint it. So i downgraded to .27 and i'm fine with that version.

----------

## raptor

 *MrSpock wrote:*   

> I think tomcat got a new maintainer with 5.0.28
> 
> But unfortunatly nothing seems to happen lately. I googled for hours. Noone else seems to have that odd problem. I'm not able to pinpoint it. So i downgraded to .27 and i'm fine with that version.

 

I too had odd problems with .28 (i.e blank page), so I downgraded too  :Smile: 

meanwhile do u know where to find the packge for the docs.

----------

## muffl0n

I had the same problem with the blank page an own webapps that did not work. Solution was

```
 <Host name="localhost" debug="0" appBase="webapps"

       unpackWARs="true" autoDeploy="true"

       xmlValidation="false" xmlNamespaceAware="false">

```

in /etc/tomcat5/server.xml has to be

```
 <Host name="localhost" debug="0" appBase="server/webapps"

       unpackWARs="true" autoDeploy="true"

       xmlValidation="false" xmlNamespaceAware="false">

```

as the dir for the webapps is also /usr/share/tomcat-5/server/webapps/ and not /usr/share/tomcat-5/webapps/.

What is the trick with /etc/tomcat5 and /etc/tomcat-5 anyway?

I solved the log4j-problem by replacing catalina.sh with catalina.50.sh in /usr/share/tomcat-5/bin.

I'm still getting some very odd errors

```
 The scratchDir you specified: /usr/share/tomcat-5/work/Catalina/localhost/subcms is unusable.
```

Sure it is not, since it doesn't exist. Trying to fix this now...

I think it's safe to say: This ebuild is kind of bugged.

----------

## nife

nevermind sorry

----------

