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

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

Closed
nwhisper2014 opened this issue Dec 25, 2024 · 1 comment
Labels

Comments

@nwhisper2014
Copy link

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"
@nwhisper2014 nwhisper2014 changed the title After configuring SSL encryption (Security option), the GNS3 server does not start [GNS 3.0.0] After configuring SSL encryption (Security option), the GNS3 server does not start Dec 25, 2024
@nwhisper2014 nwhisper2014 changed the title [GNS 3.0.0] After configuring SSL encryption (Security option), the GNS3 server does not start [GNS3 3.0.0] After configuring SSL encryption (Security option), the GNS3 server does not start Dec 25, 2024
@grossmj
Copy link
Member

grossmj commented Dec 26, 2024

Fixed. Thanks!

@grossmj grossmj closed this as completed Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants