Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btsync: Can't install 1.4 on Ubuntu 14.04 Server #163

Open
petertgiles opened this issue Oct 1, 2014 · 18 comments
Open

btsync: Can't install 1.4 on Ubuntu 14.04 Server #163

petertgiles opened this issue Oct 1, 2014 · 18 comments

Comments

@petertgiles
Copy link

Hi Leo,
I'm using the PPA on Ubuntu Server 14.04 and am not able to install the 1.4 update. Things hang on the "Preconfiguring packages" part. It was running OK on the previous version. I tried removing and readding the package but it is still stuck.

peter@homeserver:~$ sudo apt-get install btsync
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
btsync
0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.
Need to get 0 B/77.6 kB of archives.
After this operation, 290 kB of additional disk space will be used.
Preconfiguring packages ...

I'm not getting the configuration wizard like I did before.

peter@homeserver:~apt-cache policy btsync
btsync:
Installed: (none)
Candidate: 1.4.0-4
Version table:
1.4.0-4 0
500 http://ppa.launchpad.net/tuxpoldo/btsync/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status

Thanks for the help. I'm sure it's something dumb I'm doing.

@JulianKahnert
Copy link

I've got the same problem.

@tuxpoldo
Copy link
Owner

tuxpoldo commented Dec 6, 2014

I tried to reproduce that situation with a Ubuntu 14.04 Server freshly installed with YeaSoft/uic. This Ubuntu Server is really minimal: it contains the packages created by debootstrap plus ubuntu-minimal, busybox, dnsutils, host, ftp, ssh and extlinux.

Result: the installation went perfectly:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  btsync-common
Suggested packages:
  bind-shim
The following NEW packages will be installed:
  btsync btsync-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,013 kB of archives.
After this operation, 6,946 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/tuxpoldo/btsync/ubuntu/ trusty/main btsync-common amd64 1.4.103-1 [3,935 kB]
Get:2 http://ppa.launchpad.net/tuxpoldo/btsync/ubuntu/ trusty/main btsync all 1.4.0-4 [77.6 kB]
Fetched 4,013 kB in 1s (3,801 kB/s)
Preconfiguring packages ...
Selecting previously unselected package btsync-common.
(Reading database ... 44539 files and directories currently installed.)
Preparing to unpack .../btsync-common_1.4.103-1_amd64.deb ...
Unpacking btsync-common (1.4.103-1) ...
Selecting previously unselected package btsync.
Preparing to unpack .../btsync_1.4.0-4_all.deb ...
Unpacking btsync (1.4.0-4) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up btsync-common (1.4.103-1) ...
Setting up btsync (1.4.0-4) ...
 * Autostarting btsync instance 'debconf-default'                                                                     [ OK ]
Processing triggers for ureadahead (0.100.0-16) ...

The output of uname -a:

Linux ubuntu 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I will close this issue, but perhaps you may provide some additional information. In this case I will reopen the Issue.

@tuxpoldo tuxpoldo closed this as completed Dec 6, 2014
@almilli
Copy link

almilli commented Mar 10, 2015

I'm running into this same issue. I'm running in a server/headless environment.

Linux myhostname 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty


Here's is what I see up until it hangs:
The following extra packages will be installed:
btsync-common
Suggested packages:
bind-shim
The following NEW packages will be installed:
btsync btsync-common
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 4,218 kB of archives.
After this operation, 7,187 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://debian.yeasoft.net/btsync/ trusty/main btsync-common amd64 1.4.111-1 [4,136 kB]
Get:2 http://debian.yeasoft.net/btsync/ trusty/main btsync all 1.4.1-1 [81.6 kB]
Fetched 4,218 kB in 1min 19s (53.0 kB/s)
Preconfiguring packages ...

@tuxpoldo tuxpoldo reopened this Mar 16, 2015
@tuxpoldo
Copy link
Owner

I have the suspicion, that on some Ubuntu 14.04 the creation of the certificate fails. Can you please try the following on the command line and tell me what happens? Copy the entire block and paste it.

openssl req -newkey rsa:2048  -x509 -days 3652.5 -nodes -rand /dev/urandom -out deleteme.crt -keyout deleteme.key <<+
.
.
.
BitTorrent Sync
Administration Interface
localhost
root@localhost
+

  • Do you get any error message?
  • Does openssl return to the command prompt?
  • Are the files deleteme.crt and deleteme.key created?

