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

unable to create project when use systemd (PPA install 2.2.48) #2403

Closed
kakkotetsu opened this issue Jul 17, 2024 · 1 comment
Closed

unable to create project when use systemd (PPA install 2.2.48) #2403

kakkotetsu opened this issue Jul 17, 2024 · 1 comment

Comments

@kakkotetsu
Copy link

kakkotetsu commented Jul 17, 2024

environment

I testd Ubuntu22.04 + gns3server 2.2.48 , 2.2.48.1

issue

Unable to create project.
When I try to create a project from gns3 file, I get the following error.

Jul 16 02:54:42 cn-ab0914 gns3server[1592]: 2024-07-16 02:54:42 ERROR project_handler.py:210 Cannot load '/home/ubuntu/GNS3/projects/3rd-DynamicRouting-Intro1/3rd-DynamicRouting-Intro1.gns3' because the server has not been started with the '--local' parameter
Jul 16 02:54:42 cn-ab0914 gns3server[1592]: 2024-07-16 02:54:42 INFO web_log.py:211 127.0.0.1 [16/Jul/2024:02:54:42 +0000] "POST /v2/projects/load HTTP/1.1" 403 204 "-" "GNS3 QT Client v2.2.48.1"
Jul 16 02:54:42 cn-ab0914 gns3.desktop[3432]: 2024-07-16 02:54:42 CRITICAL topology.py:258 Error transferring http://admin@localhost:3080/v2/projects/load - server replied: Forbidden (localhost:3080)

When I try to create blank project, I get the following error.

Jul 16 05:26:07 cn-ab0914 gns3.desktop[4102]: 2024-07-16 05:26:07 CRITICAL topology.py:258 The path is not allowed

The gns3server process is follows.

ubuntu@cn-ab0914:~$ ps -ef | grep -i gns3
root        1592       1  0 02:47 ?        00:00:05 /usr/share/gns3/gns3-server/bin/python /usr/bin/gns3server
ubuntu      3432    2995  0 02:54 ?        00:00:16 /usr/share/gns3/gns3-gui/bin/python /usr/bin/gns3

