You are not logged in.
Hi everyone. I recently jumped into Arch and got everything running how I like it. SystemD rocks!!! The only small hiccup is configuring BTSync (or maybe my iptables). I get an error message when I check status using systemctl and it reports that it is unable to map port using UPnP.
I'm using btsync 1.2.73-2 from the AUR and firewalld as my firewall configuration manager. The btsync section of the wiki doesn't cover this and I was able to get it running on Debian on the same hardware. I read that Arch has most of the ports closed by default so that's where I started my search. Any tips or pointers would be greatly appreciated. Thanks, and I hope one day to pay it forward.
[axed@Roc ~]$ sudo systemctl status btsync@axed
btsync@axed.service - Bittorent Sync service for axed
Loaded: loaded (/usr/lib/systemd/system/btsync@.service; enabled)
Active: active (running) since Sun 2013-11-17 17:52:23 EST; 2h 5min ago
Main PID: 6070 (btsync)
CGroup: /system.slice/system-btsync.slice/btsync@axed.service
`-6070 /usr/bin/btsync --config /home/axed/.config/btsync/btsync.conf --nodaemon
Nov 17 19:33:34 Roc btsync[6070]: Using IP address 10.0.1.29
Nov 17 19:33:38 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:33:43 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:33:48 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:33:53 Roc btsync[6070]: UPnP: Unable to map port 10.0.1.29:8086 with UPnP.
Nov 17 19:53:57 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:54:02 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:54:07 Roc btsync[6070]: UPnP: Could not map UPnP Port on this pass, retrying.
Nov 17 19:54:12 Roc btsync[6070]: UPnP: Unable to map port 10.0.1.29:8086 with UPnP.
Nov 17 19:57:21 Roc systemd[1]: Started Bittorent Sync service for axed.
Last edited by ImperfectLink (2013-11-18 13:23:22)
Offline
Can you paste the service file you are using and your btsync config file (with any sensitive information removed) if you are using one, or the network settings in the Web UI?
FWIW: it works fine for me on multiple Arch boxes with no changes to my firewall rules.
Offline
Thanks for your speedy reply Jason. Currently my WebUI has 8086 with UPnP turned on though I've tried it both ways.
Here is my config:
/*
* Configuration file for BitTorrent sync.
*/
{
"device_name" : "axed@Roc",
"listening_port" : 8086, // 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" : "/home/axed/.btsync",
// uncomment next line if you want to set location of pid file
// "pid_file" : "/var/run/btsync/btsync.pid",
"check_for_updates" : true,
"use_upnp" : true, // 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:8889",
"login" : "axed",
"password" : "******"
}
/* !!! 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" : "***********************", // * required field
"dir" : "/home/btsync", // * required field
// use relay server when direct connection fails
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
// enable SyncArchive 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"
]
}
]
*/
// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.
}
Again, a sincere thanks for your time.
Edit: Sorry forgot the service file info. I'm not sure where to find it so I'll do a little research.
Last edited by ImperfectLink (2013-11-18 01:23:08)
Offline
Your conf looks OK. The service file will be /usr/lib/systemd/system/btsync@.service
Offline
[Unit]
Description=Bittorent Sync service for %i
After=network.target
[Service]
User=%i
ExecStart=/usr/bin/btsync --config %h/.config/btsync/btsync.conf --nodaemon
Restart=on-abort
[Install]
WantedBy=multi-user.target
Offline
You are missing the Type of service and also (inexplicably, but maybe not relevantly) are starting it in non-daemon mode: is there a reason for that?
[Unit]
Description=BitTorrent Sync service for %i
After=network.target
[Service]
Type=forking
User=%i
ExecStart=/usr/local/bin/btsync --config %h/.config/Syncapp/sync.conf
Restart=on-abort
PIDFile=%h/.config/Syncapp/.sync.pid
[Install]
WantedBy=multi-user.target
Offline
I modified the config generated by btsync-autoconfig from the AUR.
Offline
@jasonwryan, recently on the systemd-devel mailing list, someone was asking about getting help with a service file. It was said that the Type=forking should be used only if necessary, and is the "messiest" situation. I can't remember the specifics, but I actually think that this change should not be a problem. Still, ImperfectLink, maybe you should try with the default service file (though i don't think that it would necessarily have any bearing on UPnP functioanlity).
Offline
@jasonwryan, recently on the systemd-devel mailing list, someone was asking about getting help with a service file.
WW: thanks, I'll give it a try.
Offline
I removed btsync-autoconfig via pacman then backed my btsync.conf and copied the default one over it and edited the locations. Still unable to map port.
Tried switching PID but no good either.
Offline
You should probably check that UpnP is enabled on your router. I made that mistake when I switched routers recently....
Scott
I have btsync running on Mac, Win7 and Debian. I assume there has to be some config I'm missing in Arch.
Offline
What happens if you (briefly) disable firewalld?
Offline
I'm not sure what I did but i removed everything and installed btsync another time without the autoconfig and then ran it and after that installed the autoconfig and ran it. It seems to be running although I havent seen ti sync anything yet.
Edit:Yep it's working. Thanks for your help guys. I still don't know what actually fixed it...
Last edited by ImperfectLink (2013-11-18 03:34:34)
Offline
Maybe your upnp on your router got confused with different OS's on the same Mac or IP address.
Don't forget to mark the thread as solved
Last edited by jrussell (2013-11-18 13:05:37)
bitcoin: 1G62YGRFkMDwhGr5T5YGovfsxLx44eZo7U
Offline
Thanks for the reminder jrussel. I looked over the config again and really the only things I did was to specify the listening port, change the PID to one in the user directory and turn off the --nodaemon flag. After that I just reloaded daemons and started the service. Perhaps it was the router.
Last edited by ImperfectLink (2013-11-18 13:28:31)
Offline
Yes, I can confirm, had the same problem but the issue here was with the UPnP being disabled on the router.
Offline