Mule 容器按照以下日志运行:详细信息在代码块中。
INFO 2017-08-20 14:53:50,580 [WrapperListener_start_runner] org.mule.runtime.module.launcher.MuleContainer:
**********************************************************************
* Mule Runtime and Integration Platform *
* Version: 4.0.0-BETA.4 Build: c03a2009 *
* MuleSoft, Inc. *
* For more information go to https://developer.mulesoft.com/ *
* *
* Server started: 8/20/17 2:53 PM *
* JDK: 1.8.0_131 (mixed mode) *
* OS: Linux (4.4.0-1022-aws, amd64) *
* Host: b2c75bd67158 (172.17.0.2) *
* Mule services: *
* - mule-service-oauth-1.0.0-BETA.4.zip *
* - mule-service-scheduler-1.0.0-BETA.4.zip *
* - mule-service-soap-1.0.0-BETA.4.zip *
* - mule-service-http-1.0.0-BETA.4.zip *
* - mule-service-weave-2.0.0-BETA.4.zip *
* Mule system properties: *
* - mule.base = /opt/mule *
* - mule.home = /opt/mule *
**********************************************************************
INFO 2017-08-20 14:53:50,584 [WrapperListener_start_runner] org.mule.runtime.module.launcher.coreextension.DefaultMuleCoreExtensionManagerServer: Initializing core extensions
INFO 2017-08-20 14:53:50,584 [WrapperListener_start_runner] org.mule.runtime.module.launcher.coreextension.DefaultMuleCoreExtensionManagerServer: Starting core extensions
INFO 2017-08-20 14:53:51,113 [WrapperListener_start_runner] org.mule.service.scheduler.internal.DefaultSchedulerService: Starting org.mule.service.scheduler.internal.DefaultSchedulerService@3cb32d0e...
INFO 2017-08-20 14:53:51,127 [WrapperListener_start_runner] org.mule.service.scheduler.internal.DefaultSchedulerService: Started org.mule.service.scheduler.internal.DefaultSchedulerService@3cb32d0e
INFO 2017-08-20 14:53:51,134 [WrapperListener_start_runner] org.mule.service.scheduler.internal.config.ContainerThreadPoolsConfig: Loading thread pools configuration from /opt/mule/conf/scheduler-pools.conf
INFO 2017-08-20 14:53:51,838 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer: ================== New Exploded Artifact: default
INFO 2017-08-20 14:53:51,911 [WrapperListener_start_runner] org.mule.runtime.module.deployment.impl.internal.domain.DefaultMuleDomain:
**********************************************************************
* Started domain 'default' *
**********************************************************************
INFO 2017-08-20 14:53:51,913 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DeploymentDirectoryWatcher:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Mule is up and kicking (every 5000ms) +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2017-08-20 14:53:51,916 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.StartupSummaryDeploymentListener:
**********************************************************************
* - - + DOMAIN + - - * - - + STATUS + - - *
**********************************************************************
* default * DEPLOYED *
**********************************************************************
做了一些调查
ubuntu@ip-172-31-27-212:/opt$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2c75bd67158 testing "/opt/mule/bin/sta..." 2 minutes ago Up 2 minutes 443/tcp, 1098-1099/tcp, 5000/tcp, 5701/tcp, 7777/tcp, 8899/tcp, 54327/tcp, 0.0.0.0:8080->8080/tcp dazzling_kalam
ubuntu@ip-172-31-27-212:/opt$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' b2c75bd67158
172.17.0.2
ubuntu@ip-172-31-27-212:/opt$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default ip-172-31-16-1. 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 docker0
172.31.16.0 * 255.255.240.0 U 0 0 0 eth0
ubuntu@ip-172-31-27-212:/opt$ ping 0.0.0.0
PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.033 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.038 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.038 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.036 ms
^C
--- 0.0.0.0 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 5998ms
rtt min/avg/max/mdev = 0.033/0.035/0.038/0.005 ms
ubuntu@ip-172-31-27-212:/opt$ ping 172.17.0.2
PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
64 bytes from 172.17.0.2: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from 172.17.0.2: icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from 172.17.0.2: icmp_seq=3 ttl=64 time=0.044 ms
64 bytes from 172.17.0.2: icmp_seq=4 ttl=64 time=0.046 ms
^C
--- 172.17.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.044/0.050/0.068/0.013 ms
运行 docker 容器
docker run -ti --rm -p 8080:8080 -v /home/ubuntu/dockerfiles:/opt/mule/apps $CONTAINER_TEST_IMAGE
从 dockerfile 中放置 mule 项目工件
WORKDIR /opt/mule
COPY mule-template-project-api-1.0.0-SNAPSHOT.zip /opt/mule/apps/hello-world.zip
毕竟,如果我正在尝试我的应用程序,或者正在运行 mule 容器正在显示
ubuntu@ip-172-31-27-212:~$ curl http://0.0.0.0:8080
curl: (56) Recv failure: Connection reset by peer
ubuntu@ip-172-31-27-212:~$ docker exec -it f71e9bfa8f9d curl localhost:8080
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"curl\": executable file not found in $PATH"
ubuntu@ip-172-31-27-212:~$ docker exec -it f71e9bfa8f9d curl 0.0.0.0:8080 rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: 启动容器进程导致"exec: \"curl\": $PATH 中找不到可执行文件"