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 server 3.0.0 dev14 crash on startup #2455

Closed
cristian-ciobanu opened this issue Dec 17, 2024 · 5 comments
Closed

GNS3 server 3.0.0 dev14 crash on startup #2455

cristian-ciobanu opened this issue Dec 17, 2024 · 5 comments
Labels

Comments

@cristian-ciobanu
Copy link

cristian-ciobanu commented Dec 17, 2024

I cloned the the latest 3.0 branch and I installed GNS3 server using the provided steps:

git clone https://github.com/GNS3/gns3-server
cd gns3-server
git checkout 3.0
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
python3 -m pip install .
python3 -m gns3server

Environment: Linux (ArchLinux)
Python: version 3.12.7
GNS3 server 3.0 default configuration

When I start manually the GNS3 server using the python3 -m gns3server command it crashes with the following error

`❯ python3 -m gns3server
2024-12-17 22:43:32 WARNING gns3server.config:250 No configuration file could be found or read
2024-12-17 22:43:32 INFO gns3server.server:250 GNS3 server version 3.0.0.dev14+0dd53d31
2024-12-17 22:43:32 INFO gns3server.server:252 Copyright (c) 2007-2024 GNS3 Technologies Inc.
2024-12-17 22:43:32 WARNING gns3server.server:264 Compute authentication is enabled with username 'gns3' and a randomly generated password. Please set a password in the config file if this compute is to be used by an external controller
2024-12-17 22:43:32 INFO gns3server.server:274 Running with Python 3.12.7 and has PID 9003
2024-12-17 22:43:32 INFO gns3server.server:91 Current locale is en_US.UTF-8
2024-12-17 22:43:32 INFO gns3server.server:292 Using system certificate store for SSL connections
2024-12-17 22:43:32 INFO gns3server.server:304 Starting server on 0.0.0.0:3080
2024-12-17 22:43:32 INFO uvicorn Started server process [9003]
2024-12-17 22:43:32 INFO uvicorn Waiting for application startup.
2024-12-17 22:43:32 INFO alembic.runtime.migration:215 Context impl SQLiteImpl.
2024-12-17 22:43:32 INFO alembic.runtime.migration:218 Will assume non-transactional DDL.
2024-12-17 22:43:33 INFO gns3server.db.tasks:87 Current database revision is None
2024-12-17 22:43:33 INFO alembic.runtime.migration:215 Context impl SQLiteImpl.
2024-12-17 22:43:33 INFO alembic.runtime.migration:218 Will assume non-transactional DDL.
2024-12-17 22:43:33 INFO alembic.runtime.migration:623 Running stamp_revision -> 9a5292aa4389
2024-12-17 22:43:33 INFO gns3server.controller:70 Loading controller vars file "/home/test/.config/GNS3/3.0/gns3_controller.vars"
2024-12-17 22:43:33 INFO gns3server.controller:74 Controller is starting
2024-12-17 22:43:33 INFO gns3server.controller:343 Installing base configs in '/home/test/GNS3/configs'
2024-12-17 22:43:33 INFO gns3server.controller:356 Installing built-in disks in '/home/test/GNS3/images/QEMU'
2024-12-17 22:43:33 INFO gns3server.controller:266 IOU license check is disabled on the controller
2024-12-17 22:43:33 INFO gns3server.controller:271 Comparing controller version 3.0.0.dev14+0dd53d31 with config version None
2024-12-17 22:43:33 INFO gns3server.controller.appliance_manager:119 Installing built-in appliances in '/home/test/.local/share/GNS3/appliances'
2024-12-17 22:43:33 INFO gns3server.controller.compute:69 Create compute local
2024-12-17 22:43:33 INFO gns3server.controller.compute:370 Connecting to compute 'local'
2024-12-17 22:43:33 WARNING gns3server.controller.compute:375 Cannot connect to compute 'local': Cannot connect to host 127.0.0.1:3080 ssl:default [Connect call failed ('127.0.0.1', 3080)]
2024-12-17 22:43:33 INFO gns3server.controller.compute:370 Connecting to compute 'local'
2024-12-17 22:43:33 WARNING gns3server.controller.compute:375 Cannot connect to compute 'local': Cannot connect to host 127.0.0.1:3080 ssl:default [Connect call failed ('127.0.0.1', 3080)]
2024-12-17 22:43:33 INFO gns3server.controller.compute:370 Connecting to compute 'local'
2024-12-17 22:43:33 WARNING gns3server.controller.compute:375 Cannot connect to compute 'local': Cannot connect to host 127.0.0.1:3080 ssl:default [Connect call failed ('127.0.0.1', 3080)]
2024-12-17 22:43:33 INFO gns3server.controller.compute:370 Connecting to compute 'local'
2024-12-17 22:43:33 WARNING gns3server.controller.compute:375 Cannot connect to compute 'local': Cannot connect to host 127.0.0.1:3080 ssl:default [Connect call failed ('127.0.0.1', 3080)]
2024-12-17 22:43:33 ERROR uvicorn Traceback (most recent call last):
File "/data/Development/gns3-web/backend/gns3server/controller/project.py", line 983, in open
await self.add_node(compute, name, node_id, dump=False, **node)
File "/data/Development/gns3-web/backend/gns3server/controller/project.py", line 611, in add_node
node = await self._create_node(compute, name, node_id, node_type, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/Development/gns3-web/backend/gns3server/controller/project.py", line 573, in _create_node
await compute.post("/projects", data=data)
File "/data/Development/gns3-web/backend/gns3server/controller/compute.py", line 598, in post
response = await self.http_query("POST", path, data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/Development/gns3-web/backend/gns3server/controller/compute.py", line 349, in http_query
raise ComputeError(f"Cannot connect to compute '{self._name}' with request {method} {path}")
gns3server.controller.controller_error.ComputeError: Cannot connect to compute 'ARCH-DESKTOP (controller)' with request POST /projects

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/Development/gns3-web/backend/venv-gns3server/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 "/data/Development/gns3-web/backend/venv-gns3server/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 "/data/Development/gns3-web/backend/venv-gns3server/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan
async with original_context(app) as maybe_original_state:
^^^^^^^^^^^^^^^^^^^^^
File "/data/Development/gns3-web/backend/venv-gns3server/lib/python3.12/site-packages/starlette/routing.py", line 569, in aenter
await self._router.startup()
File "/data/Development/gns3-web/backend/venv-gns3server/lib/python3.12/site-packages/starlette/routing.py", line 670, in startup
await handler()
File "/data/Development/gns3-web/backend/gns3server/core/tasks.py", line 57, in start_app
await Controller.instance().start(computes)
File "/data/Development/gns3-web/backend/gns3server/controller/init.py", line 137, in start
await self._project_auto_open()
File "/data/Development/gns3-web/backend/gns3server/controller/init.py", line 600, in _project_auto_open
await project.open()
File "/data/Development/gns3-web/backend/gns3server/utils/asyncio/init.py", line 146, in wrapper
return await f(oself, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/Development/gns3-web/backend/gns3server/controller/project.py", line 1040, in open
raise ControllerError(str(e))
gns3server.controller.controller_error.ControllerError: Cannot connect to compute 'ARCH-DESKTOP (controller)' with request POST /projects

2024-12-17 22:43:33 ERROR uvicorn Application startup failed. Exiting.`

