apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.07k stars 1.1k forks source link

Runing cloudstack failed in docker #3008

Closed div8cn closed 5 years ago

div8cn commented 5 years ago

If docker does not enable IPV6, cloudstack-management will fail after startup;

Server.properties default IPV6, but docker does not start IPV6, so the startup fails /etc/cloudstack/management/server.properties bind.interface=::

ISSUE TYPE
COMPONENT NAME
docker
CLOUDSTACK VERSION
4.11.1
4.11.0
CONFIGURATION
OS / ENVIRONMENT

CentOS 7.5 Docker 18.06.1-ce

SUMMARY
STEPS TO REPRODUCE
Download cloudstack/tool/docker to /root/cloudstack/

docker build -f Dockerfile.centos6 -t cloudstack:4.11.1 .
docker run --name cloudstack-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:5.5
docker run -ti --name cloudstack --link cloudstack-mysql:mysql -d -p 8080:8080 -p 8250:8250 cloudstack:4.11.1
EXPECTED RESULTS
Cloudstack-management is running normally
ACTUAL RESULTS
Cloudstack-management failed to start

Cloudstack-management.err output error

OpenJDK 64-Bit Server VM warning: ignoring option PermSize=512M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=800m; support was removed in 8.0
05/11/2018 09:07:39 128 jsvc.exec error: Cannot start daemon
05/11/2018 09:07:39 126 jsvc.exec error: Service exit with a return value of 5
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:241)
Caused by: java.net.SocketException: Protocol family unavailable
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:334)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:302)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:238)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:397)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.apache.cloudstack.ServerDaemon.start(ServerDaemon.java:200)
    ... 5 more
bwsw commented 5 years ago

@div8cn do you think it's a bug? Docker is not a supported environment. I find dockerized deployment is very beneficial, but probably, it's a matter of additional Dockerfile placed in the mainstream repo which does configuration correctly and adding tests for CI/CD. Also, it makes sense to add a chapter in the documentation about this.

div8cn commented 5 years ago

Cloudstack for docker, in 4.10 and previous versions, can be properly activated. If this can not be considered as Bug, should we write a docker supporting documentation?

rafaelweingartner commented 5 years ago

@div8cn that would be something very cool to have

rohityadavcloud commented 5 years ago

Try latest, it was fixed https://github.com/apache/cloudstack/blob/master/client/conf/server.properties.in#L20