Hi @Allan_Zimmermann,
Thank you for your amazing job with OpenRPA&Openflow!
I have a good base experience with docker I think. Like creating my own containers or installing Nextcloud / Node-Red / N8N with docker-compose etc. But I don’t have much experience with traefik.
This is why I’m hitting a wall.
Openflow is running here.
h.t.t.p://opc-x2/
From within Openflow I have added two Node-Red agents.
h.t.t.p://openrpa-nodered1.opc-x2
h.t.t.p://openrpa-nodered1.opc-x2
In both Node-Red instances I created a simple [HTTP IN] node as a GET /hello request
h.t.t.p://openrpa-nodered1.opc-x2/hello
h.t.t.p://openrpa-nodered1.opc-x2/hello
Both are accessible from my host machine. Everything works.
But when I try to access h.t.t.p://openrpa-nodered1.opc-x2/hello from within openrpa-nodered2 I get an error.
Well I guest, both don’t know about each other.
So how to make then see and talk to each other?
The real main goal of my question is to be able to call h.t.t.p://openrpa-nodered1.opc-x2/hello from another computer on my network. But first I need to fix the question above.
h.t.t.p => Sorry, new users can only put 2 links in a post.
My best guess is you did not use a prober dns ( public dns, or an internal dns server that both your machine and the machine with docker uses )
if you tried “cheating” and simply use the host file , that will not work
docker runs an internal dns server, so you can also access stuff by service name
So from your example … openrpa-nodered1 can reach openrpa-nodered2
but if openrpa-nodered1.opc-x2 is not registered in dns, openrpa-nodered1 cannot reach openrpa-nodered2.opc-x2
traefik allows loop back traffic, so my assumtion here is that *.opc-x2 points to traefik’s external ip ( in this case the host machine )
Thank you for you answer @Allan_Zimmermann !
But, it is still not working as expected.
Here is more information about the containers.
* Agent1
Name: openrpa-nodered1 (This is docker service name)
Slug: openrpa-nodered1
IP: 10.89.5.114
Public URL: openrpa-nodered1.opc-x2
* Agent2:
Name: openrpa-nodered2 (This is docker service name)
Slug: openrpa-nodered2
IP: 10.89.5.115
Public URL: openrpa-nodered2.opc-x2
Like you have mentioned, I removed the “.opc-x2” part of the URL so that the HTTP request uses the docker service name.
It worked!
Well I don’t have “getaddrinfo ENOTFOUND” anymore but another error.
The IP is Agent1’s IP, so the URL is pointing to the right container. This is good.
But the connection is refused on port 80.
# docker ps -a
IMAGE STATUS PORTS NAMES
docker.io/library/mongo:latest Up 6 minutes ago openrpa-mongo
docker.io/library/traefik:latest Up 6 minutes ago 0.0.0.0:80->80/tcp openrpa-traefik
docker.io/library/rabbitmq:latest Up 6 minutes ago openrpa-rabbitmq
docker.io/library/mongo:latest Exited (1) 6 minutes ago openrpa-mongosetup
docker.io/openiap/openflow:latest Up 5 minutes ago 0.0.0.0:5858->5858/tcp openrpa-openflow
docker.io/openiap/noderedagent:latest Up About a minute ago openrpa-nodered1
docker.io/openiap/noderedagent:latest Up About a minute ago openrpa-nodered2
That’s true, docker ps -a shows me agent1 and agent2 but no port 80 are beeing exposed for them.
Here is the docker-compose that I’m using.
I added “container_name” to all the services.
I changed the domain from “localhost.openiap.io” to “opc-x2”
I added the “networks” at the end of the file.
many services don’t use port 80 ( but you see port 80 or 443 becource the trafic goes though traefik )
node-red for instance uses port 3000 ( and so does the api nodes in openflow )
( that is what the - traefik.http.services.http-service.loadbalancer.server.port=3000 label is telling traefik )
So if you want to “hit” the nodered nodes internally and not though traefik, you need to use the service name and port 3000
That worked!
Using docker service name and port 3000 did the trick!
This is how Openflow is doing things! I learned a lot! Thank you.
Is there a page somewhere talking about how things work under the hood of Openflow?
It is very interesting!
The above is docker specific, so if you want to learn more about that, i can highly recommend watching some youtube videos about docker/kubernetes and reverse proxy ( like nginx and traefik )
There is not a lot, but there is a few topics covered about openflow here https://openflow.openiap.io/ ( like the Architecture page )