Skip to content

NethCTI Middleware: sessions are lost after restart #7724

@edospadoni

Description

@edospadoni

Description

When the nethcti-middleware service is restarted, either by pressing Save in the Settings page inside module on NethServer 8 or by manually restarting the service, all user sessions on CTI and NethLink stop working.

After the restart, API requests from NethLink fail with the following error:

10:45:52.993+01:00 [NethLink************] ERROR during fetch GET AxiosError ERR_BAD_REQUEST Request failed with status code 403 https://cti.nethesis.it/api/astproxy/parkings {“headers”:{“Content-Type”:“application/json”,“Authorization”:“Bearer eyJ...”}}

This indicates that the JWT tokens used by clients become invalid or are lost when the middleware restarts.
A persistent token storage mechanism should be implemented so that valid JWT tokens survive service restarts until they naturally expire.

Steps to reproduce

  1. Log in to CTI and NethLink with valid sessions
  2. Restart the nethcti-middleware service by:
    • pressing Save in the NethCTI module on NethServer 8, or
    • manually restarting the service/container
  3. Try to use NethLink or CTI again
  4. Observe that API requests fail with HTTP 403 errors

Expected behavior

User sessions and JWT tokens remain valid after the middleware restart, until token expiration.

Actual behavior

After restarting the middleware, existing JWT tokens become invalid and all CTI/NethLink sessions fail with 403 errors.

Components

  • nethcti-middleware
  • nethlink
  • nethcti-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethvoiceBug or features releted to the NethVoice projectnethvoice-ctiThe issue is related to NethLink (NethVoice Web client)verifiedAll test cases were verified successfully

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions