Connecting to Meteor DDP from Java with Docker container

可紊 提交于 2019-12-25 08:28:02

问题


I am here just to share some experience with java DDP Client Meteor and Docker

Hello I am accessing to a meteor docker container from a J2EE docker container and it fails because there are some trouble at the connection with the server name (corresponding to "meteor" in my compose file) and the port "82".

In this case it doesn't take into account the port and it replaces it with a default value 80... so the connection fails...


回答1:


WHY ? because URI don't handle domain name without dots e.g. :

  • connect to meteor_1 port 3000
  • the uri is ws://meteor_1:3000/websocket
  • but int port = uri.getPort(); -> -1 and the ddp client fallback to 80 by default

I'll give a try this evening with a image name with a dot as it passes in java but I yet didn't test with the docker compose



来源:https://stackoverflow.com/questions/40281890/connecting-to-meteor-ddp-from-java-with-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!