简体   繁体   中英

Java socket server make Windows server 2003's network die

I'm developing a socket server/client application by JAVA for server and J2ME for client. Everything was ok when I tested the server in my windows XP. However, then, a serious problem occurred, when I deployed my socket server to server running Windows Server 2003. MY Windows server was lost network connection when my client tried to request a task that require server to send large data. The network connection on server was only saved if I unplugged network cable and plugged it again.

I searched solutions on the Internet and tried many ideas: - refined code: opened and closed connection carefully in the 'finally' block; assigned the order in opening and closing In-OutStream; increased buffer-size; increased java heap size; - reset & fixed Winsock of Server. - declare listening IP for server (Well, my Windows Server has 2 IP: one for Local and other for Internet)

But, unfortunately, everything do not change. My server still die if it must send a large number of data. Did anyone meet the problem like me? Or Do anyone have any idea for me?

Any help is appreciated.

I'd suggest the problem may not be in your Java program. However, to further troubleshoot, I suggest you create a binary search tree graph. Identify the test which can cut the problem area in half, and repeat.

I've seen one issue a long time ago, where large files couldn't be transfered because a terminator was removed from a 10-Base2 network. You could try transferring large files using other software like FTP, checking to make sure the transfer rate makes sense, etc..

You can use ping to send varying sized packets to the Windows 2003 host. You can run a client locally on the server and see if it has the same problem.

You could have a partially failed NIC, router, or ethernet cable. Such was the case at LAX a few years ago.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM