-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Christian Andersson wrote:
Hi there, I have a friend that is running mysql 4.10 gamma on his windows XP machine and he is having problem with an java application that uses jdbc to connect to mysql..
from what I coudl see it sometimes worked and it sometimes did not work... why I had no idea... but after digging somewhat in the code, I found en exception that was catched but not reported, the exception was as follows...
java.sql.SQLEXception: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1535)
at ...
huh, the application could not connect to the database?
why? and why is this so inconsistent? sometimes he can connect and sometimes he cannot?
the server and the application is running on the same computer, and he is using "localhost" to connect to...
I have read something about all XP and how ports can be used (about 4000 free of them?) beeing used.. but would that not be a bindException then and not an connectException?
Nope. Bind exceptions come when you are creating a server. ConnectExceptions come when the target refuses a connection. This looks exactly like the Windows XP low-number-of-ephmereal ports problem.
And i hardly think that the computer has used over 4000 ports within 4 minutes..
This is across _all_ applications using TCP/IP on the machine. It would be very easy to use 4000 ports if you accidently are creating lots of new connections...I can do it in 30 seconds or so. Also, the connections take up to 4 minutes to clear, so if you make a couple hundred of them, stop your program, start it up again, etc, you can have this happen.
[snip]
-Mark
- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/
For technical support contracts, visit https://order.mysql.com/?ref=mmma
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiD8DBQE+ezSatvXNTca6JD8RAjUzAKCJuO9CqYoTEiId51/U1eGAojMR0wCgxi36 3X4KTO5Yt2YgBQdbpzoFaPk= =62aQ -----END PGP SIGNATURE-----
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
