Hi Graig,
Thank your for your help.
After some check it seemed that changing the owner of /var/run/backuppc
resolved partially the issues . I don't know much why the socket was
created in /var/log/Backuppc but after removing the backuppc.socket in this
directory, backuppc was able to create the file in the correct directory.
Anyway, as I say, changing the owner of /var/run/backuppc resolved the
problem partially. To make the service work I had to change the file
backuppc in rc.d.
I don't understand why it worked before but after changing the file
everything seems to be ok.
Before :
root@backup:/ # cat /usr/local/etc/rc.d/backuppc-back
#!/bin/sh
# PROVIDE: backuppc
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable BackupPC:
# backuppc_enable="YES"
. /etc/rc.subr
name="backuppc"
rcvar=backuppc_enable
load_rc_config $name
: ${backuppc_enable:="NO"}
: ${backuppc_flags:="-d"}
: ${backuppc_user:="backuppc"}
: ${backuppc_group:="backuppc"}
: ${backuppc_config:="/usr/local/etc/backuppc/config.pl"}
command_interpreter="/usr/local/bin/perl"
command="/usr/local/bin/BackupPC"
required_files="${backuppc_config}"
pidfile="/var/run/BackupPC/BackupPC.pid"
run_rc_command "$1"
AFTER:
root@backup:/ # cat /usr/local/etc/rc.d/backuppc
#!/bin/sh
# PROVIDE: backuppc
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Copy to /usr/local/etc/rc.d/backuppc and make execuatble
#
# Add the following line to /etc/rc.conf to enable BackupPC:
# backuppc_enable=(bool): Set to "NO" by default.
# Set it to "YES" to enable BackupPC.
#
# Example:
#
# backuppc_enable="YES"
#
# It accepts : start, stop, restart, reload, status
#
# Provided by : Gabriel Rossetti
#
. /etc/rc.subr
name="backuppc"
rcvar=`set_rcvar`
start_cmd="backuppc_start"
restart_cmd="backuppc_restart"
stop_cmd="backuppc_stop"
status_cmd="backuppc_status"
reload_cmd="backuppc_reload"
load_rc_config $name
eval "${rcvar}=\${${rcvar}:-'NO'}"
: ${backuppc_enable="NO"}
#backuppc_enable=${backuppc_enable:-"NO"}
backuppc_start()
{
su backuppc -c '/usr/local/bin/BackupPC -d'
echo "${name} started"
}
backuppc_restart()
{
backuppc_stop
sleep 1
backuppc_start
}
backuppc_stop()
{
/usr/bin/pkill -f "/usr/local/bin/BackupPC -d"
echo "${name} stopped"
}
backuppc_status()
{
if [ "`ps ax | grep "BackupPC -d" | grep perl`" = "" ] ; then
echo "${name} not running"
else
echo "${name} running"
fi
}
backuppc_reload()
{
/usr/bin/pkill -1 -f "/usr/local/bin/BackupPC -d"
echo "${name} reloaded"
}
extra_commands="reload status"
run_rc_command "$1"
PS : I upgraded to backuppc 4.1.4.1 during troubleshooting because I though
it was version mismatch ( but it wasn't) and continue the debug with this
version.
So now after completing the two step describe above, it's seems that it
work.
Regards,
Hari
2018-01-18 20:52 GMT+03:00 Craig Barratt via BackupPC-users <
[email protected]>:
> The bind() is trying to create a socket in $Conf{RunDir}. It's likely
> that directory doesn't exist, or isn't writeable by BackupPC. Try
> something like this as root (replace /var/run/BackupPC with whatever your
> $Conf{RunDir} is set to):
>
> mkdir /var/run/BackupPC
> chown backuppc /var/run/BackupPC
>
> chmod 755 /var/run/BackupPC
>
>
> This is something that /usr/local/etc/rc.d/backuppc should do. Also, I'll
> improve that error message.
>
> Craig
>
> On Wed, Jan 17, 2018 at 11:30 PM, RAKOTONDRAINIBE Harimino Lalatiana <
> [email protected]> wrote:
>
>> Hello,
>>
>> Thank you for your answer,
>>
>> When I run the command the output is :
>> backuppc@backup:/ % /usr/local/bin/BackupPC -d&
>> [1] 79359
>>
>>
>> In addition to that, the output of the log file is :
>> 2018-01-18 10:17:52 Reading hosts file
>> 2018-01-18 10:17:52 Deleted host trashClean from backup list
>> 2018-01-18 10:17:52 unix bind() failed: Permission denied
>> [1] + Done /usr/local/bin/BackupPC -d
>>
>>
>> Regards,
>> Hari
>>
>> 2018-01-18 10:16 GMT+03:00 Craig Barratt via BackupPC-users <
>> [email protected]>:
>>
>>> Those warnings are all benign and can be ignored.
>>>
>>> Back to your original email. After first confirming that BackupPC isn't
>>> running, what happens when you directly start BackupPC as the BackupPC
>>> user, eg:
>>>
>>> su backuppc
>>> /usr/local/bin/BackupPC -d &
>>>
>>>
>>> Do you get any errors? Is there anything written to the BackupPC server
>>> LOG file?
>>>
>>> Craig
>>>
>>> On Wed, Jan 17, 2018 at 11:09 PM, RAKOTONDRAINIBE Harimino Lalatiana <
>>> [email protected]> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> Doesn't anyone have any idea of the issue ?
>>>>
>>>> I continue debugging hoping that someone can help me and when I try to
>>>> run int manually , the result can be seen below :
>>>>
>>>> backuppc@backup:/ % /usr/local/bin/perl -w /usr/local/bin/BackupPC -d
>>>> Statement unlikely to be reached at /usr/local/lib/BackupPC/Lib.pm line
>>>> 1172.
>>>> (Maybe you meant system() when you said exec()?)
>>>> Statement unlikely to be reached at /usr/local/lib/BackupPC/Lib.pm line
>>>> 1236.
>>>> (Maybe you meant system() when you said exec()?)
>>>> Statement unlikely to be reached at /usr/local/bin/BackupPC line 607.
>>>> (Maybe you meant system() when you said exec()?)
>>>> Statement unlikely to be reached at /usr/local/bin/BackupPC line 779.
>>>> (Maybe you meant system() when you said exec()?)
>>>> Use of uninitialized value $topDir in string eq at
>>>> /usr/local/lib/BackupPC/Lib.pm line 70.
>>>> Use of uninitialized value $installDir in string eq at
>>>> /usr/local/lib/BackupPC/Lib.pm line 71.
>>>> Use of uninitialized value $confDir in string eq at
>>>> /usr/local/lib/BackupPC/Lib.pm line 79.
>>>> Use of uninitialized value $host in string ne at
>>>> /usr/local/lib/BackupPC/Lib.pm line 348.
>>>> Use of uninitialized value $Conf{"SmbClientPath"} in string eq at
>>>> /usr/local/bin/BackupPC line 284.
>>>> Use of uninitialized value $Conf{"NmbLookupPath"} in string eq at
>>>> /usr/local/bin/BackupPC line 284.
>>>> Filehandle STDIN reopened as STDIN only for output at
>>>> /usr/local/bin/BackupPC line 326.
>>>>
>>>> So now I am not sure if it's a socket problem or the because of the
>>>> errors above .
>>>>
>>>> Regards,
>>>>
>>>> 2018-01-09 14:50 GMT+03:00 RAKOTONDRAINIBE Harimino Lalatiana <
>>>> [email protected]>:
>>>>
>>>>> Hi everyone,
>>>>>
>>>>> After an upgrade of freebsd from 11.0 to 11.1, my backupc service
>>>>> won't work .
>>>>> The version of backuppc I use is backuppc 3.3.2.2
>>>>> When I run from service management, it shows :
>>>>>
>>>>> root@backup:~ # service -v backuppc start
>>>>> backuppc is located in /usr/local/etc/rc.d
>>>>> Starting backuppc.
>>>>> term: Undefined variable.
>>>>>
>>>>> And when I check in the backup log it says :
>>>>>
>>>>> Reading hosts file
>>>>> unix bind() failed: Address already in use
>>>>>
>>>>> I already try to reboot my server, uninstall and reinstall backup and
>>>>> upgrade to backupc 4, also downgrade to see if it's a compatility issues
>>>>> but nothing seems to work.
>>>>>
>>>>> I also didn't find anything in others forum .
>>>>>
>>>>> So is someone had already see this issues and can anyone have an idea
>>>>> of what is going wrong ?
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Regards
>>>>>
>>>>> Hari
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> BackupPC-users mailing list
>>>> [email protected]
>>>> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
>>>> Wiki: http://backuppc.wiki.sourceforge.net
>>>> Project: http://backuppc.sourceforge.net/
>>>>
>>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> BackupPC-users mailing list
>>> [email protected]
>>> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
>>> Wiki: http://backuppc.wiki.sourceforge.net
>>> Project: http://backuppc.sourceforge.net/
>>>
>>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> BackupPC-users mailing list
>> [email protected]
>> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
>> Wiki: http://backuppc.wiki.sourceforge.net
>> Project: http://backuppc.sourceforge.net/
>>
>>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki: http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/