[ 
https://issues.apache.org/jira/browse/FLINK-8305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308269#comment-16308269
 ] 

Aljoscha Krettek commented on FLINK-8305:
-----------------------------------------

This is a known issue based on a "feature" of Akka: Akka connections only work 
if they client connects to the server with exactly the same address that the 
server "thinks" it has. I think you can work around this by adding {{EXPOSE 
6123}} to your Dockerfile and using exactly that port and from an environment 
that can use the hostname of the JobManager.

> Docker port mapping doesn't work for JobManager RPC port on Official Flink 
> image
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-8305
>                 URL: https://issues.apache.org/jira/browse/FLINK-8305
>             Project: Flink
>          Issue Type: Bug
>          Components: Docker
>    Affects Versions: 1.4.0, 1.3.2
>         Environment: Mac OSX, Docker 17.09.1-ce-mac42 (21090)
>            Reporter: Thomas Wozniakowski
>
> With the images at: https://hub.docker.com/r/_/flink/. The JobManager RPC 
> port does not appear to be properly exposed via a standard docker port 
> mapping.
> Starting a local cluster with:
> {{docker run  --name flink_local -p 32789:6123 -t -d flink local}}
> gives you: 
> ||CONTAINER ID||IMAGE||COMMAND||CREATED||STATUS||PORTS||NAMES||
> |e2dd5f668f4f|flink|"/docker-entrypoin..."|6 minutes ago|Up 6 
> minutes|8081/tcp, 0.0.0.0:32789->6123/tcp|flink_local|
> Should allow submission of a job via command line with:
> {{flink run -m 0.0.0.0:32789 
> /usr/local/Cellar/apache-flink/1.3.2/libexec/examples/streaming/WordCount.jar}}
> But this fails with "Couldn't retrieve the JobExecutionResult from the 
> JobManager".
> Logging directly into the container with:
> {{sudo docker exec -it <CONTAINER_ID> /bin/bash}}
> allows you to successfully start and complete job with:
> {{flink run -m localhost:6123 /opt/flink/examples/streaming/WordCount.jar}}
> What am I missing here? If the job can be successfully submitted to 6123 
> locally, and that port is mapped to an external port on 0.0.0.0, then I 
> should be able to submit jobs to that port? I can't find any way to make this 
> work though. I've tried all variants of host name (localhost, 127.0.0.1, 
> 0.0.0.0) and none work.
> I would hugely appreciate any help.
> Thanks guys.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to