Skip to content

[GNS3 3.0.0] After configuring SSL encryption (Security option), the GNS3 server does not start #3681

@nwhisper2014

Description

@nwhisper2014

After configuring SSL (Security option), the GNS3 server does not start. Error message:

2024-12-25 18:37:10 INFO __init__.py:273 Comparing controller version 3.0.0 with config version 3.0.0
2024-12-25 18:37:10 INFO __init__.py:281 Built-in appliances are installed in '/home/gns3/.local/share/GNS3/appliances'
2024-12-25 18:37:10 ERROR on.py:121 Traceback (most recent call last):
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/starlette/routing.py", line 693, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/starlette/routing.py", line 569, in __aenter__
    await self._router.startup()
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/starlette/routing.py", line 670, in startup
    await handler()
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/gns3server/core/tasks.py", line 57, in start_app
    await Controller.instance().start(computes)
  File "/home/gns3/.venv/gns3server-venv/lib/python3.12/site-packages/gns3server/controller/__init__.py", line 94, in start
    protocol = server_config.protocol.value
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'value'

2024-12-25 18:37:10 ERROR on.py:59 Application startup failed. Exiting.

GNS3 version and operating system (please complete the following information):

  • OS: Linux
  • GNS3 version: 3.0.0
  • VM: Proxmox and VirtualBox

To Reproduce
Steps to reproduce the behavior:

  1. Go to Security options
  2. "Do you want to configure SSL encryptuin?" -> Click Yes

For myself, I fixed the error:

@@ -91,7 +91,7 @@
         if server_config.enable_ssl:
             self._ssl_context = self._create_ssl_context(server_config)

-        protocol = server_config.protocol.value
+        protocol = server_config.protocol
         if self._ssl_context and protocol != "https":
             log.warning(f"Protocol changed to 'https' for local compute because SSL is enabled")
             protocol = "https"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions