pyTigergraph connection refused in docker environment

I built a flask application using tigergraph as the db instance, it runs all good in my local environment. Within the docker container that i created, the connection always failed and said “Check your username or password. [Errno 111] Connection refused”.

pyTigerGraph==1.0.2

conn = tg.TigerGraphConnection(
host=“http://127.0.0.1”,
restppPort=“8080”,
gsPort=“14450”,
graphname=“Cp_CMDB”,
certPath=False,
username=“tigergraph”,
password=“tigergraph”,
)
print(conn)
conn.apiToken = conn.getToken(conn.createSecret())

@mingl can you send me your docker setup?

Best,
Bruno

1 Like

Solved with replacing the ‘localhost’ with ‘host.docker.internal’, not the issue of Tigergraph. Sorry with that, this topic can be closed.

2 Likes

@mingl Thanks for letting us know the problem and resolution!