Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-15 Thread Stoyan Stoyanov
Just FYI, the latest version of libnss-ldap (265-3ubuntu2) available for
Ubuntu 15.04 does fix the problem.

Stoyan

On Thu, May 14, 2015 at 11:37 AM, Stoyan Stoyanov stoyan...@gmail.com
wrote:

 Thanks, Tim! I never though of running strace on an interpreted program as
 I was trusting the underlying infrastructure - interpreter, shared
 libraries, kernel - will work flawlessly. Anyway, if I remove ldap from
 the shadow database setting in /etc/nsswitch.conf, it works. No need to
 remove any packages. There are some dated reports regarding a similar issue
 both on this list (
 https://www.mail-archive.com/backuppc-users@lists.sourceforge.net/msg05864.html)
 and here:
 http://grokbase.com/t/centos/centos/08739v6e2j/backuppc-wont-fork-after-centos-5-2-upgrade.
 The second one seems to be related to a bug in the nss-ldap library, but
 this has long been fixed. Besides, the bug related to that last report also
 caused other issues that are not present in my case. Maybe it's a new
 incarnation of the old bug? I'll look through the diffs of the fix back
 then and the current code to try and make sense of it. It is weird that I
 can't reproduce the problem with sample code taken out of the context.

 Stoyan



 On Thu, May 14, 2015 at 4:34 AM, Tim Fletcher t...@night-shade.org.uk
 wrote:

 On 2015-05-14 10:41, Tim Fletcher wrote:

 On 2015-05-13 03:41, Stoyan Stoyanov wrote:

  Hi Holger,

 While it seems like a packaging issue, there are no bug reports on
 launchpad, so I thought maybe someone on this list stumbled upon this
 problem. Unfortunately, nothing gets recorded in the LOG file. I ran perl
 in debug mode, but the program exits right after forking the child process
 so there is nothing really that hints on what the problem might be. Same
 code taken out of the context of the BackupPC script works fine i.e. child
 is forked and doesn't die immediately.

 Stoyan


 Hi Stoyan,

 Does the system that BackupPC fails to start on have ldap configured?

 I have this problem too and was looking at it again following your email,
 I noticed from strace that a called was being made to .ldaprc during
 backuppc startup.

 I have removed all ldap config and packages from the server and backuppc
 now starts correctly.

 I know this isn't a fix but at least it's a step forward.

 I removed libnss-ldap auth-client-config ldap-auth-config
 ldap-auth-client libpam-ldap

 I reran pam-auth-config and disabled the auto creation of home-dirs and
 systemd registration that I had enabled for ldap support.



 Installing ldap-auth-client and it's dependencies stops backuppc starting
 correctly.

 I've attached the output of strace on the service starting up and then
 exiting immediately.

 Tim Fletcher
 t...@night-shade.org.uk


 --
 One dashboard for servers and applications across Physical-Virtual-Cloud
 Widest out-of-the-box monitoring support with 50+ applications
 Performance metrics, stats and reports that give you Actionable Insights
 Deep dive visibility with transaction tracing using APM Insight.
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
 ___
 BackupPC-users mailing list
 BackupPC-users@lists.sourceforge.net
 List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 Wiki:http://backuppc.wiki.sourceforge.net
 Project: http://backuppc.sourceforge.net/



--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-14 Thread Stoyan Stoyanov
Thanks, Tim! I never though of running strace on an interpreted program as
I was trusting the underlying infrastructure - interpreter, shared
libraries, kernel - will work flawlessly. Anyway, if I remove ldap from
the shadow database setting in /etc/nsswitch.conf, it works. No need to
remove any packages. There are some dated reports regarding a similar issue
both on this list (
https://www.mail-archive.com/backuppc-users@lists.sourceforge.net/msg05864.html)
and here:
http://grokbase.com/t/centos/centos/08739v6e2j/backuppc-wont-fork-after-centos-5-2-upgrade.
The second one seems to be related to a bug in the nss-ldap library, but
this has long been fixed. Besides, the bug related to that last report also
caused other issues that are not present in my case. Maybe it's a new
incarnation of the old bug? I'll look through the diffs of the fix back
then and the current code to try and make sense of it. It is weird that I
can't reproduce the problem with sample code taken out of the context.

Stoyan



On Thu, May 14, 2015 at 4:34 AM, Tim Fletcher t...@night-shade.org.uk
wrote:

 On 2015-05-14 10:41, Tim Fletcher wrote:

 On 2015-05-13 03:41, Stoyan Stoyanov wrote:

  Hi Holger,

 While it seems like a packaging issue, there are no bug reports on
 launchpad, so I thought maybe someone on this list stumbled upon this
 problem. Unfortunately, nothing gets recorded in the LOG file. I ran perl
 in debug mode, but the program exits right after forking the child process
 so there is nothing really that hints on what the problem might be. Same
 code taken out of the context of the BackupPC script works fine i.e. child
 is forked and doesn't die immediately.

 Stoyan


 Hi Stoyan,

 Does the system that BackupPC fails to start on have ldap configured?

 I have this problem too and was looking at it again following your email,
 I noticed from strace that a called was being made to .ldaprc during
 backuppc startup.

 I have removed all ldap config and packages from the server and backuppc
 now starts correctly.

 I know this isn't a fix but at least it's a step forward.

 I removed libnss-ldap auth-client-config ldap-auth-config ldap-auth-client
 libpam-ldap

 I reran pam-auth-config and disabled the auto creation of home-dirs and
 systemd registration that I had enabled for ldap support.



 Installing ldap-auth-client and it's dependencies stops backuppc starting
 correctly.

 I've attached the output of strace on the service starting up and then
 exiting immediately.

 Tim Fletcher
 t...@night-shade.org.uk


 --
 One dashboard for servers and applications across Physical-Virtual-Cloud
 Widest out-of-the-box monitoring support with 50+ applications
 Performance metrics, stats and reports that give you Actionable Insights
 Deep dive visibility with transaction tracing using APM Insight.
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
 ___
 BackupPC-users mailing list
 BackupPC-users@lists.sourceforge.net
 List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 Wiki:http://backuppc.wiki.sourceforge.net
 Project: http://backuppc.sourceforge.net/


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-14 Thread Tim Fletcher
 

On 2015-05-13 03:41, Stoyan Stoyanov wrote: 

 Hi Holger, 
 While it seems like a packaging issue, there are no bug reports on launchpad, 
 so I thought maybe someone on this list stumbled upon this problem. 
 Unfortunately, nothing gets recorded in the LOG file. I ran perl in debug 
 mode, but the program exits right after forking the child process so there is 
 nothing really that hints on what the problem might be. Same code taken out 
 of the context of the BackupPC script works fine i.e. child is forked and 
 doesn't die immediately. 
 
 Stoyan

Hi Stoyan, 

Does the system that BackupPC fails to start on have ldap configured? 

I have this problem too and was looking at it again following your
email, I noticed from strace that a called was being made to .ldaprc
during backuppc startup. 

I have removed all ldap config and packages from the server and backuppc
now starts correctly. 

I know this isn't a fix but at least it's a step forward. 

I removed libnss-ldap auth-client-config ldap-auth-config
ldap-auth-client libpam-ldap

I reran pam-auth-config and disabled the auto creation of home-dirs and
systemd registration that I had enabled for ldap support. 

Tim Fletcher
 t...@night-shade.org.uk --
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-12 Thread Stoyan Stoyanov
Hi Holger,

While it seems like a packaging issue, there are no bug reports on
launchpad, so I thought maybe someone on this list stumbled upon this
problem. Unfortunately, nothing gets recorded in the LOG file. I ran perl
in debug mode, but the program exits right after forking the child process
so there is nothing really that hints on what the problem might be. Same
code taken out of the context of the BackupPC script works fine i.e. child
is forked and doesn't die immediately.

Stoyan

On Tue, May 12, 2015 at 5:28 PM, Holger Parplies wb...@parplies.de wrote:

 Hi,

 (many people wrote many things at many times, but I won't quote them due to
 top posting - sorry) ...

 while this seems to be an Ubuntu packaging problem, strictly, so really the
 wrong list, I do wonder if the relevant log file contains anything ...

 Regards,
 Holger

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-12 Thread Holger Parplies
Hi,

(many people wrote many things at many times, but I won't quote them due to
top posting - sorry) ...

while this seems to be an Ubuntu packaging problem, strictly, so really the
wrong list, I do wonder if the relevant log file contains anything ...

Regards,
Holger

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-12 Thread Stoyan Stoyanov
There is no RunDir setting. Here are all the *Dir settings:

$Conf{TopDir}  = '/var/lib/backuppc';
$Conf{ConfDir} = '/etc/backuppc';
$Conf{LogDir}  = '/var/lib/backuppc/log';
$Conf{InstallDir}  = '/usr/share/backuppc';
$Conf{CgiDir}  = '/usr/share/backuppc/cgi-bin';


On Tue, May 12, 2015 at 3:37 PM, Stephen step...@physics.unc.edu wrote:

 What's the value of $Conf{RunDir} in your config.pl? /var/run/backuppc ?

 On Tue, 12 May 2015, Stoyan Stoyanov wrote:

  Thank you for your reply, Steven, but the init script doesn't seem to be
 the problem in this case. At this point, I'm invoking the
 BackupPC executable manually with the -d option and not creating a PID
 file. The init script though that comes with the Ubuntu
 package seems to do the right thing:

 if [ ! -d /var/run/backuppc ]; then
 mkdir /var/run/backuppc
 chown backuppc:backuppc /var/run/backuppc
 fi
 ...
 start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid ...

 Any other ideas?

 Thanks,
 Stoyan


 On Tue, May 12, 2015 at 7:11 AM, Stephen step...@physics.unc.edu wrote:
   Hi Stoyan,

   Not sure if it is the same problem as you're having, but I had a
 similar symptom when using the default 'debian-backuppc'
   init script on Ubuntu 14.04; I am using BackupPC 4.0.0a3.

   By default the directory where the pid file is stored
 (/var/run/BackupPC) doesn't exist. The attached file shows my diff
   to the init script. The script in 3.3.0 may need the same or
 similar changes.

   Hth,
   Stephen

   On Mon, 11 May 2015, Stoyan Stoyanov wrote:

 Hello,

 After upgrading from Ubuntu 12.04 (backuppc 3.2.1-2ubuntu1.1)
 to Ubuntu
 14.04 (backuppc 3.3.0-1ubuntu1), BackupPC no longer starts in
 daemon mode.
 It runs fine in foreground though. I tried with a fresh
 server install and
 still the same thing. The child dies immediately after being
 forked and
 exits when the parent process exits. Here's what it looks
 like if I add
 sleep 60; right after forking the child process and before
 the parent
 exiting exit if ($pid);

 backuppc 16074 15421  0 15:55 pts/30   00:00:00 /usr/bin/perl
 -w
 /usr/share/backuppc/bin/BackupPC -d
 backuppc 16076 16074  0 15:55 pts/30   00:00:00 [BackupPC]
 defunct

 Same piece of code works fine if extracted and used by
 itself. Is there
 anyone running BackupPC on Ubuntu 14.04 having the same
 problem?

 Thanks,
 Stoyan




--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-12 Thread Stephen

Hi Stoyan,

Not sure if it is the same problem as you're having, but I had a similar 
symptom when using the default 'debian-backuppc' init script on Ubuntu 
14.04; I am using BackupPC 4.0.0a3.


By default the directory where the pid file is stored (/var/run/BackupPC) 
doesn't exist. The attached file shows my diff to the init script. The 
script in 3.3.0 may need the same or similar changes.


Hth,
Stephen

On Mon, 11 May 2015, Stoyan Stoyanov wrote:


Hello,

After upgrading from Ubuntu 12.04 (backuppc 3.2.1-2ubuntu1.1) to Ubuntu
14.04 (backuppc 3.3.0-1ubuntu1), BackupPC no longer starts in daemon mode.
It runs fine in foreground though. I tried with a fresh server install and
still the same thing. The child dies immediately after being forked and
exits when the parent process exits. Here's what it looks like if I add
sleep 60; right after forking the child process and before the parent
exiting exit if ($pid);

backuppc 16074 15421  0 15:55 pts/30   00:00:00 /usr/bin/perl -w
/usr/share/backuppc/bin/BackupPC -d
backuppc 16076 16074  0 15:55 pts/30   00:00:00 [BackupPC] defunct

Same piece of code works fine if extracted and used by itself. Is there
anyone running BackupPC on Ubuntu 14.04 having the same problem?

Thanks,
Stoyan

--- /opt/src/backuppc_build/BackupPC-4.0.0alpha3/init.d/debian-backuppc	2015-04-09 16:02:53.759115841 -0400
+++ ./BackupPC	2015-05-12 08:33:13.816060131 -0400
@@ -24,7 +24,9 @@
 BINDIR=/opt/BackupPC/bin
 DATADIR=/srv/BackupPC
 LOGDIR=/var/log/BackupPC
+RUNDIR=/var/run/BackupPC
 USER=backuppc
+GROUP=backuppc
 #
 NAME=backuppc
 DAEMON=BackupPC
@@ -34,27 +36,31 @@
 case $1 in
   start)
 echo -n Starting $NAME: 
-start-stop-daemon --start --pidfile $LOGDIR/BackupPC.pid \
+if [ ! -d ${RUNDIR} ]; then
+mkdir ${RUNDIR}
+chown ${USER}:${GROUP} ${RUNDIR}
+fi
+start-stop-daemon --start --pidfile $RUNDIR/BackupPC.pid \
 			-c $USER --exec $BINDIR/$DAEMON -- -d
 echo ok.
 ;;
   stop)
 echo -n Stopping $NAME: 
