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
Add Firebird Event fails with error "While isc_que_events - Failed to establish a secondary connection for event processing." [CORE5902] #6160
Comments
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Commented by: @hvlad Should be fixed now |
Commented by: Marcio Reis (mreis1) Awesome. Thank you Vlad. |
Commented by: @hvlad Unfortunately, we have no snapshot builds for MacOS, so you have to wait for the next official release of 3.0.4 |
Commented by: @hvlad Could you test with both client and server version 3.0.4 ? |
Commented by: Marcio Reis (mreis1) Server (Windows 10) has firebird 3.0.4 installed. If there are any additional tests I can perform to help detecting the cause of this issue, please let me know. |
Commented by: @hvlad Any messages in firebird.log ? Check at both sides - client and server. |
Commented by: Marcio Reis (mreis1) Just checked both, server and clients logs and there's nothing on them. "While isc_que_events - Unable to complete network request to host "192.168.0.195". |
Modified by: Marcio Reis (mreis1)Version: 3.0.4 [ 10863 ] |
Commented by: Sean Leyne (seanleyne) Marcio, The error suggests that your latest problem could be MacOS internal firewall settings? (Event processing uses a different TCP port from the database connection) |
Commented by: Marcio Reis (mreis1) Both server and client are running with no firewalls on. Same for antivirus. |
Commented by: Marcio Reis (mreis1) Hello guys, is there any news on in issue? |
Commented by: @hvlad I'm afraid i can do nothing - i have no Mac to build and debug Firebird and you can't build Firebird (on Mac) by yourself to try some tracing... |
Commented by: @asfernandes Accordingly to https://gist.github.com/cyberroadie/3490843, MacOS definition for sockaddr is: And in Linux https://github.com/torvalds/linux/blob/master/include/linux/socket.h and probably the same in Windows as they work with each other: Of course this cause errors when MacOS client/server is different than server/client and we use sa_data struct to transfer the address from server to client. I believe the server should send to client only the port number and the client should use the same original address information (more the port) to reconnect to server. Opinions? |
Commented by: @hvlad Server send full address (family, port and IP address) to the client so the client behind the NAT could know real IP of server endpoint. Probably, client should analyze length of server response to distinguish MacOS from Windows\Linux ? |
Commented by: @asfernandes > Server send full address (family, port and IP address) to the client so the client behind the NAT could know real IP of server endpoint. IMO this causes more issues than benefits. If server is behind NAT, it probably can't listen directly to client. To locate the server the client should use the same host/address originally used for the main connection, and of course the NAT should redirect to the same machine. |
Commented by: @hvlad Hmm, it seems it is even worse: MacOS: #ifndef _SA_FAMILY_T ... Windows: typedef USHORT ADDRESS_FAMILY; typedef struct sockaddr { #if (_WIN32_WINNT < 0x0600)
} SOCKADDR, *PSOCKADDR, FAR *LPSOCKADDR; I.e. sizeof(sockaddr) will be equal on MacOS and Windows, but MacOS keep family value at second byte, while Windows - at first one |
Commented by: @hvlad > If server is behind NAT, it probably can't listen directly to client. > To locate the server the client should use the same host/address originally used for the main connection, and of course the NAT should redirect to the same machine. If send port only - how do you offer to preserve compatibility of old (new) client with new (old) server ? |
Commented by: @asfernandes For compatibility, we should anyway decode sockaddr knowing it could be from a different OS. > Server alread accept database attachment from client, so - it can listen ;) No, in case of NAT, it will be redirected from the public IP to the private one. The private one could not listen directly. It's the same as used in web. Client (browser) should only use the public host while in most cases there is a load balancer redirecting to internal IPs. The difference for Firebird is that there is not a load balancer redirecting to multiple IPs, but possibily to a single one. I don't see any reason to try to use the address sent by the server. |
Commented by: @hvlad You right, client uses only port from server response (see aux_connect()). |
Commented by: @asfernandes > But i still not see how do you going to preserve compatibility. I'm preparing a pull request for review. |
Commented by: @asfernandes Márcio, please test this using the next Windows snapshot in the server. No need to update MacOS client. |
Modified by: @asfernandesassignee: Vlad Khorsun [ hvlad ] => Adriano dos Santos Fernandes [ asfernandes ] status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.5 [ 10885 ] Fix Version: 4.0 Beta 2 [ 10888 ] |
Commented by: Marcio Reis (mreis1) Adriano, I can confirm... latest windows snapshot fixes this issue! I'm so happy for this. Thank you :) |
Modified by: Marcio Reis (mreis1)Attachment: 2019-11-14_09-35-04.png [ 13401 ] |
Submitted by: Marcio Reis (mreis1)
Is duplicated by CORE5967
Attachments:
2019-11-14_09-35-04.png
I think this problem is related to an old issue reported in here: CORE5498
In my tests I tried:
- client app running in mac os (where FB 3.0.3 is installed) establish a connection to remote DBMS (KO - fails with the above error)
- client app running in windows (where FB 3.0.3 is installed) os establish a connection to remote DBMS (OK)
- client app running in windows connects to a DBMS running locally. (OK)
- client app running in mac os connects to a DBMS running locally (OK)
Same was happening in Firebird 3.0.2.
What do you think?
Commits: 21cdc0a c8a8ad6 e5bbfad 5af5f6a
The text was updated successfully, but these errors were encountered: