Skip to content

CLOUDSTACK-9040: Use Tomcat6 for Debian packages. - #1040

Merged
asfgit merged 1 commit into
apache:masterfrom
borisroman:CLOUDSTACK-9040
Nov 9, 2015
Merged

asfgit merged 1 commit into
apache:masterfrom
borisroman:CLOUDSTACK-9040

Conversation

@borisroman

Copy link
Copy Markdown
Contributor

Use Tomcat6 for Debian packages.

How to test:
Package debian packages and install them. Will depend specifically on tomcat6 for now.

Error log before:

DEBUG:root:execute:uname -r
DEBUG:root:execute:uname -m
DEBUG:root:execute:hostname -f
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8080
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8080/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8250
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8250/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 9090
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 9090/tcp
DEBUG:root:execute:rm -f /etc/cloudstack/management/server.xml
DEBUG:root:execute:rm -f /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml
DEBUG:root:execute:ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:touch /var/run/cloudstack-management.pid
DEBUG:root:execute:chown cloud.cloud /var/run/cloudstack-management.pid
DEBUG:root:execute:hostname --fqdn
DEBUG:root:execute:mkdir /var/log/cloudstack-management/
DEBUG:root:Failed to execute:mkdir: cannot create directory '/var/log/cloudstack-management/': File exists
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 status
DEBUG:root:Failed to execute:tomcat6: unrecognized service
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 stop
DEBUG:root:Failed to execute:tomcat6: unrecognized service
DEBUG:root:execute:sudo update-rc.d -f tomcat6 remove
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management stop
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management remove
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management defaults
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management start
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:None

After:

root@cs1:~# cloudstack-setup-management
Starting to configure CloudStack Management Server:
Configure Firewall ...        [OK]
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!

Error log after:

DEBUG:root:execute:uname -r
DEBUG:root:execute:uname -m
DEBUG:root:execute:hostname -f
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8080
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8080/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8250
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8250/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 9090
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 9090/tcp
DEBUG:root:execute:rm -f /etc/cloudstack/management/server.xml
DEBUG:root:execute:rm -f /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml
DEBUG:root:execute:ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:touch /var/run/cloudstack-management.pid
DEBUG:root:execute:chown cloud.cloud /var/run/cloudstack-management.pid
DEBUG:root:execute:hostname --fqdn
DEBUG:root:execute:mkdir /var/log/cloudstack-management/
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 status
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 stop
DEBUG:root:execute:sudo update-rc.d -f tomcat6 remove
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management stop
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management remove
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management defaults
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management start

@wido

wido commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

LGTM

We can deal with other Tomcat versions later.

@ustcweizhou

Copy link
Copy Markdown
Contributor

cannot we fix the issue in tomcat7 suppport ?

@borisroman

Copy link
Copy Markdown
Contributor Author

@ustcweizhou We can! Though in the current structure, if we change to support Tomcat7 we can't support Tomcat6... In my opinion, we leave it to Tomcat6 for the 4.6 release, and improve the packaging and ACS to support Tomcat 7 & 8 for the 4.7 release.

@ustcweizhou

Copy link
Copy Markdown
Contributor

@borisroman Thanks! good to know it. Could you give more details how to make it work on tomcat7, so that we can discuss and look for a solution to make CS working on both of tomcat6 and tomcat 7 if possible?

@remibergsma

Copy link
Copy Markdown
Contributor

Can someone please post some results of a successful install after this change?

@yadvr

yadvr commented Nov 7, 2015

Copy link
Copy Markdown
Member

LGTM, maybe we jump to the latest tomcat in our next release

@remibergsma

Copy link
Copy Markdown
Contributor

Thanks Boris for posting the logs and such.

@asfgit
asfgit merged commit e5040b5 into apache:master Nov 9, 2015
asfgit pushed a commit that referenced this pull request Nov 9, 2015
CLOUDSTACK-9040: Use Tomcat6 for Debian packages.Use Tomcat6 for Debian packages.

How to test:
Package debian packages and install them. Will depend specifically on tomcat6 for now.

Error log before:
```
DEBUG:root:execute:uname -r
DEBUG:root:execute:uname -m
DEBUG:root:execute:hostname -f
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8080
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8080/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8250
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8250/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 9090
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 9090/tcp
DEBUG:root:execute:rm -f /etc/cloudstack/management/server.xml
DEBUG:root:execute:rm -f /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml
DEBUG:root:execute:ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:touch /var/run/cloudstack-management.pid
DEBUG:root:execute:chown cloud.cloud /var/run/cloudstack-management.pid
DEBUG:root:execute:hostname --fqdn
DEBUG:root:execute:mkdir /var/log/cloudstack-management/
DEBUG:root:Failed to execute:mkdir: cannot create directory '/var/log/cloudstack-management/': File exists
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 status
DEBUG:root:Failed to execute:tomcat6: unrecognized service
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 stop
DEBUG:root:Failed to execute:tomcat6: unrecognized service
DEBUG:root:execute:sudo update-rc.d -f tomcat6 remove
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management stop
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management remove
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management defaults
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management start
DEBUG:root:Failed to execute: * cloudstack-management is not installed
DEBUG:root:None
```

After:
```
root@cs1:~# cloudstack-setup-management
Starting to configure CloudStack Management Server:
Configure Firewall ...        [OK]
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!
```

Error log after:
```
DEBUG:root:execute:uname -r
DEBUG:root:execute:uname -m
DEBUG:root:execute:hostname -f
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8080
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8080/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 8250
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 8250/tcp
DEBUG:root:execute:iptables-save|grep INPUT|grep -w 9090
DEBUG:root:Failed to execute:
DEBUG:root:execute:ufw allow 9090/tcp
DEBUG:root:execute:rm -f /etc/cloudstack/management/server.xml
DEBUG:root:execute:rm -f /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml
DEBUG:root:execute:ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf
DEBUG:root:execute:touch /var/run/cloudstack-management.pid
DEBUG:root:execute:chown cloud.cloud /var/run/cloudstack-management.pid
DEBUG:root:execute:hostname --fqdn
DEBUG:root:execute:mkdir /var/log/cloudstack-management/
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 status
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 stop
DEBUG:root:execute:sudo update-rc.d -f tomcat6 remove
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management stop
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management remove
DEBUG:root:execute:sudo update-rc.d -f cloudstack-management defaults
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management status
DEBUG:root:execute:sudo /usr/sbin/service cloudstack-management start
```

* pr/1040:
  CLOUDSTACK-9040: Use Tomcat6 for Debian packages.

Signed-off-by: Remi Bergsma <github@remi.nl>
@ymolinet

ymolinet commented May 1, 2016

Copy link
Copy Markdown

Hi,

I'm trying to install CloudStack on Debian 8.
it's necessary to add lsb-release in dependencies for the system detection during installation.
Even if I add support of tomcat 8 in package dependencies, the installation of the management failed because installer is looking for tomcat6 installation.

DEBUG:root:execute:sudo /usr/sbin/service tomcat6 status
DEBUG:root:Failed to execute:● tomcat6.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
DEBUG:root:execute:sudo /usr/sbin/service tomcat6 stop
DEBUG:root:Failed to execute:Failed to stop tomcat6.service: Unit tomcat6.service not loaded.
DEBUG:root:execute:sudo update-rc.d -f tomcat6 remove

@borisroman
borisroman deleted the CLOUDSTACK-9040 branch May 1, 2016 21:47
@ymolinet

ymolinet commented May 3, 2016

Copy link
Copy Markdown

I'm just trying to use with Tomcat7 ( cloudstack-setup-management --tomcat7)

Starting to configure CloudStack Management Server:
Configure Firewall ... [OK]
Configure CloudStack Management Server ...[Failed]
Cannot find /etc/cloudstack/management/server7-nonssl.xml, https enable failed
Try to restore your system:
Restore Firewall ... [OK]
Restore CloudStack Management Server ...[OK]

In addition, the /etc/init.d/cloudstack-management LSB Script refer only Tomcat6.

Tomcat6 is depreaced under Debian and it seems that only this version is supported ??? I think it's very important to fix this.

@serverchief

Copy link
Copy Markdown
Contributor

I know you can get it to work with ease on CentOS6 and 7..

Cant really comment on Debian as i don't have any instances.

@ymolinet

ymolinet commented May 3, 2016 •

Copy link
Copy Markdown

Tomcat6 is End Of Life : https://tomcat.apache.org/tomcat-60-eol.html
Not specific for Debian ...

@jmcta

jmcta commented Jan 23, 2017

Copy link
Copy Markdown

Has this been resolved? Installing cloudstack-management 4.9.2.0 from deb still fails exactly the same way. And /etc/init.d/cloudstack-management is still written for Tomcat6

@ustcweizhou

Copy link
Copy Markdown
Contributor

@JamesMcTavish I just created a PR for tomcat7/ubuntu 16.04 support. #1916
You can download the patch, apply it and build the packages by yourself.
https://github.com/apache/cloudstack/pull/1916.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants