Serious Connectivity Bug
Serious Connectivity Bug
Hi,
My AT&T DSL connection went out today as the same time all the OD applications on every computer in the office could not connect to the MySQL server that's located in the same office. It took me a day of trouble shootings to figure out that the two issues are related. I'm running version 7.6.36 and that version seems to require an internet connection in order for OD to connect to a 'local' MySQL server on the LAN. When I roll back to an old version 7.3.9, it works fine without the internet connection. I was able to replicate this issue at home with versions 7.6.36 and 7.8.25 by disconnecting from the internet after removing the cable between the router and the modem.
Something was changed after version 7.3.9 that if there is no internet connection, OD will return an error "A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond" at the Choose Database screen.
Unfortunately I have been using 7.6.36 for a while now so I can't roll back to and earlier version with the old data and my DSL service is still down at office. I'm going back to pens and papers until my DSL is back up or this bug is fixed somehow. There shouldn't be a reason for OD to stop working within the LAN when the internet is down.
My AT&T DSL connection went out today as the same time all the OD applications on every computer in the office could not connect to the MySQL server that's located in the same office. It took me a day of trouble shootings to figure out that the two issues are related. I'm running version 7.6.36 and that version seems to require an internet connection in order for OD to connect to a 'local' MySQL server on the LAN. When I roll back to an old version 7.3.9, it works fine without the internet connection. I was able to replicate this issue at home with versions 7.6.36 and 7.8.25 by disconnecting from the internet after removing the cable between the router and the modem.
Something was changed after version 7.3.9 that if there is no internet connection, OD will return an error "A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond" at the Choose Database screen.
Unfortunately I have been using 7.6.36 for a while now so I can't roll back to and earlier version with the old data and my DSL service is still down at office. I'm going back to pens and papers until my DSL is back up or this bug is fixed somehow. There shouldn't be a reason for OD to stop working within the LAN when the internet is down.
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
OD does not require an internet connection. It sounds more like a DNS issue. In other words, the IP addresses may not be getting resolved properly on your network. Try using the IP address of your server in the Choose Database window until you can get your DNS issues worked out.
For example, it is common to use your gateway (aka cable modem) as your DNS server. It internally stores some DNS info, and it passes some requests to a DNS server higher up. So if you disconnect your cable modem from your LAN, then of course your DNS will be affected, because it's handling internal LAN DNS as well. I'll bet if you had disconnected your coaxial cable from your cable modem that OD would still have worked fine even without the internet connection.
For example, it is common to use your gateway (aka cable modem) as your DNS server. It internally stores some DNS info, and it passes some requests to a DNS server higher up. So if you disconnect your cable modem from your LAN, then of course your DNS will be affected, because it's handling internal LAN DNS as well. I'll bet if you had disconnected your coaxial cable from your cable modem that OD would still have worked fine even without the internet connection.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Serious Connectivity Bug
I did try with entering the IP at the choose Database Screen, and got the same error for versions > 7.6.36. Version 7.3.9 works either with hostname or IP of MySQL server.
Re: Serious Connectivity Bug
The IP/hostname of the MySQL server is reacheable from any of the computers running OD because I'm able to ping it and all the Samba mounts of the A-Z folders on the DB server are accessible from all the computers. I don't rely on DNS for LAN, I use hosts file to resolve names.
Are there any new services like web service/mobile that need internet connection causing the error at the choose Database Screen?
Are there any new services like web service/mobile that need internet connection causing the error at the choose Database Screen?
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
Sorry, I got distracted in the middle of editing my last reply. No, there are no web services at all involved in the Choose Database window. Try right click, Run as Admin. Suspect username/password issues with the mysql server if you are using Linux and did not, therefore, install the grant tables using our installer.
I'm trying to think what changed between those two versions. I will have to do some research.
I'm trying to think what changed between those two versions. I will have to do some research.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
We did change to a newer version of the MySQL connector. That's the program that connects Open Dental to the database. So the behavior is sometimes a little different. Are you using Linux for your mysql server? What version of mysql?
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Serious Connectivity Bug
I'm running MySQL 5.0.51 on Linux.
I granted "ALL PRIVILEGES ON *.*" for the OD DB user. I don't think it's a permission issue else version 7.3.9 would have the same problem.
Do you have a setup where a separate MySQL server and multiple OD apps sitting on the same switch in the lab where you can test without an internet connection?
I granted "ALL PRIVILEGES ON *.*" for the OD DB user. I don't think it's a permission issue else version 7.3.9 would have the same problem.
Do you have a setup where a separate MySQL server and multiple OD apps sitting on the same switch in the lab where you can test without an internet connection?
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
Are you on support with us?
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Serious Connectivity Bug
I am rubbing it in. Switch to Macs -- osx is pretty close to linux but Apple has kind of worked out most network issues if you use their 'expensive' hardware. The time you are now spending fixing your network issues is costing you time and money. Vertical integration may cost you, but at least you don't run into too many issues such as yours. Buy a Mac. Save yourself the headaches. (and yes, get into the support contract with open dental -- they are really nice and helpful -- good luck)
Re: Serious Connectivity Bug
No, I don't have support.
My DSL is back up and OD is happy again.
I did install a network sniffer to troubleshoot the issue. Didn't see any internet outbound traffic from OD on the Choose Database screen. Also scanned through the code in FormChooseDatabase.cs and DataConnection.cs, nothing in there jumped out either. In addition those files haven't been modified since Dec 2010, so there shouldn't be any recent bugs.
One thing I did noticed from the package sniffer was that in the working scenarios (v7.3.9 with internet on/off, v7.6.36 with internet on), after the MySQL server greeting, OD issued a login request with the credentials (see packages below). In the failed scenario (v7.6.36 with internet off), OD didn't issued a login request after the greeting, that was why I automatically got the Choose Database screen even though NoShowOnStartup == true. Since OD wasn't able to connect to the MySQL, the routine string[] GetDatabases() in FormChooseDatabase.cs didn't return me a list of databases to choose from in the Choose Database screen.
33 20.036929 192.168.1.129 192.168.1.111 MySQL 115 Server Greeting proto=10 version=5.0.51a-log
34 20.045320 192.168.1.111 192.168.1.129 MySQL 126 Login Request user=xxx db=opendental
It might be related to the new MySQL connector. I don't know yet. I did tried to compile v7.6.36 with the old connector from 7.3.9, but there were too many errors since the v7.6.36 uses some of the new features in the new connector.
The reality is all my other clients (sql+, java, sql editor) on the same machine as OD are able to connect to the 'opendental' database without an internet connection, but not OD. I'll post my updates if I find anything new, hopefully before my next internet outage.
My DSL is back up and OD is happy again.
I did install a network sniffer to troubleshoot the issue. Didn't see any internet outbound traffic from OD on the Choose Database screen. Also scanned through the code in FormChooseDatabase.cs and DataConnection.cs, nothing in there jumped out either. In addition those files haven't been modified since Dec 2010, so there shouldn't be any recent bugs.
One thing I did noticed from the package sniffer was that in the working scenarios (v7.3.9 with internet on/off, v7.6.36 with internet on), after the MySQL server greeting, OD issued a login request with the credentials (see packages below). In the failed scenario (v7.6.36 with internet off), OD didn't issued a login request after the greeting, that was why I automatically got the Choose Database screen even though NoShowOnStartup == true. Since OD wasn't able to connect to the MySQL, the routine string[] GetDatabases() in FormChooseDatabase.cs didn't return me a list of databases to choose from in the Choose Database screen.
33 20.036929 192.168.1.129 192.168.1.111 MySQL 115 Server Greeting proto=10 version=5.0.51a-log
34 20.045320 192.168.1.111 192.168.1.129 MySQL 126 Login Request user=xxx db=opendental
It might be related to the new MySQL connector. I don't know yet. I did tried to compile v7.6.36 with the old connector from 7.3.9, but there were too many errors since the v7.6.36 uses some of the new features in the new connector.
The reality is all my other clients (sql+, java, sql editor) on the same machine as OD are able to connect to the 'opendental' database without an internet connection, but not OD. I'll post my updates if I find anything new, hopefully before my next internet outage.
Re: Serious Connectivity Bug
I have no trouble running OD with a linux server w/o internet.
steve
steve
steve
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
The reason I asked about support, in case you didn't already figure it out, is that we just don't have time to try to duplicate a problem that only one customer is having unless that customer is on support.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Serious Connectivity Bug
Which is why I go back on support again. Heh heh.
[img]C:\Users\Roy%20Bloom%20DDS\Pictures\Roy.jpg[/img]
Roy Bloom DDS
General Dentist Providing IV Sedation and Oral Surgery for Your Patients at Your Practice.
http://sedationoncall.com
http://drbloom.com
Roy Bloom DDS
General Dentist Providing IV Sedation and Oral Surgery for Your Patients at Your Practice.
http://sedationoncall.com
http://drbloom.com
Re: Serious Connectivity Bug
I found out the problem and a solution. It was a tough one to crack.
When there is no internet connection, the packet sniffer shows that opendental and mysql server communication is more chatty. It takes a longer to connect, about 30 seconds. The first sql command that Choose Database screen runs is "SHOW DATABASE" and that is failing. So I tried MySqlConnection.Open() to test the connection and that failed also. It indicated that the connection timeout was too short. I suspected a big version jump in the mysql connector from version 1.0.9.0/OD-7.3.9 to 6.2.4.0/OD-7.6.36 is the cause. It could be the new version is slower to establish the connection or the default connection setting is too low.
The solution is to add a property "Connection Timeout=60" to connectStr of BuildSimpleConnectionString(DatabaseType pDbType,string pServer,string pDatabase,string pUserID,string pPassword) in DataConnection.cs. A timeout of 30 seconds would have been enough, but I want to be a little on the safe side and use 6o seconds instead. After getting pass the Choose Database screen and logging in, OD runs normally.
Hope this help those who run into similar issue in the future.
When there is no internet connection, the packet sniffer shows that opendental and mysql server communication is more chatty. It takes a longer to connect, about 30 seconds. The first sql command that Choose Database screen runs is "SHOW DATABASE" and that is failing. So I tried MySqlConnection.Open() to test the connection and that failed also. It indicated that the connection timeout was too short. I suspected a big version jump in the mysql connector from version 1.0.9.0/OD-7.3.9 to 6.2.4.0/OD-7.6.36 is the cause. It could be the new version is slower to establish the connection or the default connection setting is too low.
The solution is to add a property "Connection Timeout=60" to connectStr of BuildSimpleConnectionString(DatabaseType pDbType,string pServer,string pDatabase,string pUserID,string pPassword) in DataConnection.cs. A timeout of 30 seconds would have been enough, but I want to be a little on the safe side and use 6o seconds instead. After getting pass the Choose Database screen and logging in, OD runs normally.
Hope this help those who run into similar issue in the future.
- jordansparks
- Site Admin
- Posts: 5758
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Serious Connectivity Bug
It shouldn't take that long. The underlying problem is still there, and I think it's specific to your situation somehow.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com