reproduction procedure

  1. install gns3server from apt ppa(v2.2.48) on Ubuntu22.04. ( https://docs.gns3.com/docs/getting-started/installation/linux/ )
  2. select <Yes> the following question. (if select <No> , this problem does not occur.)
Configuring gns3-server 

Use Systemd to automatically launch the GNS3 server at boot.
Do you want to enable and start the GNS3 server as a service?
  1. start GNS3
  2. try to create project from gns3 file or create blank project, the problem occures.

if select <No>, gns3server process is follows.

ubuntu@cn-ab0914:~$ ps -ef | grep [g]ns3
ubuntu      8788    2995 23 02:27 ?        00:00:01 /usr/share/gns3/gns3-gui/bin/python /usr/bin/gns3
ubuntu      8824    8788 25 02:27 ?        00:00:01 /usr/share/gns3/gns3-server/bin/python /usr/bin/gns3server --local --log=/home/ubuntu/.config/GNS3/2.2/gns3_server.log --pid=/home/ubuntu/.config/GNS3/2.2/gns3_server.pid
@WhatsTheIP
Copy link

WhatsTheIP commented Jul 24, 2024

Found a work around on how to resolve the issue while preserving remote server connectivity & keeping my topology & nodes intact.

I'm adding this as a note for now for historical purposes, updating the bug link below with my work around if others face this issue:


IMPORTANT:
#1) - Make sure you kill the gns3server 1st before you attempt to run gns3server --local from the CLI.
#2) - If you don't know how to do that, go down below you'll see where I identify if the gns3server service is running and how I killed it.
#3) - You don't need to run --debug but I did it to troubleshoot the issue to see if the server or client returned any logs.


Troubleshooting section.

_________________________________
= [Verify GNS3 Server Services] =
_________________________________

sudo systemctl status gns3server.service 
○ gns3server.service - GNS3 server
     Loaded: loaded (/usr/lib/systemd/system/gns3server.service; enabled; preset: enabled)
     Active: inactive (dead) since Wed 2024-07-24 15:11:09 PDT; 10min ago
   Duration: 3min 30.040s
    Process: 2759 ExecStart=/usr/bin/gns3server (code=exited, status=0/SUCCESS)
   Main PID: 2759 (code=exited, status=0/SUCCESS)
        CPU: 1.602s

Jul 24 15:11:09 MyUser systemd[1]: Stopping gns3server.service - GNS3 server...
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO web_server.py:115 Closing 2 websocket connections...
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO compute.py:457 Connection closed to compute 'local' WebSocket 'http://127.0.0.1:3080/v2/com>
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO __init__.py:146 Controller is stopping
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO compute.py:457 Connection closed to compute '98f0ddbf-990c-43a1-96c0-353af1962b54' WebSocke>
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO notification_handler.py:59 Client has disconnected from compute WebSocket
Jul 24 15:11:09 MyUser gns3server[2759]: 2024-07-24 15:11:09 INFO notification_handler.py:59 Client has disconnected from compute WebSocket
Jul 24 15:11:09 MyUser systemd[1]: gns3server.service: Deactivated successfully.
Jul 24 15:11:09 MyUser systemd[1]: Stopped gns3server.service - GNS3 server.
Jul 24 15:11:09 MyUser systemd[1]: gns3server.service: Consumed 1.602s CPU time, 51.8M memory peak, 0B memory swap peak.

__________________________________________________________
= [Start GNS3Server Services - NORMALLY /w Debug Option] =
__________________________________________________________

gns3server --debug

==========
= [LOGS] =
==========

Ignore, unlikely logs here until you start a project.

___________________________________________
= [Start GNS3 Client - With Debug Option] =
___________________________________________

#1) - Run from the CLI (remove the -):
- gns3 --debug

#2) - Then open/start a project, you should get an error below

==========
= [LOGS] =
==========
2024-07-24 15:22:33 DEBUG http_client:662 Response error: Error transferring http://admin@localhost:3080/v2/projects/load - server replied: Forbidden (localhost:3080) for http://admin@localhost:3080/v2/projects/load (error: 201)
2024-07-24 15:22:33 CRITICAL topology.py:258 Error transferring http://admin@localhost:3080/v2/projects/load - server replied: Forbidden (localhost:3080)

___________________________________________
= [View Error Logs From Server CLI Debug] =
___________________________________________

2024-07-24 15:22:33 ERROR project_handler.py:210 Cannot load 'MyProjectPath' because the server has not been started with the '--local' parameter

___________________________________
= [Kill Any Running GNS3 Process] =
___________________________________

===================================
= [Verify If Service Is Running] =
===================================

sudo lsof -i :3080

COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
gns3serve 9286 MyUser    6u  IPv4  57418      0t0  TCP localhost:3080 (LISTEN)
gns3serve 9286 MyUser    7u  IPv4  57428      0t0  TCP localhost:46360->localhost:3080 (ESTABLISHED)
gns3serve 9286 MyUser    8u  IPv4  57443      0t0  TCP localhost:3080->localhost:36306 (CLOSE_WAIT)
gns3serve 9286 MyUser   16u  IPv4  57429      0t0  TCP localhost:3080->localhost:46360 (ESTABLISHED)

=========================================
= [Run Below Command To Kill The Process]
=========================================

sudo kill -9 9286

===================================
= [Verify If Service Is Running] =
===================================

sudo lsof -i :3080

________________________________________
= [Start GNS3Server Services --Local] =
________________________________________

gns3server --local --debug

##########
# [LOGS] #
##########

2024-07-24 15:32:57 INFO response.py:62 Response: 200 OK
2024-07-24 15:32:57 DEBUG response.py:63 {'Connection': 'close', 'X-Route': '/v2/projects/{project_id}/drawings', 'Server': 'Python/3.12 GNS3/2.2.48.1', 'Content-Type': 'application/json'}

____________________________
= [Start GNS3 GUI Client] =
____________________________

#1) - Open a project/create a new project. This should work now.

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

No branches or pull requests

3 participants