File Transfer WriteExact: Socket Error While Writing

File Transfer WriteExact: Socket Error While Writing

Postby TSeiber » 2010-07-13 15:58

After upgrading to uvnc 1.0.8.2 we are seeing many cases when we can't tranfer files from the server pc back to the viewer. When we start the file transfer it transfers a few packets then locks up. Eventually the File Transfer screen closes and displays the "WriteExact: Socket Error While Writing" message. When we check the destination folder we see the !UVNCPFT-<filename> file with partial content. This only seems to occur when we get files from a server. We can send files with no problems. Most of our client pc's are on a private VSAT network. We suspect that the issue might be due to the high latency inherent to the network, however our prior version of uvnc (1.0.0 RC18) works fine. (We have stopped upgrading clients to the new version pending a resolution to this problem.) The problem only occurs when using the 1.0.8.2 version on the server and the viewer. File transfers between a 1.0.8.2 viewer and a 1.0.0 RC18 server work without issue.
TSeiber
 
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Postby B » 2010-07-13 16:40

Well, until someone intimately familiar with the code chimes in, you might want to try 1.0.8.0 instead. 1.0.8.2 has several documented problems, although file transfer / protocol issues aren't exactly one of them. There's a a timing issue regarding repeater registrations, but it doesn't seem likely to be related to your timing issue.
B
Super-Mod
Super-Mod
 
Posts: 2347
Joined: 2009-09-09 14:05

Re: File Transfer WriteExact: Socket Error While Writing

Postby TSeiber » 2010-07-15 14:18

After reviewing release notes etc. I'm wondering if the tcp timeout logic that was implemented to avoid a endless loop during file transfer (I'm thinking around v 1.0.5 something) has the timeout set a little to low. I haven't found where/if that setting is configurable or not. I would like to double the timeout and see if that addresses the issue.
TSeiber
 
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Postby TSeiber » 2010-07-19 22:01

After looking through the source, it looks like the timeout setting in ultravnc.ini is the "FileTransferTimeout" which defaults to 30. I'm guessing that is milliseconds and that it is capped ad 60ms. Which might be the source of the problem given that VSAT networks typically have from 500ms to 1,500ms latency. Does anyone know why the limit is capped at 60? (See the code snippet from vncproperities.cpp below)


From vncserver.cpp

237 m_ftTimeout = FT_RECV_TIMEOUT;
238 m_keepAliveInterval = KEEPALIVE_INTERVAL;


void vncServer::SetFTTimeout(int msecs)
2511 {
2512 m_ftTimeout = msecs;
2513 }


From vncProperities.cpp


2345 m_ftTimeout = myIniFile.ReadInt("admin", "FileTransferTimeout", m_ftTimeout);
2346 if (m_ftTimeout > 60)
2347 m_ftTimeout = 60;
2348
2349 m_keepAliveInterval = myIniFile.ReadInt("admin", "KeepAliveInterval", m_keepAliveInterval);
2350 if (m_keepAliveInterval >= (m_ftTimeout - KEEPALIVE_HEADROOM))
2351 m_keepAliveInterval = m_ftTimeout - KEEPALIVE_HEADROOM;
2352
2353 m_server->SetFTTimeout(m_ftTimeout);
2354 m_server->SetKeepAliveInterval(m_keepAliveInterval);
TSeiber
 
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Postby TSeiber » 2010-07-20 14:05

Maybe the FileTransferTimeout setting is actually seconds instead of milliseconds?

From vncclient.cpp


Code: Select all
case rfbFileChecksums:
     m_socket->SetSendTimeout(m_server->GetFTTimeout()*1000);
     connected = m_client->ReceiveDestinationFileChecksums(Swap32IfLE(msg.ft.size), Swap32IfLE(msg.ft.length));
break;
TSeiber
 
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC


Return to 1.0.8.X (stable)

Who is online

Users browsing this forum: No registered users and 3 guests

cron