Service has no terminators

Hello,

My issue is the following: I managed to get my SDK working, but when I send a request, I get the message below. I don’t fully understand it — could someone help me figure out what it means and how to fix it so I can move forward with my project?

Thanks in advance!

```
on_req entered: { req: 2201546585520 } (8396)[ 8.089] ERROR ziti-sdk:connect.c:1073 connect_reply_cb() conn[0.0/UGM7_8ks/Connecting](2609) failed to connect, reason=service ‘NAME SERVICE’ has no terminators for instanceId on_resp entered: { req: 2201548376864, code: -24, status: 'Unknown system error -24', headers: {} }
```

Hi @dorianEliptec,

That would mean there's no identity binding your service. For a ziti dial to succeed there needs to be an identity that has bound the service. Doing so will create a terminator in your controller.

If you run

ziti edge list terminators

You should see one (or more) for example:

ziti edge list terminators
╭────────────────────────┬─────────┬───────────────────┬─────────┬────────────────────────┬──────────────────────────┬──────┬────────────┬──────────────╮
│ ID                     │ SERVICE │ ROUTER            │ BINDING │ ADDRESS                │ IDENTITY                 │ COST │ PRECEDENCE │ DYNAMIC COST │
├────────────────────────┼─────────┼───────────────────┼─────────┼────────────────────────┼──────────────────────────┼──────┼────────────┼──────────────┤
│ 3VbtK5bebkVg1krhSzC2Es │ mgmt    │ router-quickstart │ edge    │ 3VbtK5bebkVg1krhSzC2Es │                          │    0 │ default    │            0 │
│ 4CCv3Jxn0EUUqHB9qV0l5p │ mgmt    │ router-quickstart │ edge    │ 4CCv3Jxn0EUUqHB9qV0l5p │ controller-binder-152317 │    0 │ default    │            0 │
╰────────────────────────┴─────────┴───────────────────┴─────────┴────────────────────────┴──────────────────────────┴──────┴────────────┴──────────────╯
results: 1-2 of 2

Here you can see I have bound this "mgmt" service using both "addressable terminator" style (the Identity is not empty) along with the regular "dial by service name" type of example (identity is empty)

Hope that helps?

Hello thank for your answer

The problem is that when I run this command, I only get this error:
:cross_mark: Error invoking remote method 'ziti:listTerminators': Error: ziti edge list terminators failed (code 1)
error: no identities found in CLI config. Please log in using the 'ziti edge login' command.

I’m working on the client side, which means the client should not have to run ziti edge login or use any command lines.
I’m also getting the same error for ziti edge list services.
Do you have any solution for this?

I'm confused. The solution is to run the ziti login command on a machine that you want to login from. You need to authenticate to the management api using ziti edge login then you can list terminators and services. If you can't login to the management api, you won't be able to do 'administrative' functions (like these two commands)

but my problem is that I don’t have any login, I have nothing except my identity.json

You'd probably have to work with the OpenZiti overlay provider in that case so they can run that command for you.

When the service has no terminators, it means there are no identities in the OpenZiti overlay that have bound that particular service.

The easiest way as a developer to get around this is to just run your OWN overlay and make sure your code works. That's easy enough to do using the ziti cli itself. Start an ephemeral OpenZiti overlay using: ziti edge quickstart and you'll have a fully functional overlay that you can use locally.

That'd be what I would do. Alternatively in your app you should catch that error and inform the user that the service you're connecting to is "offline" (or something like that)

That would mean my identity.json isn’t working with my SDK?

No? If you're getting "no terminators" it would tell me you authenticated and tried to dial but there's nothing listening/binding that service.

  • An identity needs to bind a service - this creates a terminator
  • then identiteis can dial that service

Alright, I understand — I’ll do my best thank you.

{
"data": [ ],
"meta": {
"filterableFields": [
"hostId",
"sourceCtrl",
"updatedAt",
"address",
"service",
"router",
"service.name",
"router.name",
"id",
"createdAt",
"tags",
"isSystem",
"binding",
"instanceId"
],
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 0
}
}
}

How is that possible? It can’t find any terminators or even services, even though I’m using my identity.json and also the ziti edge quickstart. That’s also why I was able to run the command, but afterward, there’s nothing.

The information you're providing is making it very difficult for me to help you.

"it" can't find terminators? I don't know what 'it' is.

You need to do as I've asked. Run ziti edge list terminators and show the results. If you see no terminators for your service you need to start by ensuring you can bind a service.

If you want to look at a full and complete example that connects to a controller, makes an identity, sends traffic through the overlay look at the ziti ops verify-traffic command.

That command will show you what you need