{"id":50861,"date":"2018-12-26T13:00:00","date_gmt":"2018-12-26T19:00:00","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=50861"},"modified":"2018-12-26T13:00:00","modified_gmt":"2018-12-26T19:00:00","slug":"a-brand-new-tomcat-is-here","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/","title":{"rendered":"A Brand New Tomcat is Here!"},"content":{"rendered":"

In cPanel & WHM version 76, we implemented a new version of Apache Tomcat\u00ae for users that run EasyApache 4. This iteration represents a complete overhaul of our implementation and provides substantial differences from the EasyApache 3 version. The EasyApache 4 implementation of Tomcat configures a private instance for each user. This utilization increases security and allows the user to manage their Tomcat services, but increases memory use on the server.<\/p>\n

A Glimpse into the Process<\/h1>\n

<\/p>\n

We sat down with Adam Wien, the Product Owner of the team responsible for developing Tomcat. His demo of the new Tomcat at the 2018 cPanel Conference was well received, so we wanted to share the highlights of that demo with our readers.<\/p>\n

When this project began, one of the biggest pushes was to create a parity of EasyApache3 (EA3) for EasyApache4 (EA4) to give administrators what they were accustomed to using. This was one of the last things our development team had to do before EA3 reached End of Life.<\/p>\n

The easiest path forward was to make Tomcat work in EA4 the same way it did in EA3, meaning a single shared daemon amongst multiple users. This approach became a problem that we needed to overcome as users traditionally had to run the daemon as root, so any of the Java apps running on the server were also running as root. Worth pointing out is that there were some advantages of running it this way, such as a smaller memory footprint, and again, what users were used to experiencing.<\/p>\n

In version 76, we wanted to reintroduce Tomcat to the user base. As the new version was still considered experimental, we felt that this allowed us to take some risks. The user base of Tomcat was small, but very vocal, which gave us an advantage of an audience that provided feedback and the ability to iterate changes quickly. At that time, we reached out to a large partner that was using Tomcat, and we discovered they didn’t use our implementation the way we intended; they used a mixture of the old Tomcat processes and the new way we were going to do it. We sat down with the partner and spent some time deciding the best path forward, and decided that was giving users the tools they needed to make the correct decisions while still protecting them security wise.<\/p>\n

With that, we decided to start running Tomcat as a user daemon. Running it as a user gave us more security because it wasn’t running Java applications as root. There were some disadvantages: a larger memory footprint. Our initial testing showed every user that had Tomcat enabled was using an extra 128-256 MB of RAM. This wasn’t ideal, but Tomcat users understand that Java is a resource hog. Willing to make that tradeoff, we decided to push forward.<\/p>\n

So how did we get there?<\/h1>\n

In the pursuit of a new Tomcat, we’ve implemented a couple of new features. First, <\/span>Ubic<\/a>, a toolkit for describing daemons in pure Perl,<\/span> is an<\/span> init system for user-level daemons. Second, we’ve implemented a feature we are calling Port Authority<\/a>, which is configuration management for ports so that individual user’s Tomcat instances don’t trample on top of each other and are easier to configure overall.<\/p>\n

Also included as part of Port Authority are IP tables outbound rules to increase protection from Man in the Middle Attacks.<\/p>\n

So what happens when a user enables Tomcat now?<\/h1>\n

<\/p>\n

We now have a single installation of Tomcat that copies the binaries and configurations it needs into the users home directory. Tomcat then uses Ubic to manage starting and stopping that daemon. We see this being advantageous for modern web applications, and those not supported by mod_passenger.<\/p>\n

Once Tomcat is up and running, there are some changes to the way users handle deployment: the web root is not public_html, and it must be deployed manually. So you will have to use whatever proxying technique you prefer. mod_proxy\/mod_proxy_ajp<\/a><\/code> via command line is the most popular. We want to remind our users that this is an MVP, but also a basis for where we can go forward.<\/p>\n

So what’s next?<\/h1>\n

This all depends on customer adoption and customer requests. We are looking into auto-deployment of mod_proxy ajp<\/code> via the Application Manager or just deploying mod_proxy_ajp<\/code> automatically. We now have the framework where we could implement Tomcat 7, 8, or 9 on the same system without much effort. We are eager to hear how our users are interacting with Tomcat.<\/p>\n

To discuss Tomcat in EasyApache4 more in-depth, or to weigh in with your own opinion, join the conversation on Slack<\/a>, Discord<\/a>, or the Official cPanel subreddit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

In cPanel & WHM version 76, we implemented a new version of Apache Tomcat\u00ae for users that run EasyApache 4. This iteration represents a complete overhaul of our implementation and provides substantial differences from the EasyApache 3 version. The EasyApache 4 implementation of Tomcat configures a private instance for each user. This utilization increases security […]<\/p>\n","protected":false},"author":77,"featured_media":65077,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[89,45,325,1873],"class_list":["post-50861","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products","tag-cpanel","tag-proddevsec","tag-product-development","tag-v76"],"acf":[],"yoast_head":"\nA Brand New Tomcat is Here! | cPanel<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Brand New Tomcat is Here! | cPanel\" \/>\n<meta property=\"og:description\" content=\"In cPanel & WHM version 76, we implemented a new version of Apache Tomcat\u00ae for users that run EasyApache 4. This iteration represents a complete overhaul of our implementation and provides substantial differences from the EasyApache 3 version. The EasyApache 4 implementation of Tomcat configures a private instance for each user. This utilization increases security […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/\" \/>\n<meta property=\"og:site_name\" content=\"cPanel\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cpanel\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-26T19:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devel.www.cpanel.net\/wp-content\/uploads\/2018\/12\/2018.12.26.tomcat.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3858\" \/>\n\t<meta property=\"og:image:height\" content=\"1527\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"cPanel Community\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cPanel\" \/>\n<meta name=\"twitter:site\" content=\"@cPanel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cPanel Community\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/\",\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/\",\"name\":\"A Brand New Tomcat is Here! | cPanel\",\"isPartOf\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\"},\"datePublished\":\"2018-12-26T19:00:00+00:00\",\"dateModified\":\"2018-12-26T19:00:00+00:00\",\"author\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\"},\"breadcrumb\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devel.www.cpanel.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Brand New Tomcat is Here!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\",\"url\":\"https:\/\/devel.www.cpanel.net\/\",\"name\":\"cPanel\",\"description\":\"Hosting Platform of Choices\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devel.www.cpanel.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\",\"name\":\"cPanel Community\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"caption\":\"cPanel Community\"},\"description\":\"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.\",\"sameAs\":[\"https:\/\/cpanel.net\"],\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Brand New Tomcat is Here! | cPanel","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/","og_locale":"en_US","og_type":"article","og_title":"A Brand New Tomcat is Here! | cPanel","og_description":"In cPanel & WHM version 76, we implemented a new version of Apache Tomcat\u00ae for users that run EasyApache 4. This iteration represents a complete overhaul of our implementation and provides substantial differences from the EasyApache 3 version. The EasyApache 4 implementation of Tomcat configures a private instance for each user. This utilization increases security […]","og_url":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/","og_site_name":"cPanel","article_publisher":"https:\/\/www.facebook.com\/cpanel\/","article_published_time":"2018-12-26T19:00:00+00:00","og_image":[{"width":3858,"height":1527,"url":"https:\/\/devel.www.cpanel.net\/wp-content\/uploads\/2018\/12\/2018.12.26.tomcat.png","type":"image\/png"}],"author":"cPanel Community","twitter_card":"summary_large_image","twitter_creator":"@cPanel","twitter_site":"@cPanel","twitter_misc":{"Written by":"cPanel Community","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/","url":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/","name":"A Brand New Tomcat is Here! | cPanel","isPartOf":{"@id":"https:\/\/devel.www.cpanel.net\/#website"},"datePublished":"2018-12-26T19:00:00+00:00","dateModified":"2018-12-26T19:00:00+00:00","author":{"@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8"},"breadcrumb":{"@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/a-brand-new-tomcat-is-here\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devel.www.cpanel.net\/"},{"@type":"ListItem","position":2,"name":"A Brand New Tomcat is Here!"}]},{"@type":"WebSite","@id":"https:\/\/devel.www.cpanel.net\/#website","url":"https:\/\/devel.www.cpanel.net\/","name":"cPanel","description":"Hosting Platform of Choices","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devel.www.cpanel.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8","name":"cPanel Community","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","caption":"cPanel Community"},"description":"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.","sameAs":["https:\/\/cpanel.net"],"url":"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/50861"}],"collection":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/comments?post=50861"}],"version-history":[{"count":0,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/50861\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/media\/65077"}],"wp:attachment":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/media?parent=50861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/categories?post=50861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/tags?post=50861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}