-start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
+start-stop-daemon --stop --pidfile $RUNDIR/BackupPC.pid -u $USER \
 			--oknodo --retry 30 -x /usr/bin/perl
 echo ok.
   ;;
   restart)
 echo -n Restarting $NAME: 
-start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
+start-stop-daemon --stop --pidfile $RUNDIR/BackupPC.pid -u $USER \
 			--oknodo --retry 30 -x /usr/bin/perl
-start-stop-daemon --start --pidfile $LOGDIR/BackupPC.pid \
+start-stop-daemon --start --pidfile $RUNDIR/BackupPC.pid \
 			-c $USER --exec $BINDIR/$DAEMON -- -d
 echo ok.
 ;;
   reload|force-reload)
 echo Reloading $NAME configuration files
-start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid \
+start-stop-daemon --stop --pidfile $RUNDIR/BackupPC.pid \
 			--signal 1 -x /usr/bin/perl
 ;;
   *)
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-12 Thread Stoyan Stoyanov
Thank you for your reply, Steven, but the init script doesn't seem to be
the problem in this case. At this point, I'm invoking the BackupPC
executable manually with the -d option and not creating a PID file. The
init script though that comes with the Ubuntu package seems to do the right
thing:

if [ ! -d /var/run/backuppc ]; then
mkdir /var/run/backuppc
chown backuppc:backuppc /var/run/backuppc
fi
...
start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid ...

