witq

Problems with the ARM build on a WD My Book World NAS

Recommended Posts

Hi.

Today I tried running btsync on said NAS and well... it doesn't work.

uname -a sais:


Linux MyBookWorld 2.6.24.4 #1 Thu Apr 1 16:43:58 CST 2010 armv5tejl unknown

I downloaded and extracted the binary, granted it the correct permissions and it runs good until I try to open the webui. It loads incompletly (fails to load all the images and css and js files) and then btsync crashes.

I enabled debugging but the only thing that appears in the log is this:


[20130327 19:35:19] NAT-PMP: Unable to map port with NAT-PMP.

That's weird, because I forwarded the port to the device myself and disabled automatic port mapping in the config:


{
"device_name": "My Sync Device",
"listening_port" : 8888,
"check_for_updates" : true,
"use_upnp" : false,
"download_limit" : 0,
"upload_limit" : 0,
"webui" :
{
"listen" : "0.0.0.0:8888",
"login" : "admin",
"password" : "password"
}
}

I can confirm the port is forwarded correctly, because I can acces the webui from a remote computer.

Is there anything I can try to make it work? I'd really like to set up a connection between two NAS devices and use it as offsite backup :)

Share this post


Link to post
Share on other sites

Pretty sure the issue is the fact that you have the webUI and the listening port on the same port. They're two different things, one is for the webUI and one is for the data distribution and synchronization.

Here's my example configuration:-

cat /mnt/user/Appdata/bitTorrentSync/sync.conf
{
"device_name": "Tower US",
"listening_port" : 47525, // 0 - randomize port

/* storage_path dir contains auxilliary app files
if no storage_path field: .sync dir created in the directory
where binary is located.
otherwise user-defined directory will be used
*/
"storage_path" : "/mnt/user/Appdata/bitTorrentSync/",

// uncomment next line if you want to set location of pid file
// "pid_file" : "/var/run/syncapp/syncapp.pid",


"check_for_updates" : true,
"use_upnp" : false, // use UPnP for port mapping


/* limits in kB/s
0 - no limit
*/
"download_limit" : 0,
"upload_limit" : 0,

/* remove "listen" field to disable WebUI
remove "login" and "password" fields to disable credentials check
*/
"webui" :
{
"listen" : "0.0.0.0:8085",
"login" : "abc",
"password" : "def"
}

/* !!! if you set shared folders in config file WebUI will be DISABLED !!!
shared directories specified in config file
override the folders previously added from WebUI.
*/
/*
,
"shared_folders" :
[
{
// use --generate-secret in command line to create new secret
"secret" : "MY_SECRET_1", // * required field
"dir" : "/home/user/bittorrent/sync_test", // * required field

// use relay server when direct connection fails
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
// enable sync trash to store files deleted on remote devices
"use_sync_trash" : true,
// specify hosts to attempt connection without additional search
"known_hosts" :
[
"192.168.1.2:44444",
"myhost.com:6881"
]
}
]
*/

// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.

}

Yeah, I know I still have all the default commented out code, but, sue me.

Share this post


Link to post
Share on other sites

Thank you for your suggetsions, I tried changing the listening port but btsync stil crashes when i try to open the webui. To be more specific: I put the address in my browser and it does kind of work on the first try: it either sais "invalid request" or displays the interface partially (as I said earlier). Then, when I try to load the page again, btsync crashes. This is what I found in the log:



[20130327 21:49:06] NAT-PMP: Unable to map port with NAT-PMP.
[20130327 21:49:19] HTTP: IP 195.22.96.73: GET /gui/
[20130327 21:49:24] HTTP: IP 195.22.96.73: GET /gui/
[20130327 21:49:24] HTTP: IP 195.22.96.73: GET /gui/jquery-1.8.3.js
[20130327 21:49:24] HTTP: IP 195.22.96.73: GET /gui/jqueryFileTree.js

I also tried enabling upnp and setting the listening port to random (0) but that made the app even more crash-happy - it now crashes the first time I try to load the webui.

Edited by witq

Share this post


Link to post
Share on other sites

Now I tried running it with the --nodaemon flag and it still crashes, but I got a new message:


./btsync: relocation error: ./btsync: symbol __res_iclose, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

So I guess there is something wrong with the system I'm trying to run on and I shouldn't be bothering you guys :)

Share this post


Link to post
Share on other sites

Or because, well, you know, you want to port forward it without DMZing your whole bloody server.

well i said you don't have to! unless its blocked or SOMETHING.

because he changed both the GUI and the BTSync client's ports to same one, so i didn't want to consider that he doesn't know what he is doing but wanted to help him just in case.

Share this post


Link to post
Share on other sites

well i said you don't have to! unless its blocked or SOMETHING.

because he changed both the GUI and the BTSync client's ports to same one, so i didn't want to consider that he doesn't know what he is doing but wanted to help him just in case.

