Bug 1403623

Summary: gns3-gui fail to open previous projet or to build a new projet in Fedora25
Product: [Fedora] Fedora Reporter: Yves L'ECUYER <yves.lecuyer.linfedora>
Component: gns3-guiAssignee: Othman Madjoudj <athmanem>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: athmanem, suren, yves.lecuyer.linfedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-02 21:03:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
gn3 log when open a previous project built under Fedora 24 and gns3-1.5.1
none
the corresponding project for the first gns3 log provided above
none
gns3 log when trying to build a new project in a blank topology none

Description Yves L'ECUYER 2016-12-12 00:58:22 UTC
Description of problem:
Since upgrade to Fedora25 from Fedora 24, gns3-gui fail to open previous projet or to build a new projet with the same error:
====================
Opening configuration file: /root/.config/GNS3/base_configs/ios_base_startup-config.txt
Connection to http://127.0.0.1:8000
Response error: Error transferring http://Eu9KW7NzLK9f50dF4eOBzrN7MfdSMulONCvi4kTFUd0hcJYmg0nrNGlgu0Kttg4g@127.0.0.1:8000/v1/version - server replied: Method Not Allowed (error: 202)
Cannot connect to local server http://127.0.0.1:8000. Please check if GNS3 is allowed in your antivirus and firewall.
Error while creating project: Cannot connect to local server http://127.0.0.1:8000. Please check if GNS3 is allowed in your antivirus and firewall
================


Version-Release number of selected component (if applicable):
1.5.1

How reproducible:
Always

Steps to Reproduce:
1.open gns-gui, with usage of local server on port 8000
2.try to drag a cisco router on topology, or open a previous project
3.

Actual results:
Error while creating project: Cannot connect to local server 

Expected results:
In fedora 24 with the same release of gns3: 1.5.1, all was working. The difference is in the python libs ???

Additional info:
I tried also with gns3: 1.5.2, I get the same error
So currently under Fedora 25 , GNS3 is unusable

With gns3 1.5.1, If I try tu use the server gns3 running on port 3080, to draw an object router I get:
======================
Opening configuration file: /root/GNS3/configs/ios_base_startup-config.txt
Connection to http://192.168.200.133:3080
Response error: Error transferring http://192.168.200.133:3080/v1/version - server replied: Method Not Allowed (error: 202)
Cannot connect to remote server http://192.168.200.133:3080
Error while creating project: Cannot connect to remote server http://192.168.200.133:3080
=====================================
Currently:
# netstat -atpn | egrep '8000|3080'
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      32413/python3       
tcp        0      0 0.0.0.0:3080            0.0.0.0:*               LISTEN   
29987/python3

Comment 1 Othman Madjoudj 2016-12-12 10:48:38 UTC
I was not able to reproduce it here using qemu images and c3745 image.

Could you please reproduce the bug using: gns3 --debug 2>&1 | tee gns3-debug-output.log

Please attach:

1. gns3-debug-output.log