Any other ideas?

Thanks,
Stoyan


On Tue, May 12, 2015 at 7:11 AM, Stephen step...@physics.unc.edu wrote:

 Hi Stoyan,

 Not sure if it is the same problem as you're having, but I had a similar
 symptom when using the default 'debian-backuppc' init script on Ubuntu
 14.04; I am using BackupPC 4.0.0a3.

 By default the directory where the pid file is stored (/var/run/BackupPC)
 doesn't exist. The attached file shows my diff to the init script. The
 script in 3.3.0 may need the same or similar changes.

 Hth,
 Stephen

 On Mon, 11 May 2015, Stoyan Stoyanov wrote:

  Hello,

 After upgrading from Ubuntu 12.04 (backuppc 3.2.1-2ubuntu1.1) to Ubuntu
 14.04 (backuppc 3.3.0-1ubuntu1), BackupPC no longer starts in daemon mode.
 It runs fine in foreground though. I tried with a fresh server install and
 still the same thing. The child dies immediately after being forked and
 exits when the parent process exits. Here's what it looks like if I add
 sleep 60; right after forking the child process and before the parent
 exiting exit if ($pid);

 backuppc 16074 15421  0 15:55 pts/30   00:00:00 /usr/bin/perl -w
 /usr/share/backuppc/bin/BackupPC -d
 backuppc 16076 16074  0 15:55 pts/30   00:00:00 [BackupPC] defunct

 Same piece of code works fine if extracted and used by itself. Is there
 anyone running BackupPC on Ubuntu 14.04 having the same problem?

 Thanks,
 Stoyan


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] BackupPC fails to start in daemon mode on Ubuntu 14.04

2015-05-11 Thread Stoyan Stoyanov
Hello,

After upgrading from Ubuntu 12.04 (backuppc 3.2.1-2ubuntu1.1) to Ubuntu
14.04 (backuppc 3.3.0-1ubuntu1), BackupPC no longer starts in daemon mode.
It runs fine in foreground though. I tried with a fresh server install and
still the same thing. The child dies immediately after being forked and
exits when the parent process exits. Here's what it looks like if I add
sleep 60; right after forking the child process and before the parent
exiting exit if ($pid);

backuppc 16074 15421  0 15:55 pts/30   00:00:00 /usr/bin/perl -w
/usr/share/backuppc/bin/BackupPC -d
backuppc 16076 16074  0 15:55 pts/30   00:00:00 [BackupPC] defunct

Same piece of code works fine if extracted and used by itself. Is there
anyone running BackupPC on Ubuntu 14.04 having the same problem?

Thanks,
Stoyan
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/