Coder Social home page Coder Social logo

ziti-sdk-py's Introduction

Ziggy loves python

Python SDK for OpenZiti

Discourse GitHub Stars Downloads License

Getting StartedExamplesSupportContributingLicense

The Python SDK for OpenZiti is a library that enables you to integrate zero trust network connectivity into your Python applications, and establish secure connections with remote network resources over an OpenZiti network. The SDK also simplifies the process of adding secure, zero-trust network connectivity built into your Python application. It's so simple that it can be done in just two lines of code!

OpenZiti is an open-source project that provides secure, zero-trust networking for applications running on any platform.

More specifically, the SDK allows you to integrate zero trust at the application level. This means your data is never exposed outside the application environment providing you with end-to-end encryption for ultimate security. See other zero trust models here.

Zero-trust-application-access

Getting Started

If you don't already have an OpenZiti network running, you can follow our express install guides to set up the network that fits your needs. Or, you can try CloudZiti for free, check out more here.

Installing the SDK

The Python SDK for OpenZiti is distributed via the Python Package Index (PyPI) and can be installed using pip package manager.

pip install openziti

Using Ziti Python SDK

With just two lines of code, you can turn your plain old web server into a secure, zero-trust embedded application. Below is an example of just how simple it is to get started.

Provide a hostname, and port for your application, a simple monkey patch, and you're ready to go. You don't even need to know what a monkey patch is! However, if you're interested in what a monkey patch is, expand the block below.

What is Monkey Patching?

Monkey patching allows developers to modify functionality for code even when they may not have access to the original source code. Because Python has a dynamic object model allowing developers to modify objects at runtime. Monkey patching allows developers to point a function call to any function they want. We can even implement our own function that doesn't exist in the source code.

The way this Python SDK uses monkey patching is to override existing functionality in socket handling by the socket module.

Taking a look at the code below, the key lines are the last two. You can see how, for each monkey patched function, we're telling that function call on the sock object to be directed to the function held in _patch_methods. Therefore, this SDK can be used on any application that doesn't manage its own sockets.

def __init__(self, **kwargs):
    self.orig_socket = sock.socket
    sock.socket = _patchedSocket(kwargs)
    self.orig_methods = {m: sock.__dict__[m] for m, _ in
                         _patch_methods.items()}
    for m_name, _ in _patch_methods.items():
        sock.__dict__[m_name] = _patch_methods[m_name]
cfg = dict(ztx=openziti.load('/path/to/identity.json'), service="name-of-ziti-service")
openziti.monkeypatch(bindings={('127.0.0.1', 8000): cfg})

Or try our decorator pattern with a function annotation

@openziti.zitify(bindings={('127.0.0.1', 18080): {'ztx': '/path/to/identity.json', 'service': 'name-of-ziti-service'}})
def yourFunction():

The binding dictionary configures what happens when the code tries to open a server socket. Standard network addresses are mapped to ziti service configurations. For example, with his configuration

bindings = {
   ('0.0.0.0', 8080): { 'ztx': 'my-identity.json', 'service':'my-service' }
}

when application opens a server socket and binds to address 0.0.0.0:8080 it will actually bind to the ziti service named my-service.

Binding addresses can be specified with tuples, strings, or ints(ports). ('0.0.0.0', 8080), '0.0.0.0:8080', ':8080', 8080 are all considered and treated the same.

Examples

Try it out yourself with one of our examples

Support

Looking for Help?

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.

Contributing

Do you want to get your hands dirty and help make OpenZiti better? Contribute to the OpenZiti open-source project through bug reports, bug fixes, documentation, etc. Check out our guide on contributing to our projects here.

License

Apache 2.0

ziti-sdk-py's People

Contributors

dovholuknf avatar ekoby avatar gberl002 avatar qrkourier avatar sabedevops avatar smilindave26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ziti-sdk-py's Issues

Monkeypatch affecting MQTT connections

After monkeypatching for doing a ziti connection using paho.mqtt.client (or any MQTT library), the connection fails with the following error:

Traceback (most recent call last):
  File "DemoMTTQ.py", line 466, in <module>
    listen_for_messages()
  File "DemoMTTQ.py", line 264, in listen_for_messages
    client = get_client()
  File "DemoMTTQ.py", line 147, in get_client
    client = mqtt.Client(client_id=client_id)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 519, in __init__
    self._sockpairR, self._sockpairW = _socketpair_compat()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 244, in _socketpair_compat
    listensock.bind(("127.0.0.1", 0))
  File "/usr/local/lib/python3.9/site-packages/openziti/zitisock.py", line 58, in bind
    bindings = self._ziti_opts['bindings']
KeyError: 'bindings'
Exception ignored in: <function Client.__del__ at 0x7f2e696ac790>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 603, in __del__
    self._reset_sockets()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 649, in _reset_sockets
    if self._sockpairR:
AttributeError: 'Client' object has no attribute '_sockpairR'

Edit: reformatted traceback block -ekoby

How can I use zitify with fastAPI and uvicorn?

Hi,
I'm trying to zitify my fastAPI service. This is a minimal example:

import sys

import openziti
import uvicorn
from fastapi import FastAPI

app = FastAPI()
bind_opts = {}  # populated in main


@openziti.zitify(bindings={
    ':18080': bind_opts,
})
def run_app():
    config = uvicorn.Config("main:app", host="0.0.0.0", port=18080, log_level="info")
    server = uvicorn.Server(config)
    server.run()


@app.get("/")
async def hello_world():  # put application's code here
    return {"message": "Have some Ziti!"}


if __name__ == '__main__':
    bind_opts['ztx'] = sys.argv[1]
    bind_opts['service'] = sys.argv[2]
    run_app()

The service is running and responding to local requests, but it is not available on the ziti network. I tried the ziti-http-server example with the same identity & ziti service and everything is working. In the ZAC I can see, that for the identity both dots are green. Running my uvicorn example both dots staying grey, so the service is not zitified. Do you have any hints for me?

Monkeypatch bind port string is not supported

At least for the flask example, the bind options port is given in the example as a string but it should be an int otherwise the address cannot be found.

@openziti.zitify(bindings={
    ('1.2.3.4', '18080'): bind_opts
})

Should be

@openziti.zitify(bindings={
    ('1.2.3.4', 18080): bind_opts
})

Or, add support for either string or numeric data types

Issue with openziti & gunicorn

I'm getting an error when trying to bind openziti to the gunicorn run function.
I don't get this error with waitress or the built in flask run functions

the example of the binding

class Server(BaseApplication):
...
    bind_opts = {
        'ztx': ziti_path('identity.json'),
        'service': 'example-service'
    }

    @openziti.zitify(bindings={
        '0.0.0.0:5000': bind_opts,
    })
    def run_zitty(self):
        # self.bind_opts['ztx'] = sys.argv[1]
        # self.bind_opts['service'] = sys.argv[2]
        self.run()

and the app is running on the same ip and port

this is the error we are getting

[2023-10-31 16:59:56 +0000] [91556] [INFO] Worker exiting (pid: 91556)
[2023-10-31 16:59:56 +0000] [91509] [ERROR] Worker (pid:91556) exited with code 255
[2023-10-31 16:59:56 +0000] [91509] [ERROR] Worker (pid:91556) exited with code 255.
[2023-10-31 16:59:56 +0000] [91559] [INFO] Booting worker with pid: 91559
[2023-10-31 16:59:56 +0000] [91559] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/opt/loenserver/env/lib64/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/opt/loenserver/env/lib64/python3.11/site-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/opt/loenserver/env/lib64/python3.11/site-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/opt/loenserver/env/lib64/python3.11/site-packages/gunicorn/workers/sync.py", line 70, in run_for_one
    self.accept(listener)
  File "/opt/loenserver/env/lib64/python3.11/site-packages/gunicorn/workers/sync.py", line 29, in accept
    client, addr = listener.accept()
                   ^^^^^^^^^^^^^^^^^
  File "/opt/loenserver/env/lib64/python3.11/site-packages/openziti/zitisock.py", line 119, in accept
    fd, peer = zitilib.accept(self.fileno())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/loenserver/env/lib64/python3.11/site-packages/openziti/zitilib.py", line 276, in accept
    check_error(clt)
  File "/opt/loenserver/env/lib64/python3.11/site-packages/openziti/zitilib.py", line 219, in check_error
    raise Exception(err, msg)
Exception: (22, 'unexpected error')

Strange Exception behavior running `ziti-urllib3` with `ziti-http-server` examples

IMPORTANT: This is being run with code on a branch update_readmes. Some renaming has occurred so if not running on this branch the example names may not match.