By looking at the log it seems that the server is trying to connect using SSL although I did not specify to use SSL and I do not have it configured.

2024-12-17 22:43:32 INFO gns3server.server:292 **Using system certificate store for SSL connections**
2024-12-17 22:43:33 INFO gns3server.controller.compute:370 Connecting to compute 'local'
2024-12-17 22:43:33 WARNING gns3server.controller.compute:375 Cannot connect to compute 'local': **Cannot connect to host 127.0.0.1:3080 ssl:default** [Connect call failed ('127.0.0.1', 3080)]
@grossmj
Copy link
Member

grossmj commented Dec 18, 2024

Did you have the same problem with RC2?

@cristian-ciobanu
Copy link
Author

I also have RC2 installed through package manager and it has the same problem.
I'm assuming maybe some dependency got upgraded and might cause this.

@grossmj
Copy link
Member

grossmj commented Dec 18, 2024

Thanks, it looks like there is an issue with the project auto open feature. I will investigate more soon.

Also, I plan to release 3.0 this week ;)

@grossmj grossmj added the Bug label Dec 18, 2024
grossmj added a commit that referenced this issue Dec 18, 2024
@grossmj
Copy link
Member

grossmj commented Dec 18, 2024

Fixed, thanks for catching this 👍

@grossmj grossmj closed this as completed Dec 18, 2024
@cristian-ciobanu
Copy link
Author

I confirm that now it works fine. Thanks for fixing this.

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