• April 25, 2024, 11:53:33 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)  (Read 25775 times)

irotjaf

  • Level 2 Member
  • **
  • Posts: 51

Hi all,

Today an annoying message started to appear on the BitTorrent "DOWNLOADS" list.
"Connection to server failed" (firmware 1.08)

When clicking the "Retry" button I can briefly see the download and upload speeds changing, but the error comes up suddenly after. This makes impossible to use the webpage so BitTorrent is not usable.

I couldn't find any solution around, therefore I looked into the problem myself. The solution is to do exactly what the "Retry" button does (refresh the torrent list, which probably involves the creation of a new connection between the web script and the server daemon). In brief, to fix the problem:

1. Edit the file /Volume_1/Nas_Prog/BT/webui/fe02.asp
2. Find two statements like this:

   if (failedRequest(request)) {
      showConnectionError();
      return;
   }


and replace them with this

   if (failedRequest(request)) {
      torrentsRefresh();
   }


3. Save
4. Refresh the webpage to see the result.



P.s. To edit the files you should have telnet access (that is fun_plug installed). Either use the "vi" editor from command line or "chmod 777 fe02.asp", edit it with notepad, and "chmod 744 fe02.asp" back.

Hope this helps!

---------------
There is another way to get around the problem. It involves changing the refresh rate to a value below 0.5 seconds. To do this change this line:
   torrentsRefreshTimeout = setTimeout("torrentsRefresh()", sdkCtl.refreshFreq);
into this:
   torrentsRefreshTimeout = setTimeout("torrentsRefresh()", 400);

THIS SOLUTION WILL CAUSE THE LOAD OF DNS-323 TO GO UP FAST. That means each time you open that web page to work with BitTorrent, you are loading the machine with a lot of unnecessary work. The default refresh rate is 5000 (5 seconds) and is set in "btsdk.js" file.
--------------

P.s.2 Somebody correct me if I am wrong for anything.
« Last Edit: June 17, 2010, 05:35:33 PM by irotjaf »
Logged

OlegMZ

  • Level 2 Member
  • **
  • Posts: 50
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #1 on: June 17, 2010, 06:46:28 PM »

WOW! Great info! Thanks!
I did not think that this is made by scripts. It really bugs me, and is getting much worse when I have several torrents at the same time with many peers. Besides NAS performance drops dramatically - too much connections to process.
But this message is really annoying and useless to my mind. Auto refresh is much better.
Logged

galex9

  • Level 1 Member
  • *
  • Posts: 2
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #2 on: October 26, 2010, 03:34:44 PM »

Hi irotjaf,

I have a similar problem, even though with FW 1.09.
The error "Connection to server failed" pops up when switching between BT pages, and sometimes "Retry" button is "frozen" and has no effect.

Would it work if I edit this script (fe02.asp or btsdk.js) in Windows.
I can access the DNS and able to open the file in Notepad, but wonder if the file saved in Windows be recognized as a valid one in Linux of DNS.

Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #3 on: October 27, 2010, 03:23:43 AM »

I can access the DNS and able to open the file in Notepad, but wonder if the file saved in Windows be recognized as a valid one in Linux of DNS.

Unlike Linux shell scripts which require Linux line endings - you can get away with either with asp/php files.
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

galex9

  • Level 1 Member
  • *
  • Posts: 2
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #4 on: October 30, 2010, 03:16:23 PM »

I have tried to edit the files from Windows, however the DNS won't let me to overwrite the edited files.
If you know the solution for Windows, it is much appreciated.

In addition I have installed Ubuntu on my laptop to use telnet as suggested.
I typed "telnet -l admin 192.168.10.100", but I get "Unable to connect to remote host".

I am a complete newbie on Linux, so I am not sure what to do when I get "connection refused".

Do I need to install fun_plug on DNS-323? Is there step by step instructions somewhere?
Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #5 on: October 30, 2010, 05:53:49 PM »

Whatever file it is on the NAS you are trying to edit is likely only available to the root account of the NAS.

To have access to telnet on the NAS, you will likely want to install Fonz Fun Plug.

This is a third party modification unsupported by Dlink.

http://nas-tweaks.net/CH3SNAS:Tutorials/fun_plug
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

koolzero

  • Level 1 Member
  • *
  • Posts: 3
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #6 on: November 01, 2010, 06:24:29 AM »

I've had my dns 323 for about a month and mine just started doing this yesterday afternoon; I have firmware 1.09.  It seems like once it starts happening I can no longer log into the configuration page on my dlink but I can still access the folders.  If I restart the dlink by using the power button I can then go into the torrent setup page for just a moment and then it will say connection failed again.

Is there any other way to edit this file without installing the fun plug?
« Last Edit: November 01, 2010, 09:26:41 AM by koolzero »
Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #7 on: November 01, 2010, 11:01:28 AM »

You could create a fun_plug script to replace the file, but really if you're not in to Linux your best bet would just be to install funplug, even if temporarily. I don't know if the suggested modification will work as I don't use it myself.
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

koolzero

  • Level 1 Member
  • *
  • Posts: 3
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #8 on: November 01, 2010, 05:38:35 PM »

ok I installed the fun plug but i can't figure out when I telnet in to get to the root of the volume_1.  I can get to the root of ffp but i can't figure out how to go back one more level.  If you could walk me through what to do that would greatly appreciated.
Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #9 on: November 02, 2010, 03:03:15 AM »

ok I installed the fun plug but i can't figure out when I telnet in to get to the root of the volume_1.  I can get to the root of ffp but i can't figure out how to go back one more level.  If you could walk me through what to do that would greatly appreciated.

Shouldn't really be posting this here - use at your own risk.

Code: [Select]
cd /mnt/HD_a2/Nas_Prog/BT/webui
chmod 777 fe02.asp
(edit the file in Windows is easiest here)
chmod 744 fe02.asp
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

koolzero

  • Level 1 Member
  • *
  • Posts: 3
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #10 on: November 02, 2010, 05:45:48 PM »

Awesome.  Thanks for your help.
Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #11 on: November 03, 2010, 07:22:51 AM »

No probs. Did it fix your problem?
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

grantpeters

  • Level 1 Member
  • *
  • Posts: 3
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #12 on: November 05, 2011, 06:38:32 PM »

*****************************

*************************************************************************

Its obvious from the posting, that the only solution is to install an UNSUPPORTED fix, the fun_plug so that you can HACK the code that DLink should fix.  Then after you manually fix the BUG, then uninstall the HACK so that your still supported.

***********************************************************************
******************************
« Last Edit: August 15, 2013, 04:30:29 AM by JavaLawyer »
Logged

Arkram

  • Level 1 Member
  • *
  • Posts: 1
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #13 on: December 26, 2012, 05:33:51 AM »

CONFIGURATION -> ADVANCED -> ADDITIONAL COMPONENTS -> "STOP" and after "START"

"Connection to server failed" not appared more.
Logged

saegera

  • Level 1 Member
  • *
  • Posts: 1
Re: Fixed error "Connection to server failed" for BitTorrent (fw 1.08)
« Reply #14 on: August 15, 2013, 01:46:55 AM »

The first change proposed by irotjaf worked for me! I did the change with WinSCP on Windows!
Logged
Pages: [1] 2