Mark L.'s picture

I have a need for a Tomcat appliance; first thing I tried was TurnKey. Unfortunately, turnkey-apache-tomcat is way outdated, running tomcat6.

Trying to upgrade it to at least tomcat7 results in:

root@tomcat ~# apt-get install tomcat7
Reading package lists... Done                                                                                                                                
Building dependency tree                                                                                                                                     
Reading state information... Done                                                                                                                            
Some packages could not be installed. This may mean that you have                                                                                            
requested an impossible situation or if you are using the unstable                                                                                           
distribution that some required packages have not yet been created                                                                                           
or been moved out of Incoming.                                                                                                                               
The following information may help to resolve the situation:                                                                                                 
The following packages have unmet dependencies:                                                                                                              
 tomcat7 : Depends: tomcat7-common (>= 7.0.28-4+deb7u1) but it is not going to be installed                                                                  
E: Unable to correct problems, you have held broken packages.      

Any chance of something newer in the pipeline? Or at least upgrade instructions?

Jeremy Davis's picture

TBH I'm not that familiar with Tomcat but having a quick look it seems that it should install ok. Did you run 'apt-get update' first?

Perhaps there is something already broken on your system? Try running 'apt-get install -f' (with no package names).

Perhaps you need to uninstall tomcat6 first? I'm not sure... 'apt-get remove tomcat6'

FWIW we are working on the new v14.0 appliance range ATM and for that the Tomcat appliance will include Tomcat 7 by default. We don't have an ETA for v14.0 but should be within the next few months. If you want new and security updates regarding TurnKey please signup to our Security and News Announcements (top left of this page).

Mark L.'s picture

FWIW we are working on the new v14.0 appliance range ATM and for that the Tomcat appliance will include Tomcat 7 by default.

Is there somewhere that I could submit defects / enhancement requests?

Jeremy Davis's picture

Please post on our Issue Tracker. As it's on GitHub you'll need to signup for a separate GitHub user account (but they're free).

If you have multiple bugs and/or feature requests, generally it is best to put them each as single issues. Tip: If they are relevant to (or rely on) another issue being fixed then you can cross reference issues easily by typing # followed by the number of the issue you want to reference. E.g. if I wanted to reference issue number 199 then I would type #199

I'll see it and tag it as appropriate

Mark L.'s picture

This is on a fresh install, so everything is uptodate.

Trying to remove tomcat6 just breaks the system, but still prevents tomcat7 from being installed.

Mark L.'s picture

So if you remove tomcat6, tomcat6-common, tomcat6-admin, and tomcat6-docs, you are then able to install tomcat7. But as I said, that hoses the system. :(

I did assume it would not be just that easy.

Jeremy Davis's picture

Did I already say that I have absolutely no idea WRT Tomcat...?! :)

But anyway I can get it close...

apt-get update && apt-get install tomcat7 tomcat7-common libtomcat7-java

rm /var/lib/tomcat7/webapps/ROOT/index.html
cp -r /var/lib/tomcat6/webapps/ROOT/* /var/lib/tomcat7/webapps/ROOT

service tomcat7 restart

That gets it working on port 8080, but after a little mucking around I haven't been successful in getting it to run on 80 (i.e. default http port; as per the default tomcat appliance).

My guess is that google would probably get you the last little bit...

I'm pretty sure that it has to do with setting the authbind - I tried setting it to 'yes' in /etc/default/tomcat7 (and restarting tomcat7) but that doesn't seem to be quite enough...

Mark L.'s picture

Finally found the correct path:


Jeremy Davis's picture

So if you're handy with Tomcat please feel free to have a look and provide some tweaks...

Add new comment