Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: vMix reconnect handling does not work on 3.0.x #532

Closed
Jocke4f opened this issue Jan 4, 2023 · 1 comment
Closed

[Bug]: vMix reconnect handling does not work on 3.0.x #532

Jocke4f opened this issue Jan 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Jocke4f
Copy link
Collaborator

Jocke4f commented Jan 4, 2023

What happened?

If vMix is running on a host in the network then TallyArbiter manages to connect when TallyArbiter is started. If vMix is not running will TallyArbiter only try to connect once, no reconnects will be triggered.

It is also not possible to manually initiate a vMix reconnect from the UI. The only way is to restart TallyArbiter when it is possible to connect to vMix.

It looks like the timeout for a new connection is not triggered as it should. The behaviour is the same both if the vMix service is not running (ECONNREFUSED) or if the vMix host is not reachable (ETIMEDOUT).

However if the vMix source is replaced with an OBS source does the connection handling work as expected. Reconnects are done when the OBS host is not reachable.

The failing vMix reconnect behaviour is the same on 3.0.x. It works as expected on 2.0.16. I have tested it on both Windows and MacOS.

Version

3.0.4

Distribution

CLI

OS

Windows

What browsers are you seeing the problem on?

Chrome

If applicable, What Listener Clients are You Using?

No response

TallyArbiter configuration

{
  "security": {
    "jwt_private_key": "sraqdXs4SgRhDh8In15sTtGu6P6BKOA33voNMiHVsiVSIyxo9KiAd7LupeoVD7OtCXeELxUgOweYRbUpG6or1gB13yZRizJqeVDBp7wt32FayXnG7y0/SA7hVFzEFhd0eciKVR0uc/FbAP/Iw4V0WLKEeTFzG27k6IEPwxwMRT8/i5XHT5SjgCj8OF4wCE5S1Io2tOqTRSmlXMUM5oWVeGx1ri8qWcAXPT1E5xV/aQhIMRXDeNOn9Yy3bjiQrTRNKDrtl4sniMgOTWfWf2msMEtHL4nFcZVjRo2yUUrXqJokirW+WyYTXX2sdTxrPURdMp/EkSFNf1ADB/HBqCoo4g=="
  },
  "users": [
    {
      "username": "admin",
      "password": "$2b$10$Ycg60wqkVDsWBvKyJVli.OXTVe7em9MMlm63391HA0/45sTlzV6ji",
      "roles": "admin"
    },
    {
      "username": "producer",
      "password": "$2b$10$C/CSS6IBa1stJFZYmE2KN.NI6Ffn31Qa9olbEKbZMOOzSS7EvKy9i",
      "roles": "producer"
    }
  ],
  "cloud_destinations": [],
  "cloud_keys": [],
  "device_actions": [],
  "device_sources": [],
  "devices": [
    {
      "name": "Camera 1",
      "description": "Sony PXW-Z190",
      "enabled": true,
      "id": "b97476a0"
    },
    {
      "name": "Projektor",
      "description": "iMac",
      "enabled": true,
      "id": "8964abbb"
    }
  ],
  "sources": [
    {
      "data": {
        "ip": "192.168.1.89"
      },
      "name": "vMix-TEST",
      "sourceTypeId": "58b6af42",
      "reconnect": true,
      "enabled": false,
      "id": "e1067d16",
      "connected": false,
      "reconnect_interval": 10000,
      "max_reconnects": 7
    },
    {
      "data": {
        "ip": "127.0.0.1",
        "port": 4444,
        "password": "password"
      },
      "name": "OBS-TEST",
      "sourceTypeId": "4eb73542",
      "reconnect": true,
      "enabled": true,
      "id": "86d335ef",
      "connected": false,
      "reconnect_interval": 15000,
      "max_reconnects": 8
    }
  ],
  "tsl_clients": [],
  "tsl_clients_1secupdate": false,
  "bus_options": [
    {
      "id": "e393251c",
      "label": "Preview",
      "type": "preview",
      "color": "#3fe481",
      "priority": 50
    },
    {
      "id": "334e4eda",
      "label": "Program",
      "type": "program",
      "color": "#e43f5a",
      "priority": 200
    },
    {
      "id": "12c8d699",
      "label": "Aux 1",
      "type": "aux",
      "color": "#0000FF",
      "priority": 100
    },
    {
      "id": "12c8d689",
      "label": "Aux 2",
      "type": "aux",
      "color": "#0000FF",
      "priority": 100
    }
  ],
  "externalAddress": "http://0.0.0.0:4455/#/tally",
  "remoteErrorReporting": false,
  "uuid": "add56a3f"
}

Relevant log output

vMix

> tallyarbiter@3.0.4 start
> ts-node-dev src/index.ts --dev

