You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't know what's the wrong with my env? I use podman-compose @ Mac, but it shall be the same.
forget how to fix it, I got the container name is fastapi-jaeger_app-a_1 with extra prefix fastapi-jaeger and suffix _1.
I have to change in all related areas to make it work as expected
main.py like TARGET_ONE_HOST = os.environ.get("TARGET_ONE_HOST", "fastapi-jaeger_app-b_1") // from app_b
docker-compose.yaml for naming
config under etc
But I think it shall not work like this, what's wrong with my env? I use podman-compose @ Mac, but it shall be the same
Can you paste your console out in the readme, I got it like below.
$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
645c7459b3f8 localhost/fastapi-jaeger_app-a:latest uvicorn main:app ... 25 seconds ago Up 14 seconds 0.0.0.0:8000->8000/tcp fastapi-jaeger_app-a_1
ffd1e27990ee localhost/fastapi-jaeger_app-b:latest uvicorn main:app ... 24 seconds ago Up 13 seconds 0.0.0.0:8001->8000/tcp fastapi-jaeger_app-b_1
3334db65abff localhost/fastapi-jaeger_app-c:latest uvicorn main:app ... 23 seconds ago Up 12 seconds 0.0.0.0:8002->8000/tcp fastapi-jaeger_app-c_1
08caf128b172 localhost/fastapi-jaeger_app-d:latest uvicorn main:app ... 21 seconds ago Up 11 seconds 0.0.0.0:8003->8000/tcp fastapi-jaeger_app-d_1
b9c68f04cbfd docker.io/library/cassandra:4.1.2 cassandra -f 20 seconds ago Up 10 seconds fastapi-jaeger_cassandra_1
eea4cb843e23 docker.io/jaegertracing/jaeger-cassandra-schema:1.47.0 19 seconds ago Up 9 seconds fastapi-jaeger_cassandra-schema_1
c8592793aee5 docker.io/jaegertracing/jaeger-collector:1.47.0 --cassandra.keysp... 17 seconds ago Up Less than a second 0.0.0.0:39969->4317/tcp, 0.0.0.0:41079->4318/tcp, 0.0.0.0:39891->14250/tcp fastapi-jaeger_jaeger-collector_1
20075f5cf1a8 docker.io/otel/opentelemetry-collector-contrib:0.81.0 --config=/conf/co... 15 seconds ago Up 6 seconds 0.0.0.0:39077->4317/tcp, 0.0.0.0:44199->4318/tcp fastapi-jaeger_otel-collector_1
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. The container name looks correct to me, and I had put my container status in readme. There are some differences like underline or dash, but I think that just because podman compose and docker compose have different patterns to generate the container name dynamically.
Back to your main question about why the containers can't communicate with each other even though you already modified the host inmain.py when using podman compose. In docker compose, each container can communicate with each other with service name(the key in compose file's services section) because they are in the same network. So there is no need to modify the host name, just keep it with the service name.
Since I am not using podman, I can't reproduce your issue. But I think it may be related to the network type you are using for podman, there are some discussion on containers/podman-compose#541 (comment) and containers/podman-compose#455 (comment). You can try to switch your podman network from cri to netavark, then your container may communicate with each other with service name.
Don't know what's the wrong with my env? I use
podman-compose
@ Mac, but it shall be the same.forget how to fix it, I got the container name is
fastapi-jaeger_app-a_1
with extra prefixfastapi-jaeger
and suffix_1
.I have to change in all related areas to make it work as expected
main.py
likeTARGET_ONE_HOST = os.environ.get("TARGET_ONE_HOST", "fastapi-jaeger_app-b_1")
// fromapp_b
docker-compose.yaml
for namingetc
But I think it shall not work like this, what's wrong with my env? I use
podman-compose
@ Mac, but it shall be the sameCan you paste your console out in the readme, I got it like below.
The text was updated successfully, but these errors were encountered: