Cannot connect to service

Hello everyone, I’ve been struggling with that error for quite some time now and can’t find any solution. I’m hoping someone might be able to help

The problem is that we have a server used as a service provider, and we can’t find a way to join it inside ziti, whether we use the tunneler or the python SDK (the server is using flask) any request we do towards the server are refused.
The tunneler logs show that the server know its identity, its service name, and it even sees the incoming request with all necessary informations, but it still refuses the request regardless.

I tried multiple things already, notably :

  • Both the SDK and the tunneler gives the same problem, but I don’t have any log (request info etc) when using the SDK
  • The flask services works perfectly fine when testing it locally, it only has problems when accessed from inside the ziti network
  • Other services works fine within the network, this is the only one having troubles working even though we believe we set it up the same way

Here is the message that I keep getting on the tunneler’s logs on the server :

(5623)[      111.428]    INFO tunnel-cbs:ziti_hosting.c:707 on_hosted_client_connect() hosted_service[2610] client[mathis01.zpix] client_src_addr[tcp:100.64.0.1:58952] dst_addr[tcp:localhost:2610]: incoming connection (5623)[      111.428]   ERROR tunnel-cbs:ziti_hosting.c:259 on_hosted_tcp_server_connect_complete() hosted_service[2610], client[mathis01.zpix] client_src_addr[tcp:100.64.0.1:58952]: connect to tcp:::1:2610 failed: connection refused

on this log both the client and service are the same identity (mathis01.zpix) but the exact same problem occurs no matter who the client is.

(edit) Maybe this error can also be interesting :

(error creating route for [c/6cXlwXa4qhOrmfltQYjqrR]: failed to establish connection with terminator address 54fODvocXVloYS6RXKNN4V. error: (rejected by application)

Here is the full logs if it can help.

logsziti.txt (8.7 KB)

I honestly have no idea where to look for so I might have forgotten a lot of infos, please ask if needed.

Any help would be heavily appreciated !

Hi Mathis - welcome to the community!

Including your service configs may be helpful. I’m not sure of the full status for IPv6 across all components (I see connect to tcp:::1:2610). What happens if you use IPv4 localhost address (127.0.0.1) in your host config?

Hey Dave ! Thanks a lot for your quick reply, I didn’t catch that at all.
I simply made it so my Flask application accepts both IPv4 and v6 and it now works as intented.

I think I dismissed that as I first tried with the SDK and waitress instead of the tunneler and IPv6 caused problems.

I still have some struggles using the python SDK, I’ll open another ticket if needed as that’s another issue. I only managed to get it to work with the ziti tunneler for now.

Many thanks again and have a great day!

It looks like your host.v1 configuration specifies “localhost” as the address of your server, and the operating system is resolving it to the ipv6 address “::1”. You should make sure your server process is actually listening on the ipv6 address, or specify “127.0.0.1” in your host.v1 configuration to avoid “localhost” being resolved to something unexpected.