Overlay setup
Local Ziti Network using express install
service named python.flask
bind config at 127.0.0.1 on port 18080
intercept config at python.flask.ziti on port 80
one identity for binding python.flask
one dial identity geoff.flask for use with python examples
one dial identity geoff.browser for use on ZDE for Mac

When running ziti-http-server example with hostname 127.0.0.1 and port 18080 everything runs successfully, here is the run log

/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/bin/python /Users/geoffberl/git/NetFoundry/ziti-sdk-py/sample/ziti-http-server/ziti-http-server.py /Users/geoffberl/python.flask.json python.flask 
Server started http://127.0.0.1:18080

When running curl python.flask.ziti from terminal, terminal receives the expected response {"msg": "Help! I was zitified!"} and this shows in the run log for ziti-http-server

geoff.browser - - [12/Apr/2023 13:11:18] "GET / HTTP/1.1" 200 -

When visiting http://python.flask.ziti:80 in the browser, I receive the expected response {"msg": "Help! I was zitified!"} and this shows in the run log for ziti-http-server

geoff.browser - - [12/Apr/2023 13:13:18] "GET / HTTP/1.1" 200 -
geoff.browser - - [12/Apr/2023 13:13:18] "GET /favicon.ico HTTP/1.1" 200 -

Finally, when running the ziti-urllib3 example with

$ export ZITI_IDENTITIES="/Users/geoffberl/geoff.flask.json"
$ export ZITI_LOG=6
$ python ziti-urllib3.py python.flask.ziti

The following shows in the run log, which appears to be four successful responses. However, the python script throws an exception and not response is ever received.

geoff.flask - - [12/Apr/2023 13:17:35] "GET / HTTP/1.1" 200 -
geoff.flask - - [12/Apr/2023 13:17:35] "GET / HTTP/1.1" 200 -
geoff.flask - - [12/Apr/2023 13:17:35] "GET / HTTP/1.1" 200 -
geoff.flask - - [12/Apr/2023 13:17:35] "GET / HTTP/1.1" 200 -

ziti-urllib3 Example Output (See router error after this log, "circuit has no endpoint, payload could not be delivered")

