Bacula-users

Re: [Bacula-users] bconsole can't talk to bacula-dir

2016-09-30 18:45:20
Subject: Re: [Bacula-users] bconsole can't talk to bacula-dir
From: "Hankins, Jonathan" <jhankins AT homewood.k12.al DOT us>
To: Elias Pereira <empbilly AT gmail DOT com>, Jan Martin <fyzzics AT gmail DOT com>
Date: Fri, 30 Sep 2016 22:44:07 +0000
I believe the FD is the inly thing that needs to run as root. I think on Debian/Ubuntu/Mint, the dir runs as bacula:bacula and the SD as bacula:tape, but I may be wrong.

Are you sure that your bconsole is 7.0.5 as well? Check everything with:

dpkg -l \*bacula\*

and:

which bconsole

...Just to make sure you don't have an old 5.x bconsole somewhere, and that your dir is really 7.0.5.

Also, bconsole has debug options. Note that, when I built 7.4.4 from source, there is a .../sbin/bconsole, but also a wrapper in .../etc/bconsole. If you want to specify debug flags, etc., you have to run the real bconsole binary.

bconsole -\?


On Fri, Sep 30, 2016 at 4:16 PM Elias Pereira <empbilly AT gmail DOT com> wrote:

I'm not sure, but bacula services must be run as root both user and group.


Em 30/09/2016 5:59 PM, "Jan Martin" <fyzzics AT gmail DOT com> escreveu:
Hi,

OK, I just killed the currently running bacula-dir daemon (the nice way, from the init.d script), and restarted it with the same command line, but added -d200.  Got some extra stuff at the beginning:

trinity% sudo /usr/sbin/bacula-dir -d200 -c /etc/bacula/bacula-dir.conf -u bacula -g bacula
bacula-dir: dird.c:194-0 Debug level = 200
bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  --> RunScript
bacula-dir: runscript.c:286-0   --> Command=/etc/bacula/scripts/make_catalog_backup.pl MyCatalog
bacula-dir: runscript.c:287-0   --> Target=
bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
bacula-dir: runscript.c:289-0   --> RunOnFailure=0
bacula-dir: runscript.c:290-0   --> FailJobOnError=1
bacula-dir: runscript.c:291-0   --> RunWhen=2
bacula-dir: runscript.c:284-0 runscript: debug
bacula-dir: runscript.c:285-0  --> RunScript
bacula-dir: runscript.c:286-0   --> Command=/etc/bacula/scripts/delete_catalog_backup
bacula-dir: runscript.c:287-0   --> Target=
bacula-dir: runscript.c:288-0   --> RunOnSuccess=1
bacula-dir: runscript.c:289-0   --> RunOnFailure=0
bacula-dir: runscript.c:290-0   --> FailJobOnError=1
bacula-dir: runscript.c:291-0   --> RunWhen=1
bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
bacula-dir: jcr.c:135-0 Read num_items=0
bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
trinity% bacula-dir: lockmgr.c:728-0 Exit check_deadlock.
bacula-dir: sql_create.c:345-0 In create mediatype
bacula-dir: sql_create.c:349-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File1'
bacula-dir: sql_create.c:345-0 In create mediatype
bacula-dir: sql_create.c:349-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File2'
bacula-dir: sql_create.c:345-0 In create mediatype
bacula-dir: sql_create.c:349-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File3'
trinity-dir: dird.c:323-0 Start UA server
trinity-dir: bnet_server.c:87-0 Addresses 127.0.0.1:9101
trinity-dir: job.c:1528-0 wstorage=File-trinity
trinity-dir: job.c:1537-0 wstore=File-trinity where=Job resource
trinity-dir: job.c:1211-0 JobId=0 created Job=*JobMonitor*.2016-09-30_13.47.45_01
trinity-dir: dird.c:334-0 wait for next job

and when I started up bconsole only one more line appeared:

trinity-dir: bnet.c:566-0 who=client host=127.0.0.1 port=9101

and that's it.  The same result from bconsole as below...

Does any of this help?  Thanks.

-Jan Martin

On 09/30/2016 01:13 PM, Elias Pereira wrote:
You tried to execute bacula-dir in debug mode?

# bacula-dir -d200


Em 30/09/2016 4:49 PM, "Jan Martin" <fyzzics AT gmail DOT com
<mailto:fyzzics AT gmail DOT com>> escreveu:

    Hello bacula-users!

    I'm having a problem that I can't figure out, so I hope someone here can
    help out.

    I have been using bacula 5.2.x for backing up my Mint linux box and a
    couple of Macs.  The latest version of Mint goes to bacula v7.0.5, so I
    installed that after saving my old database and saving all the old
    *.conf files.

    After fixing up the new *.conf files so they were basically like the old
    ones (I didn't use any of the new virtual autochanger stuff), I
    reinstalled the *.conf files in /etc/bacula, and reconstituted the
    database in the usual way.  I'm using sqlite3 for the database.

    All the daemons start up fine, no errors, but when I try to start up
    bconsole, I get an authorization error:

    trinity% sudo bconsole
    [sudo] password for jmm:
    Connecting to Director localhost:9101
    Director authorization problem.
    Most likely the passwords do not agree.
    If you are using TLS, there may have been a certificate validation error
    during the TLS handshake.
    Please see
    http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000
    <http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000>
    for help.

    Here are the relevant sections of bacula-dir.conf:

    Director {                            # define myself
       Name = trinity-dir
       DIRport = 9101                # where we listen for UA connections
       QueryFile = "/etc/bacula/scripts/query.sql"
       WorkingDirectory = "/var/lib/bacula"
       PidDirectory = "/var/run/bacula"
       Maximum Concurrent Jobs = 20
       Password = "xxxyyyzzz"         # Console password
       Messages = Daemon
       DirAddress = 127.0.0.1
    }

    and bconsole.conf:

    Director {
       Name = trinity-dir
       DIRport = 9101
       address = localhost
       Password = "xxxyyyzzz"
    }

    The passwords are identical.  And the /etc/hosts file has the line

    127.0.0.1       localhost

    And there is no firewall, so no port usage restrictions.  Besides, all
    this is taking place on one machine.  There are network clients, but are
    they relevant to this problem?

    I'm really confused.  I don't see how this can happen, but maybe there's
    something out there that is failing a check, or something.  I could
    really use some help - thanks in advance.

    You folks have always come through in the past, and I'm hoping I've just
    messed up something that's different for the new version.

    -Jan Martin

    ------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, SlashDot.org! http://sdm.link/slashdot
    _______________________________________________
    Bacula-users mailing list
    Bacula-users AT lists.sourceforge DOT net
    <mailto:Bacula-users AT lists.sourceforge DOT net>
    https://lists.sourceforge.net/lists/listinfo/bacula-users
    <https://lists.sourceforge.net/lists/listinfo/bacula-users>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users