DCOS安装Flink报错
Error installing Flink in DCOS
我已经使用以下配置在 DigitalOcean 上部署了 DCOS
digitalocean_token = "***"
region = "fra1"
master_size = "4GB"
agent_size = "4GB"
boot_size = "4GB"
dcos_cluster_name = "digitalocean-dcos"
dcos_master_count = "1"
dcos_agent_count = "4"
dcos_public_agent_count = "1"
dcos_installer_url = "https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh"
dcos_ssh_key_path = "./do-key"
dcos_ssh_public_key_path = "./do-key.pub"
ssh_key_fingerprint = "***"
通过 GUI 和 DCOS CLI 安装 Flink 均失败。
显然错误是这样的:
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed
java.net.UnknownHostException: digitalocean-dcos-agent-00: digitalocean-dcos-agent-00: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
从这里复制:
flink--mesos-appmaster-digitalocean-dcos-agent-00.log
2017-07-29 17:10:04,930 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2017-07-29 17:10:05,223 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - --------------------------------------------------------------------------------
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Starting Mesos AppMaster (Version: 1.3.1, Rev:1ca6e5b, Date:20.06.2017 @ 10:08:43 PDT)
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Current user: root
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JVM: OpenJDK 64-Bit Server VM - Oracle Corporation - 1.8/25.111-b14
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Maximum heap size: 880 MiBytes
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/jre
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Hadoop version: 2.3.0
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JVM Options:
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlog.file=/mnt/mesos/sandbox/flink--mesos-appmaster-digitalocean-dcos-agent-00.log
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlog4j.configuration=file:/flink-1.3.1/conf/log4j.properties
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlogback.configurationFile=file:/flink-1.3.1/conf/logback.xml
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Program Arguments:
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dblob.server.port=20262
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.heap.mb=256
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.rpc.port=20261
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.web.port=20260
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.artifact-server.port=20263
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.initial-tasks=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.tasks.cpus=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.tasks.mem=1024
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.heap.mb=512
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.memory.preallocate=true
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.numberOfTaskSlots=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dparallelism.default=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.framework.role=*
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dsecurity.kerberos.login.use-ticket-cache=true
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Classpath: /flink-1.3.1/lib/flink-python_2.10-1.3.1.jar:/flink-1.3.1/lib/flink-shaded-hadoop2-uber-1.3.1.jar:/flink-1.3.1/lib/log4j-1.2.17.jar:/flink-1.3.1/lib/slf4j-log4j12-1.7.7.jar:/flink-1.3.1/lib/flink-dist_2.10-1.3.1.jar::/etc/hadoop/conf/:
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - --------------------------------------------------------------------------------
2017-07-29 17:10:05,234 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Registered UNIX signal handlers for [TERM, HUP, INT]
2017-07-29 17:10:05,252 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.master, zk://leader.mesos:2181/mesos
2017-07-29 17:10:05,252 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.failover-timeout, 60
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.initial-tasks, 1
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.type, mesos
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.image.name, openjdk:8-jre
2017-07-29 17:10:05,255 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.cpus, 1
2017-07-29 17:10:05,255 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.mem, 1024
2017-07-29 17:10:05,257 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.port, 6123
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.heap.mb, 256
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.heap.mb, 512
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.numberOfTaskSlots, 1
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.memory.preallocate, false
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: parallelism.default, 1
2017-07-29 17:10:05,259 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.web.port, 8081
2017-07-29 17:10:05,306 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.master, zk://leader.mesos:2181/mesos
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.failover-timeout, 60
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.initial-tasks, 1
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.type, mesos
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.image.name, openjdk:8-jre
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.cpus, 1
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.mem, 1024
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.port, 6123
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.heap.mb, 256
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.heap.mb, 512
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.numberOfTaskSlots, 1
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.memory.preallocate, false
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: parallelism.default, 1
2017-07-29 17:10:05,309 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.web.port, 8081
2017-07-29 17:10:05,402 INFO org.apache.flink.runtime.security.modules.HadoopModule - Hadoop user set to root (auth:SIMPLE)
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed
java.net.UnknownHostException: digitalocean-dcos-agent-00: digitalocean-dcos-agent-00: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.runPrivileged(MesosApplicationMasterRunner.java:216)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.call(MesosApplicationMasterRunner.java:181)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.call(MesosApplicationMasterRunner.java:178)
at org.apache.flink.runtime.security.HadoopSecurityContext.run(HadoopSecurityContext.java:43)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.run(MesosApplicationMasterRunner.java:178)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.main(MesosApplicationMasterRunner.java:139)
Caused by: java.net.UnknownHostException: digitalocean-dcos-agent-00: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
... 10 more
日志(无限循环)
+ '[' '' '!=' '' ']'
+ add_mesos_configurations
++ hostname -f
hostname: Name or service not known
+ add_if_non_empty jobmanager.rpc.address
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.role '*'
+ '[' -n '*' ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ add_if_non_empty mesos.resourcemanager.framework.principal ''
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.secret ''
+ '[' -n '' ']'
+ add_ssl_configurations
+ [[ '' == true ]]
+ add_kerberos_configurations
+ add_if_non_empty security.kerberos.login.use-ticket-cache true
+ '[' -n true ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ '[' '' '!=' '' ']'
+ add_if_non_empty security.kerberos.login.principal ''
+ '[' -n '' ']'
+ [[ '' != '' ]]
+ update_log_level
+ [[ INFO != '' ]]
+ sed -ie 's/log4j.rootLogger=INFO, file/log4j.rootLogger=INFO, file/g' /flink-1.3.1/conf/log4j.properties
+ exec /flink-1.3.1/bin/mesos-appmaster.sh -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 '-Dmesos.resourcemanager.framework.role=*' -Dsecurity.kerberos.login.use-ticket-cache=true
+ FLINK_SECURITY_DIR=/etc/security/flink
+ mkdir -p /etc/security/flink
+ export APPLICATION_WEB_PROXY_BASE=/service/flink
+ APPLICATION_WEB_PROXY_BASE=/service/flink
+ add_flink_configurations
+ export FLINK_JAVA_OPTS=
+ FLINK_JAVA_OPTS=
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1'
+ '[' '' '!=' '' ']'
+ add_mesos_configurations
++ hostname -f
hostname: Name or service not known
+ add_if_non_empty jobmanager.rpc.address
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.role '*'
+ '[' -n '*' ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ add_if_non_empty mesos.resourcemanager.framework.principal ''
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.secret ''
+ '[' -n '' ']'
+ add_ssl_configurations
+ [[ '' == true ]]
+ add_kerberos_configurations
+ add_if_non_empty security.kerberos.login.use-ticket-cache true
+ '[' -n true ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ '[' '' '!=' '' ']'
+ add_if_non_empty security.kerberos.login.principal ''
+ '[' -n '' ']'
+ [[ '' != '' ]]
+ update_log_level
+ [[ INFO != '' ]]
+ sed -ie 's/log4j.rootLogger=INFO, file/log4j.rootLogger=INFO, file/g' /flink-1.3.1/conf/log4j.properties
+ exec /flink-1.3.1/bin/mesos-appmaster.sh -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 '-Dmesos.resourcemanager.framework.role=*' -Dsecurity.kerberos.login.use-ticket-cache=true
我持续 运行 "Deploying 1 of 1" 状态不健康。
另一方面,安装Kafka和Redis等其他软件包成功。
我相信这是由于几天前修复的 dcos-flink 包中的一个错误。
fix: Set jobmanger.rpc.address to current host
假设修复程序尚未部署到您的 DCOS 宇宙。
在 AWS 的故障排除下here解释了该问题。虽然可以适配DigitalOcean.
引用上面的link:
There is a situation which can occur where the JobMaster is not able
to resolve its hostname. This causes the TaskManager container that
launches to never communicate with the JobManager and the cluster
never enters the ready state. In the logs will contain something
similar to
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed
java.net.UnknownHostException: agentname: agentname: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
This can be resolved by enabling "DNS Hostname" support in the
VPC for the agents.
aws ec2 modify-vpc-attribute --vpc-id vpc-a01106c2 --enable-dns-hostnames "{\"Value\":true}"
我在本地安装时遇到了类似的错误。事实证明,CentOS 7 在安装过程中并没有将其主机名添加到 /etc/hosts 文件中。我只需要添加行
127.0.0.1 myhostname
或者将您的主机名添加到该行(如果它已经存在)
马上开始工作
我已经使用以下配置在 DigitalOcean 上部署了 DCOS
digitalocean_token = "***"
region = "fra1"
master_size = "4GB"
agent_size = "4GB"
boot_size = "4GB"
dcos_cluster_name = "digitalocean-dcos"
dcos_master_count = "1"
dcos_agent_count = "4"
dcos_public_agent_count = "1"
dcos_installer_url = "https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh"
dcos_ssh_key_path = "./do-key"
dcos_ssh_public_key_path = "./do-key.pub"
ssh_key_fingerprint = "***"
通过 GUI 和 DCOS CLI 安装 Flink 均失败。
显然错误是这样的:
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed
java.net.UnknownHostException: digitalocean-dcos-agent-00: digitalocean-dcos-agent-00: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
从这里复制: flink--mesos-appmaster-digitalocean-dcos-agent-00.log
2017-07-29 17:10:04,930 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2017-07-29 17:10:05,223 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - --------------------------------------------------------------------------------
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Starting Mesos AppMaster (Version: 1.3.1, Rev:1ca6e5b, Date:20.06.2017 @ 10:08:43 PDT)
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Current user: root
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JVM: OpenJDK 64-Bit Server VM - Oracle Corporation - 1.8/25.111-b14
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Maximum heap size: 880 MiBytes
2017-07-29 17:10:05,224 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/jre
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Hadoop version: 2.3.0
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - JVM Options:
2017-07-29 17:10:05,229 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlog.file=/mnt/mesos/sandbox/flink--mesos-appmaster-digitalocean-dcos-agent-00.log
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlog4j.configuration=file:/flink-1.3.1/conf/log4j.properties
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dlogback.configurationFile=file:/flink-1.3.1/conf/logback.xml
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Program Arguments:
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dblob.server.port=20262
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.heap.mb=256
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.rpc.port=20261
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Djobmanager.web.port=20260
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.artifact-server.port=20263
2017-07-29 17:10:05,230 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.initial-tasks=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.tasks.cpus=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.tasks.mem=1024
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.heap.mb=512
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.memory.preallocate=true
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dtaskmanager.numberOfTaskSlots=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dparallelism.default=1
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dmesos.resourcemanager.framework.role=*
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - -Dsecurity.kerberos.login.use-ticket-cache=true
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Classpath: /flink-1.3.1/lib/flink-python_2.10-1.3.1.jar:/flink-1.3.1/lib/flink-shaded-hadoop2-uber-1.3.1.jar:/flink-1.3.1/lib/log4j-1.2.17.jar:/flink-1.3.1/lib/slf4j-log4j12-1.7.7.jar:/flink-1.3.1/lib/flink-dist_2.10-1.3.1.jar::/etc/hadoop/conf/:
2017-07-29 17:10:05,231 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - --------------------------------------------------------------------------------
2017-07-29 17:10:05,234 INFO org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Registered UNIX signal handlers for [TERM, HUP, INT]
2017-07-29 17:10:05,252 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.master, zk://leader.mesos:2181/mesos
2017-07-29 17:10:05,252 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.failover-timeout, 60
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.initial-tasks, 1
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.type, mesos
2017-07-29 17:10:05,254 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.image.name, openjdk:8-jre
2017-07-29 17:10:05,255 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.cpus, 1
2017-07-29 17:10:05,255 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.mem, 1024
2017-07-29 17:10:05,257 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.port, 6123
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.heap.mb, 256
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.heap.mb, 512
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.numberOfTaskSlots, 1
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.memory.preallocate, false
2017-07-29 17:10:05,258 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: parallelism.default, 1
2017-07-29 17:10:05,259 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.web.port, 8081
2017-07-29 17:10:05,306 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.master, zk://leader.mesos:2181/mesos
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.failover-timeout, 60
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.initial-tasks, 1
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.type, mesos
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.container.image.name, openjdk:8-jre
2017-07-29 17:10:05,307 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.cpus, 1
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: mesos.resourcemanager.tasks.mem, 1024
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.rpc.port, 6123
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.heap.mb, 256
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.heap.mb, 512
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.numberOfTaskSlots, 1
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.memory.preallocate, false
2017-07-29 17:10:05,308 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: parallelism.default, 1
2017-07-29 17:10:05,309 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: jobmanager.web.port, 8081
2017-07-29 17:10:05,402 INFO org.apache.flink.runtime.security.modules.HadoopModule - Hadoop user set to root (auth:SIMPLE)
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed
java.net.UnknownHostException: digitalocean-dcos-agent-00: digitalocean-dcos-agent-00: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.runPrivileged(MesosApplicationMasterRunner.java:216)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.call(MesosApplicationMasterRunner.java:181)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.call(MesosApplicationMasterRunner.java:178)
at org.apache.flink.runtime.security.HadoopSecurityContext.run(HadoopSecurityContext.java:43)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:40)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.run(MesosApplicationMasterRunner.java:178)
at org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner.main(MesosApplicationMasterRunner.java:139)
Caused by: java.net.UnknownHostException: digitalocean-dcos-agent-00: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
... 10 more
日志(无限循环)
+ '[' '' '!=' '' ']'
+ add_mesos_configurations
++ hostname -f
hostname: Name or service not known
+ add_if_non_empty jobmanager.rpc.address
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.role '*'
+ '[' -n '*' ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ add_if_non_empty mesos.resourcemanager.framework.principal ''
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.secret ''
+ '[' -n '' ']'
+ add_ssl_configurations
+ [[ '' == true ]]
+ add_kerberos_configurations
+ add_if_non_empty security.kerberos.login.use-ticket-cache true
+ '[' -n true ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ '[' '' '!=' '' ']'
+ add_if_non_empty security.kerberos.login.principal ''
+ '[' -n '' ']'
+ [[ '' != '' ]]
+ update_log_level
+ [[ INFO != '' ]]
+ sed -ie 's/log4j.rootLogger=INFO, file/log4j.rootLogger=INFO, file/g' /flink-1.3.1/conf/log4j.properties
+ exec /flink-1.3.1/bin/mesos-appmaster.sh -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 '-Dmesos.resourcemanager.framework.role=*' -Dsecurity.kerberos.login.use-ticket-cache=true
+ FLINK_SECURITY_DIR=/etc/security/flink
+ mkdir -p /etc/security/flink
+ export APPLICATION_WEB_PROXY_BASE=/service/flink
+ APPLICATION_WEB_PROXY_BASE=/service/flink
+ add_flink_configurations
+ export FLINK_JAVA_OPTS=
+ FLINK_JAVA_OPTS=
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1'
+ '[' '' '!=' '' ']'
+ add_mesos_configurations
++ hostname -f
hostname: Name or service not known
+ add_if_non_empty jobmanager.rpc.address
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.role '*'
+ '[' -n '*' ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=*'
+ add_if_non_empty mesos.resourcemanager.framework.principal ''
+ '[' -n '' ']'
+ add_if_non_empty mesos.resourcemanager.framework.secret ''
+ '[' -n '' ']'
+ add_ssl_configurations
+ [[ '' == true ]]
+ add_kerberos_configurations
+ add_if_non_empty security.kerberos.login.use-ticket-cache true
+ '[' -n true ']'
+ export 'FLINK_JAVA_OPTS= -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ FLINK_JAVA_OPTS=' -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 -Dmesos.resourcemanager.framework.role=* -Dsecurity.kerberos.login.use-ticket-cache=true'
+ '[' '' '!=' '' ']'
+ add_if_non_empty security.kerberos.login.principal ''
+ '[' -n '' ']'
+ [[ '' != '' ]]
+ update_log_level
+ [[ INFO != '' ]]
+ sed -ie 's/log4j.rootLogger=INFO, file/log4j.rootLogger=INFO, file/g' /flink-1.3.1/conf/log4j.properties
+ exec /flink-1.3.1/bin/mesos-appmaster.sh -Dblob.server.port=20262 -Djobmanager.heap.mb=256 -Djobmanager.rpc.port=20261 -Djobmanager.web.port=20260 -Dmesos.artifact-server.port=20263 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.cpus=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=512 -Dtaskmanager.memory.preallocate=true -Dtaskmanager.numberOfTaskSlots=1 -Dparallelism.default=1 '-Dmesos.resourcemanager.framework.role=*' -Dsecurity.kerberos.login.use-ticket-cache=true
我持续 运行 "Deploying 1 of 1" 状态不健康。
另一方面,安装Kafka和Redis等其他软件包成功。
我相信这是由于几天前修复的 dcos-flink 包中的一个错误。
fix: Set jobmanger.rpc.address to current host
假设修复程序尚未部署到您的 DCOS 宇宙。
在 AWS 的故障排除下here解释了该问题。虽然可以适配DigitalOcean.
引用上面的link:
There is a situation which can occur where the JobMaster is not able to resolve its hostname. This causes the TaskManager container that launches to never communicate with the JobManager and the cluster never enters the ready state. In the logs will contain something similar to
2017-07-29 17:10:05,553 ERROR org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner - Mesos JobManager initialization failed java.net.UnknownHostException: agentname: agentname: Name or service not known at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
This can be resolved by enabling "DNS Hostname" support in the VPC for the agents.
aws ec2 modify-vpc-attribute --vpc-id vpc-a01106c2 --enable-dns-hostnames "{\"Value\":true}"
我在本地安装时遇到了类似的错误。事实证明,CentOS 7 在安装过程中并没有将其主机名添加到 /etc/hosts 文件中。我只需要添加行
127.0.0.1 myhostname
或者将您的主机名添加到该行(如果它已经存在)
马上开始工作