$ python ziti-urllib3.py python.flask.ziti
(99158)[        0.000]    INFO ziti-sdk:utils.c:176 ziti_log_set_level() set log level: root=6/TRACE
(99158)[        0.000]   DEBUG ziti-sdk:zitilib.c:1055 looper() loop is starting
(99158)[        0.001]   DEBUG ziti-sdk:zitilib.c:303 load_ziti_ctx() loading identity from /Users/geoffberl/geoff.flask.json
(99158)[        0.001]    INFO ziti-sdk:utils.c:176 ziti_log_set_level() set log level: root=6/TRACE
(99158)[        0.001]   DEBUG ziti-sdk:config.c:73 load_config() trying to load config from file
(99158)[        0.001]    INFO ziti-sdk:ziti.c:427 ziti_init_async() ztx[0] Ziti C SDK version 0.31.5-147 @ccbc692(HEAD) starting at (2023-04-12T17:17:35.594)
(99158)[        0.001]    INFO ziti-sdk:ziti.c:429 ziti_init_async() ztx[0] using tlsuv[<unknown>], tls[mbed TLS 3.2.1]
(99158)[        0.001]    INFO ziti-sdk:ziti.c:430 ziti_init_async() ztx[0] Loading ziti context with controller[https://MacBook-Pro:1280]
(99158)[        0.001]    INFO ziti-sdk:ziti_ctrl.c:409 ziti_ctrl_init() ctrl[MacBook-Pro] ziti controller client initialized
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:452 ziti_init_async() ztx[0] using metrics interval: 0
(99158)[        0.001] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/version]
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:257 ziti_set_unauthenticated() ztx[0] setting api_session_state[0] to 0
(99158)[        0.001]   DEBUG ziti-sdk:ziti_ctrl.c:245 ziti_ctrl_clear_api_session() ctrl[MacBook-Pro] clearing api session token for ziti_controller
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:919 ziti_re_auth() ztx[0] re-auth executing, transitioning to unauthenticated
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:257 ziti_set_unauthenticated() ztx[0] setting api_session_state[0] to 0
(99158)[        0.001]   DEBUG ziti-sdk:ziti_ctrl.c:245 ziti_ctrl_clear_api_session() ctrl[MacBook-Pro] clearing api session token for ziti_controller
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:288 is_api_session_expired() ztx[0] is_api_session_expired[TRUE] - api_session is null
(99158)[        0.001]    INFO ziti-sdk:ziti.c:867 ziti_re_auth_with_cb() ztx[0] starting to re-auth with ctlr[https://MacBook-Pro:1280] api_session_status[0] api_session_expired[TRUE]
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:250 ziti_set_auth_started() ztx[0] setting api_session_state[0] to 1
(99158)[        0.001]   DEBUG ziti-sdk:ziti.c:323 ziti_stop_api_session_refresh() ztx[0] ziti_stop_api_session_refresh: stopping api session refresh
(99158)[        0.001] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting POST[/authenticate?method=cert]
(99158)[        0.059] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/version]
(99158)[        0.059]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/version] in 0.057 s
(99158)[        0.059]    INFO ziti-sdk:ziti.c:1526 version_cb() ztx[0] connected to controller https://MacBook-Pro:1280 version v0.27.7(bd531e470c62 2023-03-30T13:45:29Z)
(99158)[        0.195] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers POST[/authenticate?method=cert]
(99158)[        0.195]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed POST[/authenticate?method=cert] in 0.193 s
(99158)[        0.195]   DEBUG ziti-sdk:ziti_ctrl.c:258 ctrl_login_cb() ctrl[MacBook-Pro] authenticated successfully session[clgdyfjh98eyvif9kon4dvcju]
(99158)[        0.195]   DEBUG ziti-sdk:ziti.c:1442 api_session_cb() ztx[0] logged in successfully => api_session[clgdyfjh98eyvif9kon4dvcju]
(99158)[        0.195]   TRACE ziti-sdk:ziti.c:1381 ziti_set_api_session() ztx[0] API supports cached_last_activity_at
(99158)[        0.195]   DEBUG ziti-sdk:ziti.c:1392 ziti_set_api_session() ztx[0] ziti api session expires in 1800 seconds
(99158)[        0.195]    INFO ziti-sdk:ziti.c:1416 ziti_set_api_session() ztx[0] api session set, setting api_session_timer to 1740s
(99158)[        0.195]   DEBUG ziti-sdk:ziti.c:328 ziti_schedule_api_session_refresh() ztx[0] ziti_schedule_api_session_refresh: scheduling api session refresh: 1740000ms
(99158)[        0.195]   DEBUG ziti-sdk:ziti.c:282 ziti_set_fully_authenticated() ztx[0] setting api_session_state[1] to 3
(99158)[        0.195] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/current-identity]
(99158)[        0.195] VERBOSE ziti-sdk:ziti.c:1338 session_post_auth_query_cb() ztx[0] post auth query callback starting with status[OK]
(99158)[        0.195] VERBOSE ziti-sdk:ziti.c:1340 session_post_auth_query_cb() ztx[0] transitioning to fully authenticated
(99158)[        0.195]   DEBUG ziti-sdk:ziti.c:282 ziti_set_fully_authenticated() ztx[0] setting api_session_state[3] to 3
(99158)[        0.195] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/current-identity]
(99158)[        0.195] VERBOSE ziti-sdk:ziti.c:1239 ziti_services_refresh() ztx[0] forcing service refresh
(99158)[        0.195]   DEBUG ziti-sdk:ziti_ctrl.c:777 ctrl_paging_req() ctrl[MacBook-Pro] starting paging request GET[/current-identity/edge-routers]
(99158)[        0.195] VERBOSE ziti-sdk:ziti_ctrl.c:782 ctrl_paging_req() ctrl[MacBook-Pro] requesting /current-identity/edge-routers?limit=25&offset=0
(99158)[        0.195] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/current-identity/edge-routers?limit=25&offset=0]
(99158)[        0.196] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/current-api-session/service-updates]
(99158)[        0.201] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/current-identity]
(99158)[        0.201]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/current-identity] in 0.005 s
(99158)[        0.203] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/current-identity]
(99158)[        0.203]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/current-identity] in 0.007 s
(99158)[        0.208] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/current-identity/edge-routers?limit=25&offset=0]
(99158)[        0.208]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/current-identity/edge-routers?limit=25&offset=0] in 0.011 s
(99158)[        0.208]   DEBUG ziti-sdk:ziti_ctrl.c:342 ctrl_body_cb() ctrl[MacBook-Pro] received 1/1 for paging request GET[/current-identity/edge-routers]
(99158)[        0.208]   DEBUG ziti-sdk:ziti_ctrl.c:354 ctrl_body_cb() ctrl[MacBook-Pro] completed paging request GET[/current-identity/edge-routers] in 0.011 s
(99158)[        0.208]   TRACE ziti-sdk:ziti.c:1286 edge_routers_cb() ztx[0] connecting to MacBook-Pro-edge-router(tls://127.0.0.1:3022)
(99158)[        0.208]    INFO ziti-sdk:channel.c:235 new_ziti_channel() ch[0] (MacBook-Pro-edge-router@tls://127.0.0.1:3022) new channel for ztx[0] identity[geoff.flask]
(99158)[        0.208]    INFO ziti-sdk:channel.c:734 reconnect_channel() ch[0] reconnecting NOW
(99158)[        0.208]   DEBUG ziti-sdk:channel.c:705 reconnect_cb() ch[0] connecting to 127.0.0.1:3022
(99158)[        0.217] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/current-api-session/service-updates]
(99158)[        0.217]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/current-api-session/service-updates] in 0.020 s
(99158)[        0.217] VERBOSE ziti-sdk:ziti.c:1199 check_service_update() ztx[0] ztx last_update = 2023-03-31T18:37:58.344Z
(99158)[        0.217]   DEBUG ziti-sdk:ziti_ctrl.c:777 ctrl_paging_req() ctrl[MacBook-Pro] starting paging request GET[/services]
(99158)[        0.217] VERBOSE ziti-sdk:ziti_ctrl.c:782 ctrl_paging_req() ctrl[MacBook-Pro] requesting /services?limit=25&offset=0
(99158)[        0.217] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting GET[/services?limit=25&offset=0]
(99158)[        0.225] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers GET[/services?limit=25&offset=0]
(99158)[        0.225]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed GET[/services?limit=25&offset=0] in 0.008 s
(99158)[        0.225]   DEBUG ziti-sdk:ziti_ctrl.c:342 ctrl_body_cb() ctrl[MacBook-Pro] received 1/1 for paging request GET[/services]
(99158)[        0.225]   DEBUG ziti-sdk:ziti_ctrl.c:354 ctrl_body_cb() ctrl[MacBook-Pro] completed paging request GET[/services] in 0.008 s
(99158)[        0.225] VERBOSE ziti-sdk:ziti.c:1241 ziti_services_refresh() ztx[0] scheduling service refresh 60 seconds from now
(99158)[        0.225] VERBOSE ziti-sdk:ziti.c:1069 update_services() ztx[0] processing service updates
(99158)[        0.225]   DEBUG ziti-sdk:ziti.c:1146 update_services() ztx[0] sending service event 1 added, 0 removed, 0 changed
(99158)[        0.225]   DEBUG ziti-sdk:zitilib.c:1230 Ziti_resolve() host[python.flask.ziti] port[80]
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:1195 resolve_cb() resolving python.flask.ziti
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 0:python.flask.ziti:80
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:1201 resolve_cb() python.flask.ziti:80 => python.flask
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:1214 resolve_cb() assigned python.flask.ziti => 1004064
(99158)[        0.229] VERBOSE ziti-sdk:zitilib.c:508 check_socket() checking client fd[13]
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:634 do_ziti_connect() connecting fd[13] to 100.64.0.1:80
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 1:python.flask.ziti:80
(99158)[        0.229]   DEBUG ziti-sdk:zitilib.c:689 do_ziti_connect() connecting fd[13] to service[python.flask]
(99158)[        0.229] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.0/Initial] transitioning Initial => Connecting
(99158)[        0.229] VERBOSE ziti-sdk:posture.c:198 ziti_send_posture_data() ztx[0] starting to send posture data
(99158)[        0.229]    INFO ziti-sdk:posture.c:204 ziti_send_posture_data() ztx[0] first run or potential controller restart detected
(99158)[        0.229]   DEBUG ziti-sdk:posture.c:211 ziti_send_posture_data() ztx[0] posture checks must_send set to TRUE, new_session_id[TRUE], must_send_every_time[TRUE], new_controller_instance[TRUE]
(99158)[        0.229] VERBOSE ziti-sdk:posture.c:236 ziti_send_posture_data() ztx[0] checking posture queries on 1 service(s)
(99158)[        0.229] VERBOSE ziti-sdk:posture.c:535 ziti_pr_send_bulk() ztx[0] no change in posture data, not sending
(99158)[        0.229]   DEBUG ziti-sdk:connect.c:522 process_connect() conn[0.0/Connecting] requesting 'Dial' session for service[python.flask]
(99158)[        0.229] VERBOSE ziti-sdk:ziti_ctrl.c:134 start_request() ctrl[MacBook-Pro] starting POST[/sessions]
(99158)[        0.275]   DEBUG ziti-sdk:channel.c:848 on_channel_connect_internal() ch[0] connected
(99158)[        0.275]   TRACE ziti-sdk:channel.c:403 ziti_channel_send_for_reply() ch[0] => ct[0000] seq[0] len[31]
(99158)[        0.275]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=95
(99158)[        0.275]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=132]
(99158)[        0.275]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[0002] seq[-1] len[0] hdrs[112]
(99158)[        0.275]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[-1] body+hrds=0+112, in_offset=0, want=112, got=112
(99158)[        0.275]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[-1] ct[0002]
(99158)[        0.275]    INFO ziti-sdk:channel.c:632 hello_reply_cb() ch[0] connected. EdgeRouter version: v0.27.7|bd531e470c62|2023-03-30T13:45:29Z|darwin|amd64
(99158)[        0.282] VERBOSE ziti-sdk:ziti_ctrl.c:169 ctrl_resp_cb() ctrl[MacBook-Pro] received headers POST[/sessions]
(99158)[        0.282]   DEBUG ziti-sdk:ziti_ctrl.c:326 ctrl_body_cb() ctrl[MacBook-Pro] completed POST[/sessions] in 0.052 s
(99158)[        0.282]   DEBUG ziti-sdk:connect.c:484 connect_get_net_session_cb() conn[0.0/Connecting] got session[clgdyfjko8eyxif9k8rsvqp4j] for service[python.flask]
(99158)[        0.282] VERBOSE ziti-sdk:posture.c:198 ziti_send_posture_data() ztx[0] starting to send posture data
(99158)[        0.282]   DEBUG ziti-sdk:posture.c:211 ziti_send_posture_data() ztx[0] posture checks must_send set to TRUE, new_session_id[FALSE], must_send_every_time[TRUE], new_controller_instance[FALSE]
(99158)[        0.282] VERBOSE ziti-sdk:posture.c:236 ziti_send_posture_data() ztx[0] checking posture queries on 1 service(s)
(99158)[        0.282] VERBOSE ziti-sdk:posture.c:535 ziti_pr_send_bulk() ztx[0] no change in posture data, not sending
(99158)[        0.282]   DEBUG ziti-sdk:connect.c:532 process_connect() conn[0.0/Connecting] starting Dial connection for service[python.flask] with session[clgdyfjko8eyxif9k8rsvqp4j]
(99158)[        0.282]   DEBUG ziti-sdk:connect.c:415 ziti_connect() conn[0.0/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] for best latency(0 ms)
(99158)[        0.282]   DEBUG ziti-sdk:connect.c:302 on_channel_connected() conn[0.0/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] status[0]
(99158)[        0.282]   TRACE ziti-sdk:connect.c:1038 ziti_channel_start_connection() conn[0.0/Connecting] ch[0] => Edge Connect request token[ba925d66-58e1-459f-b5a7-f274fd9b8363]
(99158)[        0.282]   DEBUG ziti-sdk:channel.c:215 ziti_channel_add_receiver() ch[0] added receiver[0]
(99158)[        0.282]   TRACE ziti-sdk:channel.c:403 ziti_channel_send_for_reply() ch[0] => ct[ED6F] seq[1] len[36]
(99158)[        0.282]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=218
(99158)[        0.286]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=108]
(99158)[        0.286]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED70] seq[1] len[0] hdrs[88]
(99158)[        0.286]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[1] body+hrds=0+88, in_offset=0, want=88, got=88
(99158)[        0.286]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[1] ct[ED70]
(99158)[        0.286]   TRACE ziti-sdk:connect.c:974 connect_reply_cb() conn[0.0/Connecting] connected
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.0/Connecting] transitioning Connecting => Connected
(99158)[        0.286] VERBOSE ziti-sdk:zitilib.c:477 connect_socket() connecting client socket[13]
(99158)[        0.286] VERBOSE ziti-sdk:zitilib.c:499 connect_socket() connected client socket[13] <-> ziti_fd[17]
(99158)[        0.286]   DEBUG ziti-sdk:zitilib.c:587 on_ziti_connect() bridge connected to ziti fd[13]->ziti_fd[17]->conn[0]->service[python.flask]
(99158)[        0.286]   DEBUG ziti-sdk:conn_bridge.c:95 ziti_conn_bridge() br[0.0] connected
(99158)[        0.286]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.0/Connected] starting flusher
(99158)[        0.286]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=68
(99158)[        0.286]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.0/Connected] status 0
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.0/Connected] 0 bytes available
(99158)[        0.286]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.0/Connected] flushed 0 messages
(99158)[        0.286]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.0/Connected] stopping flusher
(99158)[        0.286]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=68]
(99158)[        0.286]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[2] len[24] hdrs[24]
(99158)[        0.286]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[2] body+hrds=24+24, in_offset=0, want=48, got=48
(99158)[        0.286]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[2] ct[ED72]
(99158)[        0.286]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.0/Connected] starting flusher
(99158)[        0.286]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.0/Connected] <= ct[ED72] edge_seq[1] body[24]
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:867 conn_inbound_data_msg() conn[0.0/Connected] processing crypto header(24 bytes)
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:870 conn_inbound_data_msg() conn[0.0/Connected] processed crypto header
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.0/Connected] 0 bytes available
(99158)[        0.286]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.0/Connected] flushed 0 messages
(99158)[        0.286]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.0/Connected] stopping flusher
(99158)[        0.286]   TRACE ziti-sdk:conn_bridge.c:309 bridge_alloc() br[0.0] alloc live
(99158)[        0.286]   TRACE ziti-sdk:connect.c:1307 ziti_write() conn[0.0/Connected] write 106 bytes
(99158)[        0.286]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.0/Connected] starting flusher
(99158)[        0.286] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.0/Connected] 0 bytes available
(99158)[        0.286]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.0/Connected] flushed 1 messages
(99158)[        0.286]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.0/Connected] stopping flusher
(99158)[        0.286]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=167
(99158)[        0.286]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.0/Connected] status 0
(99158)[        0.287]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=273]
(99158)[        0.287]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[3] len[173] hdrs[24]
(99158)[        0.287]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[3] body+hrds=173+24, in_offset=0, want=197, got=197
(99158)[        0.287]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[3] ct[ED72]
(99158)[        0.287]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.0/Connected] starting flusher
(99158)[        0.287]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[4] len[0] hdrs[36]
(99158)[        0.287]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[4] body+hrds=0+36, in_offset=0, want=36, got=36
(99158)[        0.287]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[4] ct[ED72]
(99158)[        0.287]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.0/Connected] starting flusher
(99158)[        0.287]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.0/Connected] <= ct[ED72] edge_seq[2] body[173]
(99158)[        0.287] VERBOSE ziti-sdk:connect.c:877 conn_inbound_data_msg() conn[0.0/Connected] decrypting 173 bytes
(99158)[        0.287] VERBOSE ziti-sdk:connect.c:881 conn_inbound_data_msg() conn[0.0/Connected] decrypted 156 bytes
(99158)[        0.287]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.0/Connected] <= ct[ED72] edge_seq[3] body[0]
(99158)[        0.287] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.0/Connected] 156 bytes available
(99158)[        0.287]   TRACE ziti-sdk:conn_bridge.c:264 on_ziti_data() br[0.0] received 156 bytes from ziti
(99158)[        0.287]   TRACE ziti-sdk:connect.c:825 flush_to_client() conn[0.0/Connected] client consumed 156 out of 156 bytes
(99158)[        0.287] VERBOSE ziti-sdk:conn_bridge.c:284 on_ziti_data() br[0.0] received EOF from ziti
(99158)[        0.287]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.0/Connected] flushed 0 messages
(99158)[        0.287]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.0/Connected] stopping flusher
(99158)[        0.287]   DEBUG ziti-sdk:zitilib.c:543 Ziti_close() closing ziti socket[13]
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:530 close_work() closing client fd[13]
(99158)[        0.288]    WARN ziti-sdk:conn_bridge.c:245 on_shutdown() br[0.0] shutdown failed: -57(socket is not connected)
(99158)[        0.288]   DEBUG ziti-sdk:conn_bridge.c:225 close_bridge() br[0.0] closing
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:565 on_bridge_close() closed conn for socket(13)
(99158)[        0.288]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=44
(99158)[        0.288]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.0/Connected] status 0
(99158)[        0.288] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.0/Connected] transitioning Connected => Closed
(99158)[        0.288]   DEBUG ziti-sdk:channel.c:222 ziti_channel_rem_receiver() ch[0] removed receiver[0]
(99158)[        0.288]   DEBUG ziti-sdk:connect.c:169 close_conn_internal() conn[0.0/Closed] removing
(99158)[        0.288]   TRACE ziti-sdk:connect.c:144 free_ziti_listen_opts() refuse to free NULL listen_opts
(99158)[        0.288]   TRACE ziti-sdk:connect.c:212 close_conn_internal() conn[0.0/Closed] is being free()'d
(99158)[        0.288]   DEBUG ziti-sdk:ziti.c:1591 grim_reaper() ztx[0] reaped 1 closed (out of 1 total) connections
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:1230 Ziti_resolve() host[python.flask.ziti] port[80]
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:1195 resolve_cb() resolving python.flask.ziti
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 0:python.flask.ziti:80
(99158)[        0.288]   DEBUG ziti-sdk:zitilib.c:1201 resolve_cb() python.flask.ziti:80 => python.flask
(99158)[        0.288] VERBOSE ziti-sdk:zitilib.c:508 check_socket() checking client fd[13]
(99158)[        0.289]   DEBUG ziti-sdk:zitilib.c:634 do_ziti_connect() connecting fd[13] to 100.64.0.1:80
(99158)[        0.289]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 1:python.flask.ziti:80
(99158)[        0.289]   DEBUG ziti-sdk:zitilib.c:689 do_ziti_connect() connecting fd[13] to service[python.flask]
(99158)[        0.289] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.1/Initial] transitioning Initial => Connecting
(99158)[        0.289] VERBOSE ziti-sdk:posture.c:198 ziti_send_posture_data() ztx[0] starting to send posture data
(99158)[        0.289]   DEBUG ziti-sdk:posture.c:211 ziti_send_posture_data() ztx[0] posture checks must_send set to TRUE, new_session_id[FALSE], must_send_every_time[TRUE], new_controller_instance[FALSE]
(99158)[        0.289] VERBOSE ziti-sdk:posture.c:236 ziti_send_posture_data() ztx[0] checking posture queries on 1 service(s)
(99158)[        0.289] VERBOSE ziti-sdk:posture.c:535 ziti_pr_send_bulk() ztx[0] no change in posture data, not sending
(99158)[        0.289]   DEBUG ziti-sdk:connect.c:532 process_connect() conn[0.1/Connecting] starting Dial connection for service[python.flask] with session[clgdyfjko8eyxif9k8rsvqp4j]
(99158)[        0.289]   DEBUG ziti-sdk:connect.c:415 ziti_connect() conn[0.1/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] for best latency(0 ms)
(99158)[        0.289]   DEBUG ziti-sdk:connect.c:302 on_channel_connected() conn[0.1/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] status[0]
(99158)[        0.289]   TRACE ziti-sdk:connect.c:1038 ziti_channel_start_connection() conn[0.1/Connecting] ch[0] => Edge Connect request token[ba925d66-58e1-459f-b5a7-f274fd9b8363]
(99158)[        0.289]   DEBUG ziti-sdk:channel.c:215 ziti_channel_add_receiver() ch[0] added receiver[1]
(99158)[        0.289]   TRACE ziti-sdk:channel.c:403 ziti_channel_send_for_reply() ch[0] => ct[ED6F] seq[2] len[36]
(99158)[        0.289]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=218
(99158)[        0.291]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=108]
(99158)[        0.291]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED70] seq[5] len[0] hdrs[88]
(99158)[        0.291]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[5] body+hrds=0+88, in_offset=0, want=88, got=88
(99158)[        0.291]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[5] ct[ED70]
(99158)[        0.291]   TRACE ziti-sdk:connect.c:974 connect_reply_cb() conn[0.1/Connecting] connected
(99158)[        0.291] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.1/Connecting] transitioning Connecting => Connected
(99158)[        0.291] VERBOSE ziti-sdk:zitilib.c:477 connect_socket() connecting client socket[13]
(99158)[        0.291] VERBOSE ziti-sdk:zitilib.c:499 connect_socket() connected client socket[13] <-> ziti_fd[17]
(99158)[        0.291]   DEBUG ziti-sdk:zitilib.c:587 on_ziti_connect() bridge connected to ziti fd[13]->ziti_fd[17]->conn[1]->service[python.flask]
(99158)[        0.291]   DEBUG ziti-sdk:conn_bridge.c:95 ziti_conn_bridge() br[0.1] connected
(99158)[        0.291]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.1/Connected] starting flusher
(99158)[        0.291]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=68
(99158)[        0.291]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.1/Connected] status 0
(99158)[        0.291] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.1/Connected] 0 bytes available
(99158)[        0.291]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.1/Connected] flushed 0 messages
(99158)[        0.291]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.1/Connected] stopping flusher
(99158)[        0.291]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=68]
(99158)[        0.291]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[6] len[24] hdrs[24]
(99158)[        0.291]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[6] body+hrds=24+24, in_offset=0, want=48, got=48
(99158)[        0.291]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[6] ct[ED72]
(99158)[        0.291]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.1/Connected] starting flusher
(99158)[        0.291]   TRACE ziti-sdk:conn_bridge.c:309 bridge_alloc() br[0.1] alloc live
(99158)[        0.291]   TRACE ziti-sdk:connect.c:1307 ziti_write() conn[0.1/Connected] write 106 bytes
(99158)[        0.291]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.1/Connected] starting flusher
(99158)[        0.291]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.1/Connected] <= ct[ED72] edge_seq[1] body[24]
(99158)[        0.291] VERBOSE ziti-sdk:connect.c:867 conn_inbound_data_msg() conn[0.1/Connected] processing crypto header(24 bytes)
(99158)[        0.291] VERBOSE ziti-sdk:connect.c:870 conn_inbound_data_msg() conn[0.1/Connected] processed crypto header
(99158)[        0.291] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.1/Connected] 0 bytes available
(99158)[        0.291]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.1/Connected] flushed 1 messages
(99158)[        0.291]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.1/Connected] stopping flusher
(99158)[        0.291]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=167
(99158)[        0.291]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.1/Connected] status 0
(99158)[        0.292]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=273]
(99158)[        0.292]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[7] len[173] hdrs[24]
(99158)[        0.292]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[7] body+hrds=173+24, in_offset=0, want=197, got=197
(99158)[        0.292]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[7] ct[ED72]
(99158)[        0.292]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.1/Connected] starting flusher
(99158)[        0.292]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[8] len[0] hdrs[36]
(99158)[        0.292]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[8] body+hrds=0+36, in_offset=0, want=36, got=36
(99158)[        0.292]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[8] ct[ED72]
(99158)[        0.292]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.1/Connected] starting flusher
(99158)[        0.292]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.1/Connected] <= ct[ED72] edge_seq[2] body[173]
(99158)[        0.292] VERBOSE ziti-sdk:connect.c:877 conn_inbound_data_msg() conn[0.1/Connected] decrypting 173 bytes
(99158)[        0.292] VERBOSE ziti-sdk:connect.c:881 conn_inbound_data_msg() conn[0.1/Connected] decrypted 156 bytes
(99158)[        0.292]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.1/Connected] <= ct[ED72] edge_seq[3] body[0]
(99158)[        0.292] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.1/Connected] 156 bytes available
(99158)[        0.292]   TRACE ziti-sdk:conn_bridge.c:264 on_ziti_data() br[0.1] received 156 bytes from ziti
(99158)[        0.292]   TRACE ziti-sdk:connect.c:825 flush_to_client() conn[0.1/Connected] client consumed 156 out of 156 bytes
(99158)[        0.292] VERBOSE ziti-sdk:conn_bridge.c:284 on_ziti_data() br[0.1] received EOF from ziti
(99158)[        0.292]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.1/Connected] flushed 0 messages
(99158)[        0.292]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.1/Connected] stopping flusher
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:543 Ziti_close() closing ziti socket[13]
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:530 close_work() closing client fd[13]
(99158)[        0.292]    WARN ziti-sdk:conn_bridge.c:245 on_shutdown() br[0.1] shutdown failed: -57(socket is not connected)
(99158)[        0.292]   DEBUG ziti-sdk:conn_bridge.c:225 close_bridge() br[0.1] closing
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:565 on_bridge_close() closed conn for socket(13)
(99158)[        0.292]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=44
(99158)[        0.292]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.1/Connected] status 0
(99158)[        0.292] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.1/Connected] transitioning Connected => Closed
(99158)[        0.292]   DEBUG ziti-sdk:channel.c:222 ziti_channel_rem_receiver() ch[0] removed receiver[1]
(99158)[        0.292]   DEBUG ziti-sdk:connect.c:169 close_conn_internal() conn[0.1/Closed] removing
(99158)[        0.292]   TRACE ziti-sdk:connect.c:144 free_ziti_listen_opts() refuse to free NULL listen_opts
(99158)[        0.292]   TRACE ziti-sdk:connect.c:212 close_conn_internal() conn[0.1/Closed] is being free()'d
(99158)[        0.292]   DEBUG ziti-sdk:ziti.c:1591 grim_reaper() ztx[0] reaped 1 closed (out of 1 total) connections
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:1230 Ziti_resolve() host[python.flask.ziti] port[80]
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:1195 resolve_cb() resolving python.flask.ziti
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 0:python.flask.ziti:80
(99158)[        0.292]   DEBUG ziti-sdk:zitilib.c:1201 resolve_cb() python.flask.ziti:80 => python.flask
(99158)[        0.293] VERBOSE ziti-sdk:zitilib.c:508 check_socket() checking client fd[13]
(99158)[        0.293]   DEBUG ziti-sdk:zitilib.c:634 do_ziti_connect() connecting fd[13] to 100.64.0.1:80
(99158)[        0.293]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 1:python.flask.ziti:80
(99158)[        0.293]   DEBUG ziti-sdk:zitilib.c:689 do_ziti_connect() connecting fd[13] to service[python.flask]
(99158)[        0.293] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.2/Initial] transitioning Initial => Connecting
(99158)[        0.293] VERBOSE ziti-sdk:posture.c:198 ziti_send_posture_data() ztx[0] starting to send posture data
(99158)[        0.293]   DEBUG ziti-sdk:posture.c:211 ziti_send_posture_data() ztx[0] posture checks must_send set to TRUE, new_session_id[FALSE], must_send_every_time[TRUE], new_controller_instance[FALSE]
(99158)[        0.293] VERBOSE ziti-sdk:posture.c:236 ziti_send_posture_data() ztx[0] checking posture queries on 1 service(s)
(99158)[        0.293] VERBOSE ziti-sdk:posture.c:535 ziti_pr_send_bulk() ztx[0] no change in posture data, not sending
(99158)[        0.293]   DEBUG ziti-sdk:connect.c:532 process_connect() conn[0.2/Connecting] starting Dial connection for service[python.flask] with session[clgdyfjko8eyxif9k8rsvqp4j]
(99158)[        0.293]   DEBUG ziti-sdk:connect.c:415 ziti_connect() conn[0.2/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] for best latency(0 ms)
(99158)[        0.293]   DEBUG ziti-sdk:connect.c:302 on_channel_connected() conn[0.2/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] status[0]
(99158)[        0.293]   TRACE ziti-sdk:connect.c:1038 ziti_channel_start_connection() conn[0.2/Connecting] ch[0] => Edge Connect request token[ba925d66-58e1-459f-b5a7-f274fd9b8363]
(99158)[        0.293]   DEBUG ziti-sdk:channel.c:215 ziti_channel_add_receiver() ch[0] added receiver[2]
(99158)[        0.293]   TRACE ziti-sdk:channel.c:403 ziti_channel_send_for_reply() ch[0] => ct[ED6F] seq[3] len[36]
(99158)[        0.293]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=218
(99158)[        0.297]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=108]
(99158)[        0.297]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED70] seq[9] len[0] hdrs[88]
(99158)[        0.297]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[9] body+hrds=0+88, in_offset=0, want=88, got=88
(99158)[        0.297]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[9] ct[ED70]
(99158)[        0.297]   TRACE ziti-sdk:connect.c:974 connect_reply_cb() conn[0.2/Connecting] connected
(99158)[        0.297] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.2/Connecting] transitioning Connecting => Connected
(99158)[        0.297] VERBOSE ziti-sdk:zitilib.c:477 connect_socket() connecting client socket[13]
(99158)[        0.297] VERBOSE ziti-sdk:zitilib.c:499 connect_socket() connected client socket[13] <-> ziti_fd[17]
(99158)[        0.297]   DEBUG ziti-sdk:zitilib.c:587 on_ziti_connect() bridge connected to ziti fd[13]->ziti_fd[17]->conn[2]->service[python.flask]
(99158)[        0.297]   DEBUG ziti-sdk:conn_bridge.c:95 ziti_conn_bridge() br[0.2] connected
(99158)[        0.297]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.2/Connected] starting flusher
(99158)[        0.297]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=68
(99158)[        0.297]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.2/Connected] status 0
(99158)[        0.298] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.2/Connected] 0 bytes available
(99158)[        0.298]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.2/Connected] flushed 0 messages
(99158)[        0.298]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.2/Connected] stopping flusher
(99158)[        0.298]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=68]
(99158)[        0.298]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[10] len[24] hdrs[24]
(99158)[        0.298]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[10] body+hrds=24+24, in_offset=0, want=48, got=48
(99158)[        0.298]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[10] ct[ED72]
(99158)[        0.298]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.2/Connected] starting flusher
(99158)[        0.298]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.2/Connected] <= ct[ED72] edge_seq[1] body[24]
(99158)[        0.298] VERBOSE ziti-sdk:connect.c:867 conn_inbound_data_msg() conn[0.2/Connected] processing crypto header(24 bytes)
(99158)[        0.298] VERBOSE ziti-sdk:connect.c:870 conn_inbound_data_msg() conn[0.2/Connected] processed crypto header
(99158)[        0.298] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.2/Connected] 0 bytes available
(99158)[        0.298]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.2/Connected] flushed 0 messages
(99158)[        0.298]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.2/Connected] stopping flusher
(99158)[        0.298]   TRACE ziti-sdk:conn_bridge.c:309 bridge_alloc() br[0.2] alloc live
(99158)[        0.298]   TRACE ziti-sdk:connect.c:1307 ziti_write() conn[0.2/Connected] write 106 bytes
(99158)[        0.298]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.2/Connected] starting flusher
(99158)[        0.298] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.2/Connected] 0 bytes available
(99158)[        0.298]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.2/Connected] flushed 1 messages
(99158)[        0.298]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.2/Connected] stopping flusher
(99158)[        0.298]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=167
(99158)[        0.298]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.2/Connected] status 0
(99158)[        0.299]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=273]
(99158)[        0.299]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[11] len[173] hdrs[24]
(99158)[        0.299]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[11] body+hrds=173+24, in_offset=0, want=197, got=197
(99158)[        0.299]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[11] ct[ED72]
(99158)[        0.299]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.2/Connected] starting flusher
(99158)[        0.299]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[12] len[0] hdrs[36]
(99158)[        0.299]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[12] body+hrds=0+36, in_offset=0, want=36, got=36
(99158)[        0.299]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[12] ct[ED72]
(99158)[        0.299]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.2/Connected] starting flusher
(99158)[        0.299]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.2/Connected] <= ct[ED72] edge_seq[2] body[173]
(99158)[        0.299] VERBOSE ziti-sdk:connect.c:877 conn_inbound_data_msg() conn[0.2/Connected] decrypting 173 bytes
(99158)[        0.299] VERBOSE ziti-sdk:connect.c:881 conn_inbound_data_msg() conn[0.2/Connected] decrypted 156 bytes
(99158)[        0.299]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.2/Connected] <= ct[ED72] edge_seq[3] body[0]
(99158)[        0.299] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.2/Connected] 156 bytes available
(99158)[        0.299]   TRACE ziti-sdk:conn_bridge.c:264 on_ziti_data() br[0.2] received 156 bytes from ziti
(99158)[        0.299]   TRACE ziti-sdk:connect.c:825 flush_to_client() conn[0.2/Connected] client consumed 156 out of 156 bytes
(99158)[        0.299] VERBOSE ziti-sdk:conn_bridge.c:284 on_ziti_data() br[0.2] received EOF from ziti
(99158)[        0.299]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.2/Connected] flushed 0 messages
(99158)[        0.299]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.2/Connected] stopping flusher
(99158)[        0.299]   DEBUG ziti-sdk:zitilib.c:543 Ziti_close() closing ziti socket[13]
(99158)[        0.299]   DEBUG ziti-sdk:zitilib.c:530 close_work() closing client fd[13]
(99158)[        0.299]    WARN ziti-sdk:conn_bridge.c:245 on_shutdown() br[0.2] shutdown failed: -57(socket is not connected)
(99158)[        0.299]   DEBUG ziti-sdk:conn_bridge.c:225 close_bridge() br[0.2] closing
(99158)[        0.299]   DEBUG ziti-sdk:zitilib.c:565 on_bridge_close() closed conn for socket(13)
(99158)[        0.299]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=44
(99158)[        0.299]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.2/Connected] status 0
(99158)[        0.299] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.2/Connected] transitioning Connected => Closed
(99158)[        0.299]   DEBUG ziti-sdk:channel.c:222 ziti_channel_rem_receiver() ch[0] removed receiver[2]
(99158)[        0.299]   DEBUG ziti-sdk:connect.c:169 close_conn_internal() conn[0.2/Closed] removing
(99158)[        0.299]   TRACE ziti-sdk:connect.c:144 free_ziti_listen_opts() refuse to free NULL listen_opts
(99158)[        0.299]   TRACE ziti-sdk:connect.c:212 close_conn_internal() conn[0.2/Closed] is being free()'d
(99158)[        0.299]   DEBUG ziti-sdk:ziti.c:1591 grim_reaper() ztx[0] reaped 1 closed (out of 1 total) connections
(99158)[        0.299]   DEBUG ziti-sdk:zitilib.c:1230 Ziti_resolve() host[python.flask.ziti] port[80]
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:1195 resolve_cb() resolving python.flask.ziti
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 0:python.flask.ziti:80
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:1201 resolve_cb() python.flask.ziti:80 => python.flask
(99158)[        0.300] VERBOSE ziti-sdk:zitilib.c:508 check_socket() checking client fd[13]
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:634 do_ziti_connect() connecting fd[13] to 100.64.0.1:80
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:599 find_service() looking up 1:python.flask.ziti:80
(99158)[        0.300]   DEBUG ziti-sdk:zitilib.c:689 do_ziti_connect() connecting fd[13] to service[python.flask]
(99158)[        0.300] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.3/Initial] transitioning Initial => Connecting
(99158)[        0.300] VERBOSE ziti-sdk:posture.c:198 ziti_send_posture_data() ztx[0] starting to send posture data
(99158)[        0.300]   DEBUG ziti-sdk:posture.c:211 ziti_send_posture_data() ztx[0] posture checks must_send set to TRUE, new_session_id[FALSE], must_send_every_time[TRUE], new_controller_instance[FALSE]
(99158)[        0.300] VERBOSE ziti-sdk:posture.c:236 ziti_send_posture_data() ztx[0] checking posture queries on 1 service(s)
(99158)[        0.300] VERBOSE ziti-sdk:posture.c:535 ziti_pr_send_bulk() ztx[0] no change in posture data, not sending
(99158)[        0.300]   DEBUG ziti-sdk:connect.c:532 process_connect() conn[0.3/Connecting] starting Dial connection for service[python.flask] with session[clgdyfjko8eyxif9k8rsvqp4j]
(99158)[        0.300]   DEBUG ziti-sdk:connect.c:415 ziti_connect() conn[0.3/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] for best latency(0 ms)
(99158)[        0.300]   DEBUG ziti-sdk:connect.c:302 on_channel_connected() conn[0.3/Connecting] selected ch[MacBook-Pro-edge-router@tls://127.0.0.1:3022] status[0]
(99158)[        0.300]   TRACE ziti-sdk:connect.c:1038 ziti_channel_start_connection() conn[0.3/Connecting] ch[0] => Edge Connect request token[ba925d66-58e1-459f-b5a7-f274fd9b8363]
(99158)[        0.300]   DEBUG ziti-sdk:channel.c:215 ziti_channel_add_receiver() ch[0] added receiver[3]
(99158)[        0.300]   TRACE ziti-sdk:channel.c:403 ziti_channel_send_for_reply() ch[0] => ct[ED6F] seq[4] len[36]
(99158)[        0.300]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=218
(99158)[        0.302]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=108]
(99158)[        0.302]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED70] seq[13] len[0] hdrs[88]
(99158)[        0.302]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[13] body+hrds=0+88, in_offset=0, want=88, got=88
(99158)[        0.302]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[13] ct[ED70]
(99158)[        0.302]   TRACE ziti-sdk:connect.c:974 connect_reply_cb() conn[0.3/Connecting] connected
(99158)[        0.302] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.3/Connecting] transitioning Connecting => Connected
(99158)[        0.302] VERBOSE ziti-sdk:zitilib.c:477 connect_socket() connecting client socket[13]
(99158)[        0.302] VERBOSE ziti-sdk:zitilib.c:499 connect_socket() connected client socket[13] <-> ziti_fd[17]
(99158)[        0.302]   DEBUG ziti-sdk:zitilib.c:587 on_ziti_connect() bridge connected to ziti fd[13]->ziti_fd[17]->conn[3]->service[python.flask]
(99158)[        0.302]   DEBUG ziti-sdk:conn_bridge.c:95 ziti_conn_bridge() br[0.3] connected
(99158)[        0.302]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.3/Connected] starting flusher
(99158)[        0.302]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=68
(99158)[        0.302]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.3/Connected] status 0
(99158)[        0.302] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.3/Connected] 0 bytes available
(99158)[        0.302]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.3/Connected] flushed 0 messages
(99158)[        0.302]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.3/Connected] stopping flusher
(99158)[        0.302]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=68]
(99158)[        0.302]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[14] len[24] hdrs[24]
(99158)[        0.302]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[14] body+hrds=24+24, in_offset=0, want=48, got=48
(99158)[        0.302]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[14] ct[ED72]
(99158)[        0.302]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.3/Connected] starting flusher
(99158)[        0.303]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.3/Connected] <= ct[ED72] edge_seq[1] body[24]
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:867 conn_inbound_data_msg() conn[0.3/Connected] processing crypto header(24 bytes)
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:870 conn_inbound_data_msg() conn[0.3/Connected] processed crypto header
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.3/Connected] 0 bytes available
(99158)[        0.303]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.3/Connected] flushed 0 messages
(99158)[        0.303]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.3/Connected] stopping flusher
(99158)[        0.303]   TRACE ziti-sdk:conn_bridge.c:309 bridge_alloc() br[0.3] alloc live
(99158)[        0.303]   TRACE ziti-sdk:connect.c:1307 ziti_write() conn[0.3/Connected] write 106 bytes
(99158)[        0.303]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.3/Connected] starting flusher
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.3/Connected] 0 bytes available
(99158)[        0.303]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.3/Connected] flushed 1 messages
(99158)[        0.303]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.3/Connected] stopping flusher
(99158)[        0.303]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=167
(99158)[        0.303]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.3/Connected] status 0
(99158)[        0.303]   TRACE ziti-sdk:channel.c:836 on_channel_data() ch[0] on_data [len=273]
(99158)[        0.303]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[15] len[173] hdrs[24]
(99158)[        0.303]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[15] body+hrds=173+24, in_offset=0, want=197, got=197
(99158)[        0.303]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[15] ct[ED72]
(99158)[        0.303]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.3/Connected] starting flusher
(99158)[        0.303]   TRACE ziti-sdk:channel.c:523 process_inbound() ch[0] <= ct[ED72] seq[16] len[0] hdrs[36]
(99158)[        0.303]   TRACE ziti-sdk:channel.c:533 process_inbound() ch[0] completing msg seq[16] body+hrds=0+36, in_offset=0, want=36, got=36
(99158)[        0.303]   TRACE ziti-sdk:channel.c:544 process_inbound() ch[0] message is complete seq[16] ct[ED72]
(99158)[        0.303]   TRACE ziti-sdk:connect.c:776 flush_connection() conn[0.3/Connected] starting flusher
(99158)[        0.303]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.3/Connected] <= ct[ED72] edge_seq[2] body[173]
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:877 conn_inbound_data_msg() conn[0.3/Connected] decrypting 173 bytes
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:881 conn_inbound_data_msg() conn[0.3/Connected] decrypted 156 bytes
(99158)[        0.303]   TRACE ziti-sdk:connect.c:1449 process_edge_message() conn[0.3/Connected] <= ct[ED72] edge_seq[3] body[0]
(99158)[        0.303] VERBOSE ziti-sdk:connect.c:819 flush_to_client() conn[0.3/Connected] 156 bytes available
(99158)[        0.303]   TRACE ziti-sdk:conn_bridge.c:264 on_ziti_data() br[0.3] received 156 bytes from ziti
(99158)[        0.303]   TRACE ziti-sdk:connect.c:825 flush_to_client() conn[0.3/Connected] client consumed 156 out of 156 bytes
(99158)[        0.303] VERBOSE ziti-sdk:conn_bridge.c:284 on_ziti_data() br[0.3] received EOF from ziti
(99158)[        0.303]   TRACE ziti-sdk:connect.c:806 flush_to_service() conn[0.3/Connected] flushed 0 messages
(99158)[        0.303]   TRACE ziti-sdk:connect.c:769 on_flush() conn[0.3/Connected] stopping flusher
(99158)[        0.303]   DEBUG ziti-sdk:zitilib.c:543 Ziti_close() closing ziti socket[13]
(99158)[        0.304]   DEBUG ziti-sdk:zitilib.c:530 close_work() closing client fd[13]
(99158)[        0.304]    WARN ziti-sdk:conn_bridge.c:245 on_shutdown() br[0.3] shutdown failed: -57(socket is not connected)
(99158)[        0.304]   DEBUG ziti-sdk:conn_bridge.c:225 close_bridge() br[0.3] closing
(99158)[        0.304]   DEBUG ziti-sdk:zitilib.c:565 on_bridge_close() closed conn for socket(13)
(99158)[        0.304]   TRACE ziti-sdk:channel.c:333 on_channel_send() ch[0] write delay = 0.000d q=1 qs=44
(99158)[        0.304]   TRACE ziti-sdk:connect.c:227 on_write_completed() conn[0.3/Connected] status 0
(99158)[        0.304] VERBOSE ziti-sdk:connect.c:101 conn_set_state() conn[0.3/Connected] transitioning Connected => Closed
(99158)[        0.304]   DEBUG ziti-sdk:channel.c:222 ziti_channel_rem_receiver() ch[0] removed receiver[3]
(99158)[        0.304]   DEBUG ziti-sdk:connect.c:169 close_conn_internal() conn[0.3/Closed] removing
(99158)[        0.304]   TRACE ziti-sdk:connect.c:144 free_ziti_listen_opts() refuse to free NULL listen_opts
(99158)[        0.304]   TRACE ziti-sdk:connect.c:212 close_conn_internal() conn[0.3/Closed] is being free()'d
(99158)[        0.304]   DEBUG ziti-sdk:ziti.c:1591 grim_reaper() ztx[0] reaped 1 closed (out of 1 total) connections
Traceback (most recent call last):
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 444, in _error_catcher
    yield
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 567, in read
    data = self._fp_read(amt) if not fp_closed else b""
           ^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 533, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
                                                      ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 478, in read
    s = self.fp.read()
        ^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 723, in urlopen
    response = self.ResponseCls.from_httplib(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 653, in from_httplib
    resp = ResponseCls(
           ^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 266, in __init__
    self._body = self.read(decode_content=decode_content)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 566, in read
    with self._error_catcher():
  File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/response.py", line 461, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: OSError(9, 'Bad file descriptor')", OSError(9, 'Bad file descriptor'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/sample/ziti-urllib3/ziti-urllib3.py", line 22, in <module>
    r = http.request('GET', sys.argv[1])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/request.py", line 74, in request
    return self.request_encode_url(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/request.py", line 96, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/Users/geoffberl/git/NetFoundry/ziti-sdk-py/venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='python.flask.ziti', port=80): Max retries exceeded with url: / (Caused by ProtocolError("Connection broken: OSError(9, 'Bad file descriptor')", OSError(9, 'Bad file descriptor')))

And, the Router log reports this error each time the ziti-urllib3 example is run

[386273.924]   ERROR fabric/router/handler_xgress.(*receiveHandler).HandleXgressReceive [{c/yEbF9kaJp|@/rzO0}<Terminator>]: {origin=[Terminator] uuid=[invalid-uuid-size-of-0-bytes] circuitId=[yEbF9kaJp] seq=[3] error=[cannot forward payload, no destination for circuit=yEbF9kaJp src=rzO0 dst=rwPK]} unable to forward payload

enroll command gets segfault

This failed enrollment produces an empty identity config file

 ❯ python -m openziti enroll --jwt=/tmp/pyclient1.jwt --identity=/opt/openziti/etc/identities/zeds-kentest1-pyclient1.json
[1]    1671904 segmentation fault (core dumped)  python -m openziti enroll --jwt=/tmp/pyclient1.jwt 

 ❯ ll /opt/openziti/etc/identities/zeds-kentest1-pyclient1.json 
-rw-rw-r-- 1 kbingham kbingham 0 Jun 15 12:55 /opt/openziti/etc/identities/zeds-kentest1-pyclient1.json

I have the Py SDK module installed as "editable" and have separately installed libziti.so with python tools/get_zitilib.py.

 ❯ valgrind -v python -m openziti enroll --jwt=/tmp/pyclient1.jwt --identity=/opt/openziti/etc/identities/zeds-kentest1-pyclient1.json ==1683157== Memcheck, a memory error detector
==1683157== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1683157== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h for copyright info
==1683157== Command: /home/kbingham/.pyenv/shims/python -m openziti enroll --jwt=/tmp/pyclient1.jwt --identity=/opt/openziti/etc/identities/zeds-kentest1-pyclient1.json
==1683157== 
--1683157-- Valgrind options:
--1683157--    -v
--1683157-- Contents of /proc/version:
--1683157--   Linux version 5.17.5-76051705-generic ([email protected]) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #202204271406~1653440576~22.04~6277a18 SMP PREEMPT Wed May 25 01
--1683157-- 
--1683157-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--1683157-- Page sizes: currently 4096, max supported 4096
--1683157-- Valgrind library directory: /usr/libexec/valgrind
--1683157-- Reading syms from /usr/bin/env
--1683157--    object doesn't have a symbol table
--1683157-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
--1683157--   Considering /usr/lib/debug/.build-id/aa/1b0b998999c397062e1016f0c95dc0e8820117.debug ..
--1683157--   .. build-id is valid
--1683157-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux
--1683157--    object doesn't have a symbol table
--1683157--    object doesn't have a dynamic symbol table
--1683157-- Scheduler: using generic scheduler lock implementation.
--1683157-- Reading suppressions file: /usr/libexec/valgrind/default.supp
==1683157== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-1683157-by-kbingham-on-???
==1683157== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-1683157-by-kbingham-on-???
==1683157== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-1683157-by-kbingham-on-???
==1683157== 
==1683157== TO CONTROL THIS PROCESS USING vgdb (which you probably
==1683157== don't want to do, unless you know exactly what you're doing,
==1683157== or are doing some strange experiment):
==1683157==   /usr/bin/vgdb --pid=1683157 ...command...
==1683157== 
==1683157== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==1683157==   /path/to/gdb /home/kbingham/.pyenv/shims/python
==1683157== and then give GDB the following command
==1683157==   target remote | /usr/bin/vgdb --pid=1683157
==1683157== --pid is optional if only one valgrind process is running
==1683157== 
--1683157-- REDIR: 0x402aa60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bcec2 (???)
--1683157-- REDIR: 0x402a830 (ld-linux-x86-64.so.2:index) redirected to 0x580bcedc (???)
--1683157-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so
--1683157--    object doesn't have a symbol table
--1683157-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
--1683157--    object doesn't have a symbol table
==1683157== WARNING: new redirection conflicts with existing -- ignoring it
--1683157--     old: 0x0402aa60 (strlen              ) R-> (0000.0) 0x580bcec2 ???
--1683157--     new: 0x0402aa60 (strlen              ) R-> (2007.0) 0x0484ee30 strlen
--1683157-- REDIR: 0x4027240 (ld-linux-x86-64.so.2:strcmp) redirected to 0x484fcd0 (strcmp)
--1683157-- REDIR: 0x402afc0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4853840 (mempcpy)
--1683157-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6
--1683157--   Considering /usr/lib/debug/.build-id/89/c3cb85f9e55046776471fed05ec441581d1969.debug ..
--1683157--   .. build-id is valid
==1683157== WARNING: new redirection conflicts with existing -- ignoring it
--1683157--     old: 0x04923ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--1683157--     new: 0x04923ce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==1683157== WARNING: new redirection conflicts with existing -- ignoring it
--1683157--     old: 0x04923ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--1683157--     new: 0x04923ce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
==1683157== WARNING: new redirection conflicts with existing -- ignoring it
--1683157--     old: 0x04923ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--1683157--     new: 0x04923ce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==1683157== WARNING: new redirection conflicts with existing -- ignoring it
--1683157--     old: 0x04923ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--1683157--     new: 0x04923ce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
--1683157-- REDIR: 0x49267a0 (libc.so.6:strnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926a60 (libc.so.6:strpbrk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926360 (libc.so.6:strcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4944d50 (libc.so.6:wcsnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927750 (libc.so.6:memset) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49435c0 (libc.so.6:wcslen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927c90 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49433f0 (libc.so.6:wcschr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49262e0 (libc.so.6:index) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49269e0 (libc.so.6:rindex) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927620 (libc.so.6:memmove) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
==1683157== Preferring higher priority redirection:
--1683157--     old: 0x04a1e940 (__memcpy_avx_unalign) R-> (2018.0) 0x04850f90 __memcpy_avx_unaligned_erms
--1683157--     new: 0x04a1e940 (__memcpy_avx_unalign) R-> (2018.1) 0x04852880 memmove
--1683157-- REDIR: 0x4943470 (libc.so.6:wcscmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927a60 (libc.so.6:stpncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4943a30 (libc.so.6:wmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49268b0 (libc.so.6:strncmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927af0 (libc.so.6:strcasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49264a0 (libc.so.6:strcspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49434f0 (libc.so.6:wcscpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926250 (libc.so.6:strcat) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927be0 (libc.so.6:strncasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927500 (libc.so.6:bcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x492f5f0 (libc.so.6:memrchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4929090 (libc.so.6:strchrnul) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926410 (libc.so.6:strcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927b90 (libc.so.6:strcasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926720 (libc.so.6:strlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926950 (libc.so.6:strncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49279d0 (libc.so.6:stpcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927470 (libc.so.6:memchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4926b80 (libc.so.6:strspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927850 (libc.so.6:mempcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4927b40 (libc.so.6:strncasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4929000 (libc.so.6:rawmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x49b2430 (libc.so.6:__memcpy_chk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--1683157-- REDIR: 0x4a1b790 (libc.so.6:__strrchr_avx2) redirected to 0x484e810 (rindex)
--1683157-- REDIR: 0x4a16f00 (libc.so.6:__strncmp_avx2) redirected to 0x484f3e0 (strncmp)
--1683157-- REDIR: 0x4a16ac0 (libc.so.6:__strcmp_avx2) redirected to 0x484fbd0 (strcmp)
--1683157-- REDIR: 0x4a1b960 (libc.so.6:__strlen_avx2) redirected to 0x484ed10 (strlen)
--1683157-- REDIR: 0x4a1b300 (libc.so.6:__strchr_avx2) redirected to 0x484e9f0 (index)
--1683157-- REDIR: 0x4a17440 (libc.so.6:__memchr_avx2) redirected to 0x484fd50 (memchr)
--1683157-- REDIR: 0x4a1b580 (libc.so.6:__strchrnul_avx2) redirected to 0x4853330 (strchrnul)
--1683157-- REDIR: 0x4923120 (libc.so.6:malloc) redirected to 0x4848820 (malloc)
--1683157-- REDIR: 0x4a1e900 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4853440 (mempcpy)
--1683157-- REDIR: 0x4a1e940 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4852880 (memmove)
--1683157-- REDIR: 0x4923460 (libc.so.6:free) redirected to 0x484b210 (free)
--1683157-- REDIR: 0x49245a0 (libc.so.6:calloc) redirected to 0x484d9d0 (calloc)
--1683157-- REDIR: 0x4a1bae0 (libc.so.6:__strnlen_avx2) redirected to 0x484ecb0 (strnlen)

My libc and OS versions

❯ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

❯ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Incorrect Number of Arguments Using PG8000 with OpenZiti.

When using the python-sdk for connecting to a Database (in this case PGSQL), that's exposed as a service in the OpenZiti Overlay.
Pure Python libraries such as PG8000, complanins with an exception:

2023-09-11 07:31:27,891 - Error connecting to the database Traceback (most recent call last): File "/app/server/api-server.py", line 101, in get_db_connection conn = pg8000.connect( File "/usr/local/lib/python3.9/site-packages/pg8000/__init__.py", line 111, in connect return Connection( File "/usr/local/lib/python3.9/site-packages/pg8000/legacy.py", line 443, in __init__ super().__init__(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/pg8000/core.py", line 312, in __init__ self.channel_binding, self._usock = _make_socket( File "/usr/local/lib/python3.9/site-packages/pg8000/core.py", line 199, in _make_socket sock = socket.create_connection((host, port), timeout, source_address) TypeError: create_ziti_connection() takes 1 positional argument but 3 were given 2023-09-11 07:31:27,892 - General error: create_ziti_connection() takes 1 positional argument but 3 were given

Tested using openziti>=0.7.1.

Cannot reload the same identity file in case of error

Adding exception handling around the openziti.load method to catch a load failure with the intention of correcting the error and attempting to load again does not work and just hangs in the second call to load.
Sample code:

try:
  openziti.load('myIdentity.json')
except:
  # Fix the error with the file and try again
  openziti.load('myIdentity.json') # Hangs here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.