[INFO] 20:58:32 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.6.4)
[2023-01-04 20:58:35] info: TallyArbiter running in Development Mode.
[2023-01-04 20:58:36] info: Starting OSC Setup.
[2023-01-04 20:58:38] info: Loading the stored Tally Arbiter configuration file.
[2023-01-04 20:58:38] info: Tally Arbiter Sources loaded.
[2023-01-04 20:58:38] info: 2 Sources configured.
[2023-01-04 20:58:38] info: Tally Arbiter Devices loaded.
[2023-01-04 20:58:38] info: 2 Devices configured.
[2023-01-04 20:58:38] info: Tally Arbiter Device Sources loaded.
[2023-01-04 20:58:38] info: 0 Device Sources configured.
[2023-01-04 20:58:38] info: Tally Arbiter Device Actions loaded.
[2023-01-04 20:58:38] info: 0 Device Sources configured.
[2023-01-04 20:58:38] info: TSL Clients 1 Second Updates are turned off.
[2023-01-04 20:58:38] info: Tally Arbiter Cloud Destinations loaded.
[2023-01-04 20:58:38] info: Tally Arbiter Cloud Keys loaded.
[2023-01-04 20:58:38] info: Initiating Setup for Source: vMix-TEST
[2023-01-04 20:58:38] info: Source: vMix-TEST Creating VMix connection.
[2023-01-04 20:58:38] info: Source: vMix-TEST Creating connection.
[2023-01-04 20:58:38] info: Source: vMix-TEST Reconnect attempts 7.
[2023-01-04 20:58:38] info: Source: vMix-TEST Configured reconnect timeout: 10000.
[2023-01-04 20:58:38] info: Source: vMix-TEST Connect triggered at startup.
[2023-01-04 20:58:38] info: Source: vMix-TEST Closed VMix connection.
[2023-01-04 20:58:38] info: Source Setup Complete.
[2023-01-04 20:58:38] info: Setting up the Main HTTP Server.
[2023-01-04 20:58:38] info: Main HTTP Server Complete.
[2023-01-04 20:58:38] info: TallyArbiter advertised over MDNS.
[2023-01-04 20:58:38] info: Starting socket.IO Setup.
[2023-01-04 20:58:38] info: Socket.IO Setup Complete.
[2023-01-04 20:58:38] info: Starting Listener Providers.
[2023-01-04 20:58:38] info: Starting VMix Emulation Service.
[2023-01-04 20:58:38] info: Starting TSL Listener Service.
[2023-01-04 20:58:38] info: Initiating 0 TSL Client Connections.
[2023-01-04 20:58:38] info: Finished TSL Client Connections.
[2023-01-04 20:58:38] info: Starting HTTP Server.
[2023-01-04 20:58:38] info: OSC Sending Port Ready. Broadcasting on Port: 5958
[2023-01-04 20:58:38] info: Finished VMix Emulation Setup. Listening for VMix Tally Connections on TCP Port 8099.
[2023-01-04 20:58:38] info: Tally Arbiter running on port 4455
[2023-01-04 20:58:59] error: Source: vMix-TEST  VMix Connection Error occurred: Error: connect ETIMEDOUT 192.168.1.89:8099
[2023-01-04 20:58:59] info: Source: vMix-TEST Reconnect attempt: 1.
[2023-01-04 20:58:59] info: Source: vMix-TEST Closed VMix connection.


OBS
> tallyarbiter@3.0.4 start
> ts-node-dev src/index.ts --dev