For connections to enter your box you need your NAT to know "device A wants all packets on protocol B coming in on port C" (Most basic, more advanced systems allow different IP ranges to be located to different devices, allow regex, mathematics, xor, etc...), if the port you're using keeps changing then how on earth will you port forward each port? Unless:-

A. You DMZ it, which, I wouldn't recommend unless you know what you're doing

B. You use UPnP, which has loads of issues (Feel free to google for them)

C. Code a script to constantly update your NAT device

All three of those aren't really the best options.

Share this post


Link to post
Share on other sites

Well, clearly my poor choice of ports isn't the case as changing them didn't help. In the meantime I tried running Sync on a Synology 110j and it works great. Is there anything else I can try?

Share this post


Link to post
Share on other sites

I have a similar problem on my QNAP TS-109 Pro II.

uname -a:

Linux QNAP-TS-109-P2 2.6.12.6-arm1 #1 Sun Sep 18 01:42:37 CST 2011 armv5tejl unknown

btsync.conf:

{

"device_name": "QNAP-BTSync",

"listening_port": 0,

"storage_path": "/home/btsync/.sync",

"pid_file": "/var/run/btsync.pid",

"check_for_updates": true,

"use_upnp": true,

"download_limit": 0,

"upload_limit": 0

,

"webui": {

"listen": "0.0.0.0:8888",

"login": "admin",

"password": "password"

}

}

When I typed the wrong username/password the log-file prompted:

[20130402 21:01:13] HTTP: IP 10.0.0.252: Bad username/password

When I typed the right username/password the btsync processes died even before logging the first GET request. The Javascripts and images are not loaded.

Share this post


Link to post
Share on other sites

I still get the log message: "NAT-PMP: Unable to map port with NAT-PMP."

Which UDP/TCP ports on the router/firewall do I have to open to prevent this with a standard configuartion?

Since I can't get the webinterface up and running, the only place I can toggle portnumbers etc. is in the btsync.conf file.

I'm now running btsync version 1.0.128.

Share this post


Link to post
Share on other sites

It does kind of work on the first try: it either sais "invalid request" or displays the interface partially (as I said earlier). Then, when I try to load the page again, btsync crashes.

Now I tried running it with the --nodaemon flag and it still crashes, but I got a new message:


./btsync: relocation error: ./btsync: symbol __res_iclose, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Exactly the same problem on my QNAP TS-409. :(

Share this post


Link to post
Share on other sites

To all of those running NAS who seem to be running into this issue, I would attempt to reinstall glibc, remove BTSync and all of it's files, re-download and attempt again.


./btsync: relocation error: ./btsync: symbol __res_iclose, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

I can't be too sure without playing with the device in front of me, but it would seem that maybe the version of glibc that comes with these devices could be outdated. The latest version is 2.17.


ldd --version

Run the above command to version check.

Share this post


Link to post
Share on other sites

Yes, this is the same behavior for me & WD My Book World ed, v2 White Lights.

Does someone know how to unpack the webgui.zip from MBWE? I get "has more than one entry--rest ignored".

RE the relocation error: I ran "LD_DEBUG=bindings ./btsync 2>&1" and all the bindings "seem" to match. I notice various references to the error from many different applications, suggesting to me that libc.so.6 is NOT the problem--though this is not my area of John Hodgman--err, expertise.

Very disappointing debug output.

Are these empty *.dmp files of any value in working this problem?

Is the problem simply that MBWE uses BusyBox instead of a "proper" linux??

Share this post


Link to post
Share on other sites

RE the relocation error: I ran "LD_DEBUG=bindings ./btsync 2>&1" and all the bindings "seem" to match. I notice various references to the error from many different applications, suggesting to me that libc.so.6 is NOT the problem--though this is not my area of John Hodgman--err, expertise.

Or maybe I don't understand LD_DEBUG.

I tried uncommenting the "share_folders" in the config file. First run, the the threads stay alive and the sync.log reports "MY_SECRET_1" is not a valid secret. I use the command-line to generate a secret and use this in the config file.

Now, the threads die and stderr reports "./btsync: relocation error: ./btsync: symbol inotify_init, version GLIBC_2.4 not defined in file libc.so.6 with link time reference"

So, I run "LD_DEBUG=bindings ./btsync | grep inotify". Nothing. This is why I'm thinking LD_DEBUG=bindings only shows SUCCESSFULLY bound symbols.... :(

Share this post


Link to post
Share on other sites

It was fun reading about this today, but I am no closer to a solution per se.

I am wondering if the problem stems from MBWE using uClibc instead of glibc. If this turns out true, perhaps we can get a build with static links for the shared objects missing from uClibc (our MBWE version of libc.so.6).

On the other hand, I have other software that uses iNotify (a symbol apparently missing in my libc.so.6). Have they static linked the object code? Or is there another explanation?

Share this post


Link to post
Share on other sites

There have been no comments from the developers so far. So I think devices having these problems are considered "unsupported".

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.