Closed chiangkl closed 4 weeks ago
It looks like a network configuration issue. Is that Windows box ?
Yes, it is a windows 7 box.
The dsn was setup as:- dsn := "sysdba:masterkey@localhost:3050/C:/test/db/A0006.FDB"
Sorry, I don't why, but I think it might have something to do with the netbios settings
Hi, thanks for your work! It works perfect so far! :) I'm also getting this error when using fbEvent.SubscribeChan:
It's from subscriber.go line 168:
if syscall.AF_INET != family {
return -1, nil, 0, fmt.Errorf("unsupported family protocol: %x", family)
}
I suspect the family protocol 17 is actually UDP so I'm guessing the server responds in UDP when trying to make a connAuxRequest().
I can't find anything related to UDP in the official Firebird documentation though :(
I also got this problem on several computers under Windows. It doesn't look like it's related to netbios settings
func (s Subscription) connAuxRequest() (int32, net.IP, int, error) { s.mu.Lock() defer s.mu.Unlock() s.fc.wp.opConnectRequest() auxHandle, _, buf, err := s.fc.wp.opResponse() if err != nil { return -1, nil, 0, err } // family := bytes_to_int16(buf[0:2]) port := binary.BigEndian.Uint16(buf[2:4]) // ip := net.IPv4(buf[4], buf[5], buf[6], buf[7]) ip := net.IPv4(buf[20], buf[21], buf[22], buf[23])
// if syscall.AF_INET != family {
// return -1, nil, 0, fmt.Errorf("unsupported family protocol: %x", family)
// }
return auxHandle, &ip, int(port), nil
}
After the specified changes in the code, everything works fine. I checked under the Windows operating system with Firebird 3 and Firebird 5. I did not check these changes under Linux.
I believe this is fixed in this commit https://github.com/nakagami/firebirdsql/commit/29d18e480b0987fb87fbe7ade66560072601269b Could you try it in master HEAD?
I have very little experience with Golang. Under Windows, the constant syscall.AF_IRDA is unknown. I don't know what dependency to add to the package. If you comment this constant, everything builds and works fine
I understand. Adding AF_IRDA was a simple mistake on my part.
Is this correct? https://github.com/nakagami/firebirdsql/commit/0ec686eba0f9cefc009c437a88bf0f0778c818be
Yes, everything is fine. Thank you so much for your work
Thanks, tagged with v0.9.11 now
I am trying to connect to Firebird to monitor an event, the following code produce error "Unsupported Family Protocol 17". (I am using Firebird 3.0.5)
Is this library work well with Firebird 3.0.5.