[INFO] 21:01:49 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.6.4)
[2023-01-04 21:01:52] info: TallyArbiter running in Development Mode.
[2023-01-04 21:01:53] info: Starting OSC Setup.
[2023-01-04 21:01:55] info: Loading the stored Tally Arbiter configuration file.
[2023-01-04 21:01:55] info: Tally Arbiter Sources loaded.
[2023-01-04 21:01:55] info: 2 Sources configured.
[2023-01-04 21:01:55] info: Tally Arbiter Devices loaded.
[2023-01-04 21:01:55] info: 2 Devices configured.
[2023-01-04 21:01:55] info: Tally Arbiter Device Sources loaded.
[2023-01-04 21:01:55] info: 0 Device Sources configured.
[2023-01-04 21:01:55] info: Tally Arbiter Device Actions loaded.
[2023-01-04 21:01:55] info: 0 Device Sources configured.
[2023-01-04 21:01:55] info: TSL Clients 1 Second Updates are turned off.
[2023-01-04 21:01:55] info: Tally Arbiter Cloud Destinations loaded.
[2023-01-04 21:01:55] info: Tally Arbiter Cloud Keys loaded.
[2023-01-04 21:01:55] info: Initiating Setup for Source: OBS-TEST
[2023-01-04 21:01:55] info: Source: OBS-TEST Creating OBS connection.
[2023-01-04 21:01:55] info: Source: OBS-TEST Creating connection.
[2023-01-04 21:01:55] info: Source: OBS-TEST Reconnect attempts 8.
[2023-01-04 21:01:55] info: Source: OBS-TEST Configured reconnect timeout: 15000.
[2023-01-04 21:01:55] info: Source: OBS-TEST Connect triggered at startup.
[2023-01-04 21:01:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:01:55] info: Source Setup Complete.
[2023-01-04 21:01:55] info: Setting up the Main HTTP Server.
[2023-01-04 21:01:55] info: Main HTTP Server Complete.
[2023-01-04 21:01:55] info: TallyArbiter advertised over MDNS.
[2023-01-04 21:01:55] info: Starting socket.IO Setup.
[2023-01-04 21:01:55] info: Socket.IO Setup Complete.
[2023-01-04 21:01:55] info: Starting Listener Providers.
[2023-01-04 21:01:55] info: Starting VMix Emulation Service.
[2023-01-04 21:01:55] info: Starting TSL Listener Service.
[2023-01-04 21:01:55] info: Initiating 0 TSL Client Connections.
[2023-01-04 21:01:55] info: Finished TSL Client Connections.
[2023-01-04 21:01:55] info: Starting HTTP Server.
[2023-01-04 21:01:55] info: OSC Sending Port Ready. Broadcasting on Port: 5958
[2023-01-04 21:01:55] info: Finished VMix Emulation Setup. Listening for VMix Tally Connections on TCP Port 8099.
[2023-01-04 21:01:55] info: Tally Arbiter running on port 4455
[2023-01-04 21:01:55] info: Source: OBS-TEST Reconnect attempt: 1.
[2023-01-04 21:01:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:01:55] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:01:55] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:01:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:10] info: Source: OBS-TEST Reconnect attempt: 2.
[2023-01-04 21:02:10] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:10] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:02:10] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:02:10] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:25] info: Source: OBS-TEST Reconnect attempt: 3.
[2023-01-04 21:02:25] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:25] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:02:25] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:02:25] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:40] info: Source: OBS-TEST Reconnect attempt: 4.
[2023-01-04 21:02:40] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:40] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:02:40] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:02:40] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:55] info: Source: OBS-TEST Reconnect attempt: 5.
[2023-01-04 21:02:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:02:55] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:02:55] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:02:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:10] info: Source: OBS-TEST Reconnect attempt: 6.
[2023-01-04 21:03:10] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:10] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:03:10] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:03:10] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:25] info: Source: OBS-TEST Reconnect attempt: 7.
[2023-01-04 21:03:25] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:25] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:03:25] info: Source: OBS-TEST Reconnect timeout not set.
[2023-01-04 21:03:25] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:40] info: Source: OBS-TEST Reconnect attempt: 8.
[2023-01-04 21:03:40] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:40] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:03:40] info: Source: OBS-TEST No more reconnects.
[2023-01-04 21:03:40] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:55] info: Source: OBS-TEST No more reconnects.
[2023-01-04 21:03:55] info: Source: OBS-TEST Closed OBS connection.
[2023-01-04 21:03:55] error: Source: OBS-TEST  OBS websocket connection error. Is OBS running?
[2023-01-04 21:03:55] info: Source: OBS-TEST No more reconnects.
[2023-01-04 21:03:55] info: Source: OBS-TEST Closed OBS connection.

Error stacktrace (if applicable)

No response

@Jocke4f Jocke4f added the bug Something isn't working label Jan 4, 2023
@Jocke4f
Copy link
Collaborator Author

Jocke4f commented Jul 18, 2023

Solved in TA 3.0.x when #578 was merged to main.

Jocke4f added a commit to Jocke4f/TallyArbiter that referenced this issue Dec 13, 2023
Features:
(relay-listener) Added support for multiple relay boards
(OBS) Added support for OBS 28 (websocket protocol version 5) and preview/program tally for OBS 28
(ui) Added use of device name instead of client only on chat
(ui) Added enable/disable chat options to tally view
(m5AtomMatrix) Added support for password

Fixes:
(build) Updated build environments.
(build) Updated external dependencies.
(gpo-listener) Correction of connection handling and device reassignment
(m5AtomMatrix-listener) Corrected displayed camera number
(m5StickC-listener) Correction to setup the TallyArbiter IP address in the UI and internal LED definition
(relay-listener) Improved error handling
(ui) Improved server reconnection and connection lost status
(Analog Way Livecore)  Added connect()/reconnect() to enable reconnect handling.
(ATEM) Improved Atem source handling
(Blackmagic VideoHub) Removed premature connected status.
(Newtek Tricaster) Added connect()/reconnect() to enable reconnect handling.
(OBS) Removed bug causing infinite reconnect attempts
(Roland VR)  Added connect()/reconnect() to enable reconnect handling.
(vMix) Added connect()/reconnect() to enable reconnect handling. Fix for josephdadams#532. Removed memory leak at connect handling
@Jocke4f Jocke4f mentioned this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants