[Nfd-dev] YaNFD cannot create TCP face

郝广宇 haoguangyu at chorustek.com
Mon Sep 26 01:56:25 PDT 2022


Hello, Xinyu
The new issue is openned, https://github.com/named-data/YaNFD/issues/43
 
BR.


GuangYu Hao
------------------ Original ------------------
From:  "XINYU MA"<ma.xinyu.26a at kyoto-u.jp>;
Date:  Mon, Sep 26, 2022 04:29 PM
To:  "郝广宇"<haoguangyu at chorustek.com>; 
Cc:  "nfd-dev"<nfd-dev at lists.cs.ucla.edu>; 
Subject:  Re: [Nfd-dev] YaNFD cannot create TCP face

 

Hello, Guangyu,

Thank you for the report.
The reason seems to be the remote YaNFD side. The TCP listener considers the remote URI of the new face as an UDP face (with RemoteURI=udp4://XX:6363, LocalUI=tcp4://XX:6363), and thus it is unable to maintain the connection.
I will investigate this problem but I'm not sure when I can fix it. If you are willing to, please open an issue on GitHub.


Best regards,
Xinyu Ma.



2022年9月26日(月) 0:05 郝广宇 <haoguangyu at chorustek.com>:

Hello,
We get the error when create the remote face between yanfd and yanfd, the following is the info about the error.


from the intranet:
nfdc face create remote tcp://120.53.13.74:6363
Error 406 when creating face: Transport error



the remote yanfd log:
WARN[0481] [FaceMgmt] Unable to create unicast TCP face with URI tcp4://120.53.13.74:6363:Unable to connect to remote endpoint: dial tcp4 :6363->120.53.13.74:6363: bind: address already in use


Thanks a lot.


Guangyu Hao 


------------------ Original ------------------
From:  "XINYU MA"<ma.xinyu.26a at kyoto-u.jp>;
Date:  Thu, Sep 22, 2022 04:22 PM
To:  "郝广宇"<haoguangyu at chorustek.com>; 
Cc:  "nfd-dev"<nfd-dev at lists.cs.ucla.edu>; 
Subject:  Re: [Nfd-dev] YaNFD cannot create TCP face

 

Hello,Thank you for reporting this bug.
It should be fixed by https://github.com/named-data/YaNFD/commit/f7767468f3d4540e468bc0bd5a195066eb2a20d4
Best wishes,
Xinyu Ma.




2022年9月21日(水) 3:00 郝广宇 <haoguangyu at chorustek.com>:

I have a YaNFD issue of that failed with "nfdc face create remote tcp4://X.X.X.X:6363", I read the source code that not tcp supported, the following is the code.
No case of tcpURI? 


// Canonize attempts to canonize the URI, if not already canonical.
func (u *URI) Canonize() error {
 switch u.uriType {
 case devURI, fdURI:
  // Nothing to do to canonize these
 case ethernetURI:
  mac, err := net.ParseMAC(strings.Trim(u.path, "[]"))
  if err != nil {
   return core.ErrNotCanonical
  }
  u.scheme = "ether"
  u.path = mac.String()
  u.port = 0
 case udpURI:
  path := u.path
  zone := ""
  if strings.Contains(u.path, "%") {
   // Has zone, so separate out
   path = u.PathHost()
   zone = "%" + u.PathZone()
  }
  ip := net.ParseIP(strings.Trim(path, "[]"))
  if ip == nil {
   // Resolve DNS
   resolvedIPs, err := net.LookupHost(path)
   if err != nil || len(resolvedIPs) == 0 {
    return core.ErrNotCanonical
   }
   ip = net.ParseIP(resolvedIPs[0])
   if ip == nil {
    return core.ErrNotCanonical
   }
  }


  if ip.To4() != nil {
   u.scheme = "udp4"
   u.path = ip.String() + zone
  } else if ip.To16() != nil {
   u.scheme = "udp6"
   u.path = ip.String() + zone
  } else {
   return core.ErrNotCanonical
  }
 case unixURI:
  u.scheme = "unix"
  testPath := "/" + u.path
  if runtime.GOOS == "windows" {
   testPath = u.path
  }
  fileInfo, err := os.Stat(testPath)
  if err != nil && !os.IsNotExist(err) {
   // File couldn't be opened, but not just because it doesn't exist
   return core.ErrNotCanonical
  } else if err == nil && fileInfo.IsDir() {
   // File is a directory
   return core.ErrNotCanonical
  }
  u.port = 0
 default:
  return core.ErrNotCanonical
 }


 return nil
}

 _______________________________________________
 Nfd-dev mailing list
 Nfd-dev at lists.cs.ucla.edu
 https://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20220926/52244ccc/attachment-0001.html>


More information about the Nfd-dev mailing list