Skip to content

NethVoice: Janus stays down after boot without DNS #8394

Todo

Description

@edospadoni

After a node restart, if name resolution (DNS) is not yet available, the Janus service of NethVoice fails to start and never starts again by itself, even when the network is back. Calls from the browser in NethVoice CTI and from NethLink do not work until someone starts the service by hand.

Steps to reproduce

  • Make the name of the STUN server (by default stun1.l.google.com) impossible to resolve from the node, for example by blocking DNS requests
  • Restart the node, or restart Janus with systemctl --user restart janus from the NethVoice module shell
  • Wait a few minutes, then make DNS work again
  • Check the service with systemctl --user status janus

Expected behavior

Janus keeps trying to start and comes up by itself as soon as DNS works again.

Actual behavior

Janus stops at startup because it cannot resolve the STUN server name. The system restarts it right away and, after five failed starts within 10 seconds, it gives up. Each start takes about two seconds, so on a slow machine the limit may not be reached and the problem does not show up. The service stays down until it is started by hand.

[ERR] [ice.c:janus_ice_set_stun_server:1225] Could not resolve stun1.l.google.com...
[FATAL] [janus.c:main:5323] Invalid STUN address stun1.l.google.com:19302
janus.service: Scheduled restart job, restart counter is at 5.
janus.service: Start request repeated too quickly.
janus.service: Failed with result 'exit-code'.
Failed to start janus server.

While Janus is down, requests to the /janus web address answer with error 502 and WebRTC phones (NethVoice CTI, NethLink) cannot register or make calls. On the system where this was seen, after a power loss, the service stayed down for almost 22 hours.

Workaround

From the NethVoice module shell (runagent -m nethvoiceX), run systemctl --user reset-failed janus && systemctl --user start janus, then check that systemctl --user is-active janus answers active.

Components

NethVoice 1.8.6

See also

Activity

  1. added this to the NethVoice 1.8 milestone on Nov 27, 2026
  2. self-assigned this
    on Nov 27, 2026
  3. added
    nethvoice
    on Nov 27, 2026
  4. added theissue type on Nov 27, 2026
  5. moved this from Todo to In Progress in NethVoiceon Nov 27, 2026
  6. moved this from In Progress to Todo in NethVoiceon Nov 27, 2026
  7. added
    testing
    on Nov 30, 2026
  8. moved this from Todo to Testing in NethVoiceon Nov 30, 2026
  9. removed their assignment
    on Nov 30, 2026
  10. edospadoni commented on Nov 30, 2026

    @edospadoni
    MemberAuthor

    Test

    PRs: nethesis/ns8-nethvoice#1347

    Setup: a NethVoice test instance updated to the testing release. Commands run in the module shell (runagent -m nethvoiceX bash). To simulate the missing name resolution without touching the network, Janus is given a STUN server name that cannot be resolved (stun.invalid): it fails at startup with the same error.

    Test Case 1 - New restart settings

    • systemctl --user show janus -p RestartUSec -p StartLimitIntervalUSec prints RestartUSec=10s and StartLimitIntervalUSec=0
    • systemctl --user is-active janus prints active

    Test Case 2 - Janus recovers by itself

    • Make the STUN name impossible to resolve and restart Janus:
      mkdir -p ~/.config/systemd/user/janus.service.d
      printf '[Service]\nEnvironmentFile=-%%E/state/janus-test.env\n' > ~/.config/systemd/user/janus.service.d/test.conf
      echo STUNSERVER=stun.invalid > ~/.config/state/janus-test.env
      systemctl --user daemon-reload
      systemctl --user restart janus
      
    • Wait at least two minutes: systemctl --user status janus shows activating (auto-restart) or a start in progress, never failed
    • The journal of the instance shows Could not resolve stun.invalid about every 12 seconds and no Start request repeated too quickly line
    • Remove the simulated fault with rm ~/.config/state/janus-test.env: within about 15 seconds systemctl --user is-active janus prints active, with no manual start
    • The web phone of NethVoice CTI registers again and a call works
    • Clean up: rm -r ~/.config/systemd/user/janus.service.d && systemctl --user daemon-reload

    Testing release: 1.8.8-testing.8 (nethesis/ns8-nethvoice#1347)

    ghcr.io/nethesis/nethvoice:1.8.8-testing.8
    
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:1.8.8-testing.8","instances":["nethvoiceX"],"force":true}'
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

nethvoicetesting

Type

Projects

  • Status
    Testing

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions