I'm using SQL ANywhere 12. I have set up a mirror DB and I would like to access it by using the server name (primaries) on both Mobilink and Tomcat (jcon 3). I can access the DB by server name no problem when the firewalls are disabled. however as soon as I turn on the firewalls (I already have exclusions for the server/mobilink ports 2638/2439), I can only access my mirror DB by specifying full URLs: For example, with Firewalls off, I can use: - Tomcat: url="jdbc:sybase:Tds:asdf?ALTERNATE_SERVER_NAME=primaries - Mobilink (ODBC): I just enter user/pass and server name (primaries) However, if I enabled Firewalls, I have to speficy both DB servers URLs to connect: - Tomcat: url="jdbc:sybase:Tds:DB1_URL:2638,DB2_URL:2638" - Mobilink (ODBC): I have to enter user/pass, host (DB1_URL:2638,DB2_URL:2638) Generally, I don't mind, however, in the case of Tomcat, I find that if both DBs are up and DB_1 is the mirror, then Tomcat will always connect to it, and since DB_1 is mirror, access is read-only causing issues when I try to do DB updates. Thus, I would like to know why when my firewalls are up, the use of the 'server name' does not work (I presume it is because I'm missing extra ports I have to open). Thanks. asked 18 Dec '17, 13:19 fieldworker |
Do you need to use jConnect or would the SQL Anywhere JDBC driver do, as well? I guess the latter is easier to configure for HA setups as it can use the common SQL Anywhere connection parameters, i.e. those used in the HA samples.
Hi Volker, I would like to keep using the jconn3 driver if possible to minimize changes on my current setup
I do not use jConnect myself, but if you use the alternate server name (which is of course very reasonable in a HA setup!) , AFAIK host and port info is ignored, and an UDP broadcast is needed to locate the according server. I guess your firewall does block that broadcast...
Note, that is just wild guessing...
Sorry for the late reply. Got sidetracked with other project stuff, So Volker, by chance, do you know which UDP port this is?
AFAIK it uses the same ports for UDP as for TCP, by default 2638. On Windows, you can check via netstat -a -b -p UDP and look for the dbsrv12.exe.
Still I think using the SA JDBC driver would prevent the need to use broadcasts...