2. project file (zipped, I suppose you don't have anything confidential there)

Comment 2 Yves L'ECUYER 2016-12-12 16:21:18 UTC
Created attachment 1230837 [details]
gn3 log when open a previous project built under Fedora 24 and gns3-1.5.1

Comment 3 Yves L'ECUYER 2016-12-12 16:24:08 UTC
Created attachment 1230838 [details]
the corresponding project for the first gns3 log provided above

Comment 4 Yves L'ECUYER 2016-12-12 16:25:47 UTC
Created attachment 1230839 [details]
gns3 log when trying to build a new project in a blank topology

Comment 5 Yves L'ECUYER 2016-12-12 16:47:38 UTC
Here above are the details.
I'm trying to compare what is different between Fedora 24 and Fedora 25 environnement.
Because the basic are the same:
gns3-gui-1.5.1
gns3-server-1.5.1
(in fedora 24 I installed the release from the original ZIP on github, and a *.spec file of my own. I tryed to rebuild on Fedora 25 the gns3-gui and gns3-server rpm packages , with the same ZIP original file and my spec file, but I get the same result than with the one coming from fedora standard repository

Because http_client.py, component of gns3-server use the pakage python3-aiohttp, I checked the release of this component.
I used the same release:
  Under Fedora 25:
  # rpm -qa | grep aiohttp
  python3-aiohttp-0.21.6-4.fc25.x86_64

  Under Fedora 24:
  # rpm -qa | grep aiohttp
  python3-aiohttp-0.21.6-4.fc24.x86_64

So the difference is more deeper in Python3 library. But I don't know how to track this !
=============
Additionally, with selinux in permissive mode, or in enforcing mode, and firewall stopped or running,
I ALWAYS GET a good result in Fedora 24, while gns3 fails in Fedora 25

A TEST with curl, confirm the problem.
Once gns3-gui is open, with no project open ( so just only a process python3 corresponding to gns3-server ins running and listening on TCP port 8000),
ON FEDORA24
# curl http://127.0.0.1:8000
return Nothing on stderror, and $?=0,

ON FEDORA25
[root@ismf33 ~]# curl http://127.0.0.1:8000
405: Method Not Allowed[root@ismf33 ~]# 
and $?=0

Comment 6 Othman Madjoudj 2016-12-12 17:09:44 UTC
I'll take a look into the project file.

Could you update python3-aiohttp to python3-aiohttp-1.0.5-1.fc25, it should be in -testing repo, you'll need to manually install python3-async-timeout-1.1.0-3.fc25.noarch

https://bodhi.fedoraproject.org/updates/FEDORA-2016-2282d5fd5b


dnf install --enablerepo=updates-testing python3-async-timeout 
python3-aiohttp

Comment 7 Yves L'ECUYER 2016-12-12 18:36:18 UTC
Thanks
I just do
# dnf install --enablerepo=updates-testing python3-async-timeout
and
# dnf update --enablerepo=updates-testing python3-aiohttp

AND NOW all is working fine;
-> Creating a new project by adding router
-> Openning an old project
=======================

AT lest if webmin service is not running (by default on TCP 10000 and UDP 10000)

+++++++++++++++=
This is an other problem, with NIO port, if we let in
GNS3 Preference -> server -> UDP tunnelling port range to the default:
10000 to 20000
GNS3 cannot open the first link between object. I already discussed about that in GNS3 forum and I dont know if some one is trying to correct this bug. The problem is in the method used to check if the port is busy or not, so in that circumstance with the same project that I provided here, only a link remain open

and we have something like the following in GNS3 console:
=================
error while adding a NIO for R1: unable to create UDP NIO
Server error from http://127.0.0.1:8000: R1: unable to create UDP NIO
deleting link from R1 FastEthernet0/0 to SW1 FastEthernet0/0
================

and on port point of view:
# netstat -aupn | grep 10000
udp        0      0 0.0.0.0:10000           0.0.0.0:*                           27434/perl          
udp        0      0 127.0.0.1:10001         127.0.0.1:10000         ESTABLISHED 17241/dynamips   

Perl process is the webmin server. Can you imagine dynamips trying to talk with webmin perl proces ???? A "deaf Dialog" when we say in French !!!
==== 
On the other hand On my MacOSX El Capitan, with the release gns3-1.5.2, all is working fine. When webmin perl process is running on top of TCP and UDP port 10000, gns3 open NIO port for links, starting from 10001, 10002 and so on.
=====

So I tried also
# dnf update --enablerepo=updates-testing gns3-gui  gns3-server
to be in gns3-1.5.2 release on my fedora 25, 

==> BUT the problem PERSISTS.
Once again, the under lying python3 library are not implemented in the same way than on BSD MacOSX I suppose.
===

+++++++++++++++++++++++++++++++++
Well this problem is far less critical than the one signalled by this bug, because you can easily turn around by changing the UDP tunnelling port range in GNS3 preference.
But anybody must be AWARE of it, if ever they make running an other service than webmin on 10000 UDP port !!!
+++++++++++++++++++++++++++++++++

THANKS for the suggestion

Comment 8 Othman Madjoudj 2016-12-12 19:23:48 UTC
Thanks for your feedback, regarding the second issue, I think it's hard to avoid since GNS3 components will use a lot of ports for various things (consoles, vnc, telnet and such), but most of them are binded to localhost.

It might be good to bind Webmin port to main IP [1] to avoid similar issues (if I recall in miniserv.conf file)

[1] http://doxfer.webmin.com/Webmin/Webmin_Configuration#Ports_and_Addresses

Please let me know if I can close this bug.

Comment 9 Yves L'ECUYER 2016-12-12 23:05:57 UTC
Yes this bug as defined in the title, gets its solution with python3-aiohttp-1.0.5.
But it means, that python3-aiohttp-1.0.5, andpython3-async-timeout-1.1.0-3  must be in fedora update, 

and may be gns3 spec file modified with:
Requires:  python3-aiohttp >= 1.0.5
Requires: python3-async-timeout >=1.1.0

and so updated too, in fedora update
to avoid future request for the same bug ?

Comment 10 Suren Karapetyan 2016-12-18 05:27:16 UTC
Shouldn't this be filed against the python3-aiohttp component?
The example server from aiohttp docs doesn't work either, so it's in no way specific to gns3-server.

Comment 11 Othman Madjoudj 2017-01-02 21:03:11 UTC
python3-aiohttp has been pushed to -testing, it'll soon hit stable
gns3 1.5.2 pushed to stable