@almilli
Copy link

almilli commented Mar 16, 2015

Hi. I ran that command. it doesn't finish with the <<+ part on the end. It just goes to a new line with a > and waits forever until I ctrl-c. It hasn't created either file after I ctrl-c. If I take off the <<+ it starts prompting me for the details of the certificate. Hope that helps.

# openssl req -newkey rsa:2048  -x509 -days 3652.5 -nodes -rand /dev/urandom -out deleteme.crt -keyout deleteme.key <<+
>

@tuxpoldo
Copy link
Owner

Please copy and paste the entire block (including the last line containing only a + sign). After the line containing only a +, hit the Enter-Key again.

@almilli
Copy link

almilli commented Mar 16, 2015

oops. my bad. I didn't realize I missed that part. It does complete successfully and does create the two files.

# openssl req -newkey rsa:2048  -x509 -days 3652.5 -nodes -rand /dev/urandom -out deleteme.crt -keyout deleteme.key <<+
> .
> .
> .
> BitTorrent Sync
> Administration Interface
> localhost
> root@localhost
> +
Generating a 2048 bit RSA private key
.........................................................................................+++
.+++
writing new private key to 'deleteme.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:Email Address []:# ls
deleteme.crt  deleteme.key

@tuxpoldo
Copy link
Owner

Mhhhh... that's strange. I do not understand it. It hangs but there is absolutely no reason why it hangs. And it happens only in a few cases... I will try to prepare a debug version of the package, that we can run on your machine. Please stay tuned. I will contact you in a few days.

@tuxpoldo
Copy link
Owner

You can try another thing: launch the installation and while it is stuck in Preconfiguring packages ... open a second console and issue the command:

ps fax

and send me the output. Perhaps we may see in which command it is stuck...

@almilli
Copy link

almilli commented Mar 17, 2015

Here is the relevant section of that output

14933 pts/0    S      0:00  |                   \_ -su
14947 pts/0    S+     0:00  |                       \_ apt-get install btsync
14953 pts/0    Z+     0:00  |                           \_ [dpkg] <defunct>
14954 pts/0    S+     0:00  |                           \_ /bin/sh -c /usr/sbin/dpkg-preconfigure --apt || true
14955 pts/0    S+     0:11  |                               \_ /usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt
14961 pts/0    Z+     0:00  |                                   \_ [dpkg-preconfigu] <defunct>
14968 pts/0    S+     0:05  |                                   \_ /bin/sh -e /tmp/btsync.config.qEj4Ud configure

@almilli
Copy link

almilli commented Mar 17, 2015

I ran this command to monitor the system calls of a process "strace -p $pid -s 1024" and got this output:

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22413
close(5)                                = 0
read(4, "0\n", 128)                     = 2
read(4, "", 128)                        = 0
close(4)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22413, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 22413
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22414
close(5)                                = 0
read(4, "19\n", 128)                    = 3
read(4, "", 128)                        = 0
close(4)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22414, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 22414
stat("/data/public/btsync", 0x7fff3bc23670) = -1 ENOENT (No such file or directory)
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "INPUT high btsync/directory_root\n", 33) = 33
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "3", 1)                         = 1
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "q", 1)                         = 1
read(0, "u", 1)                         = 1
read(0, "e", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "o", 1)                         = 1
read(0, "n", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "k", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "e", 1)                         = 1
read(0, "d", 1)                         = 1
read(0, "\n", 1)                        = 1
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "GO \n", 4)                    = 4
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "o", 1)                         = 1
read(0, "k", 1)                         = 1
read(0, "\n", 1)                        = 1
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "GET btsync/directory_root\n", 26) = 26
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "d", 1)                         = 1
read(0, "a", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "a", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "u", 1)                         = 1
read(0, "b", 1)                         = 1
read(0, "l", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "c", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "b", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "y", 1)                         = 1
read(0, "n", 1)                         = 1
read(0, "c", 1)                         = 1
read(0, "\n", 1)                        = 1
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22415
close(5)                                = 0
read(4, "0\n", 128)                     = 2
read(4, "", 128)                        = 0
close(4)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22415, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 22415
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22416
close(5)                                = 0
read(4, "19\n", 128)                    = 3
read(4, "", 128)                        = 0
close(4)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22416, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 22416
stat("/data/public/btsync", 0x7fff3bc23670) = -1 ENOENT (No such file or directory)
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "INPUT high btsync/directory_root\n", 33) = 33
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "3", 1)                         = 1
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "q", 1)                         = 1
read(0, "u", 1)                         = 1
read(0, "e", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "o", 1)                         = 1
read(0, "n", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "k", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "e", 1)                         = 1
read(0, "d", 1)                         = 1
read(0, "\n", 1)                        = 1
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "GO \n", 4)                    = 4
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "o", 1)                         = 1
read(0, "k", 1)                         = 1
read(0, "\n", 1)                        = 1
fcntl(1, F_DUPFD, 10)                   = 11
close(1)                                = 0
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0
dup2(3, 1)                              = 1
write(1, "GET btsync/directory_root\n", 26) = 26
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "d", 1)                         = 1
read(0, "a", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "a", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "u", 1)                         = 1
read(0, "b", 1)                         = 1
read(0, "l", 1)                         = 1
read(0, "i", 1)                         = 1
read(0, "c", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "b", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "y", 1)                         = 1
read(0, "n", 1)                         = 1
read(0, "c", 1)                         = 1
read(0, "\n", 1)                        = 1
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22417
close(5)                                = 0
read(4, "0\n", 128)                     = 2
read(4, "", 128)                        = 0
close(4)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22417, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 22417
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8944426a10) = 22418
close(5)                                = 0
read(4, ^CProcess 14968 detached
 <detached ...>

It looks like it's writing out to a stream "INPUT high btsync/directory_root\n" and reading in "30 question skipped" repeatedly. It's also writing out "GET btsync/directory_root\n" and reading "0 /data/public/btsync" during the loop. I looked and that folder or file doesn't exist in the /data/public directory. BTW, the /data/public directory is my own partition where I save my data files. Maybe the issue is with using relative paths somewhere so it's looking in the wrong directory.

@tuxpoldo
Copy link
Owner

OK - This is an interesting information. I think we will get it. But today I will have no time to fix it. Tomorrow you will have a chance...

@peerlow
Copy link

peerlow commented Jul 24, 2015

I had the same issue installing btsync, it got stalled in the preconfiguring... stage.

Running the strace command for the process
/bin/sh -e /tmp/btsync.config.qEj4Ud configure
gave me the output pasted below, repeatedly, time after time.

I created manually the /opt/btsync directory, and the preconfiguring stage unstuck. Everything installed OK after that.

write(1, "GET btsync/directory_root\n", 26) = 26
dup2(11, 1)                             = 1
close(11)                               = 0
read(0, "0", 1)                         = 1
read(0, " ", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "o", 1)                         = 1
read(0, "p", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "/", 1)                         = 1
read(0, "b", 1)                         = 1
read(0, "t", 1)                         = 1
read(0, "s", 1)                         = 1
read(0, "y", 1)                         = 1
read(0, "n", 1)                         = 1
read(0, "c", 1)                         = 1
read(0, "\n", 1)                        = 1
pipe([4, 5])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f3532a14a10) = 26257
close(5)                                = 0
read(4, "0\n", 128)                     = 2
read(4, "", 128)                        = 0
close(4)                                = 0          
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 26257
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26257, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn()                          = 26257
pipe(^CProcess 2041 detached
 <detached ...>

@ofir-petrushka
Copy link

@tuxpoldo any progress on this?

@maxdec
Copy link

maxdec commented Oct 27, 2015

👍 I'm also facing this issue on Ubuntu 14.04.3 LTS

Edit: ok I was facing the same issue that #184. I had already installed then removed btsync a few months ago. Recreating the previous sync folder allowed me to continue the installation (in my case mkdir ~/btsync).

@jerik
Copy link

jerik commented Jan 2, 2016

I faced the same problem. I previously installed btsync removed it and the reinstallation stalls at Preconfiguring packages ....

I solved it with: echo PURGE | debconf-communicate btsync, see http://serverfault.com/a/332490

It seems that some configurations from the first installation process are stored in debconf, which leads to this ambiguous behaviour.

@jandechent
Copy link

I had this error like forever, "echo PURGE | debconf-communicate btsync" did the job! Thanks @jerik

@jerik
Copy link

jerik commented Jan 15, 2016

@jandechent you're welcome. Good to know that it helped someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants