Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

File Transfer WriteExact: Socket Error While Writing

Post Reply
TSeiber
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

File Transfer WriteExact: Socket Error While Writing

Post by TSeiber »

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.
Tim Seiber
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: File Transfer WriteExact: Socket Error While Writing

Post by B »

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.
TSeiber
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Post by TSeiber »

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.
Tim Seiber
TSeiber
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Post by TSeiber »

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);
Tim Seiber
TSeiber
Posts: 4
Joined: 2010-07-13 15:14
Location: Spartanburg, SC

Re: File Transfer WriteExact: Socket Error While Writing

Post by TSeiber »

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;
Tim Seiber
Post Reply