Web Interface Error

567 views
Skip to first unread message

James Wood

unread,
Aug 16, 2022, 12:12:12 AM8/16/22
to bacularis
Hi all,

I am receiving an error when attempting to use the Bacularis - Bacula Web Interface.

Here is the error: 

Capture.JPG

I assumed that this was something to do with Mysql not being set up properly as prior, I received a permissions error. So created a user with permissions and now receive the above error.

I am new to both Linux and Bacularis/Bacula, so this is far from my comfort zone. However, managed to get this far.

Is there any way to allow Bacularis to create the database automatically? If not, can you please point me to or provide advice on how to get this working?

Thank you in advance.

Marcin Haba

unread,
Aug 16, 2022, 1:19:37 AM8/16/22
to James Wood, bacularis
Hello James,

Thanks for your mail and feedback about using Bacularis.

The problem that you experienced, as you noticed, is because your Bacula database tables have not been created yet because of some errors. It is Bacula installation specific problem.

I don't know what Linux distribution you are using but on some of them the catalog database is created automatically during installation with questions about host/user/password. On other distributions you need to create the Bacula SQL tables manually by running a Bacula scripts.

I would advise to find the following three scripts in your filesystem (for MySQL):

 - create_mysql_database
 - make_mysql_tables
 - grant_mysql_privileges
 
and run them from the root user account when the MySQL database is already running. After you will be able to start Bacula Director that uses the Bacula database. Before using Bacularis it is good to check in console if bconsole connection to the Bacula Director works well by running just:

# bconsole

If something will go wrong, you will see error message. Without working Bacula database and bconsole it can be impossible to install Bacularis with the main API host. Once you will solve it, then Bacularis installation should go well.

Good luck.

Best regards,
Marcin Haba (gani)

--
You received this message because you are subscribed to the Google Groups "bacularis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bacularis+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/bacularis/29f90661-ced9-4cdc-8f54-01fecf71df59n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
"Greater love hath no man than this, that a man lay down his life for his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich." Jezus Chrystus

James Wood

unread,
Aug 17, 2022, 6:33:28 PM8/17/22
to bacularis
Hello Marcin,

Thank you for the information.

I am running CentOS at this stage, failed to mention that in my original message.

I am unsure how to best run the scripts you recommended, any advice you can provide would be appreciated.

Regards,
James.

Marcin Haba

unread,
Aug 17, 2022, 9:56:25 PM8/17/22
to James Wood, bacularis
Hello James,

For MySQL on CentOS you can run these three commands using the root account:

# /usr/libexec/bacula/create_mysql_database
# /usr/libexec/bacula/make_mysql_tables
# /usr/libexec/bacula/grant_mysql_privileges

The first command will create the database if it does not exist. In your case the database probably already exists but it is good to run this command to be 100% sure that the database is created.

The second command creates all Bacula SQL tables inside this database.

The last command creates a MySQL Bacula user and it grants appropriate privileges to him.


Best regards,
Marcin Haba (gani)

For more options, visit https://groups.google.com/d/optout.
Message has been deleted

James Wood

unread,
Aug 17, 2022, 10:51:37 PM8/17/22
to bacularis
Thank you for that, those three commands worked.
I am however, faced with another error...

Capture.JPG

Marcin Haba

unread,
Aug 17, 2022, 11:18:48 PM8/17/22
to James Wood, bacularis
Hello James,

Good to hear that these three commands worked well.

For the error that you see, it is a syntax error in the bconsole.conf file. From the attached screenshot we can notice that there is an unexpected 'Catalog' string.

I would propose to put in bconsole config file the following config resource:

Director {
  Name = "your-director-name"
  DirPort = 9101
  Address = "your-director-address"
  Password = "your-director-password"
}


where:
 1) your-director-name - is the Director component name. You can find it in bacula-dir.conf file in Director {} resource, for example for setting:

Director {
    Name = XYZ-dir
    ... rest directives.
}


the Director name is XYZ-dir.

 2) your-director-password - it is the password to the Director. You can find it in bacula-dir.conf too, in the same Director {} resource, for example for setting:
 
 Director {
    Name = XYZ-dir
    Password = "topsecret"
    ... rest directives.
}


the password is "topsecret"

3) your-director-address - is the address of the host that you have the Director installed.

Once you have the bconsole.conf file ready, before using Bacularis, please make sure that bconsole is working well in the command line. Otherwise it will not work in Bacularis as well. You can do it by typing just:

# bconsole

and checking if Bconsole correctly connects to the Director.


Good luck.

Best regards,
Marcin Haba (gani)

For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted
Message has been deleted

James Wood

unread,
Aug 18, 2022, 1:47:06 AM8/18/22
to bacularis
Hello Marcin,

Again, thank you for your help. I had already entered the correct text in to the conf file, so I am unsure why this is not working.

Am I missing something obvious here?

Please see attached screenshots and thank you for your continued help on this.

Capture.JPG
Capture2.JPG
Capture3.JPG


I did notice that the error is in relation to line 15, this relates to some text entered in the conf file. Just for testing, I commented this section out and now receive a different error than before.

InkedCapture4.jpg
Capture6.JPG

What are your thoughts?

Thank you for your continued help with this.

Marcin Haba

unread,
Aug 18, 2022, 2:41:57 AM8/18/22
to James Wood, bacularis
Hello James

You have almost everything to get access to bconsole. The only thing you need to do now is to completely remove the Catalog {} resource from the bconsole.conf file. The bconsole.conf content should look now:

Director {
    Name = bacula-dir
    DIRPort = 9101
    Address = localhost
    Password = "Your Director Password"
}


Please let us know if it started working. And good luck.


Best regards,
Marcin Haba (gani)

For more options, visit https://groups.google.com/d/optout.

James Wood

unread,
Aug 18, 2022, 6:12:14 PM8/18/22
to bacularis
Hi Marcin,

I have removed the Catalog {} resource from the conf file, but it is still not working.
It was this section, I felt was causing the issue and that is why I commented it out to test.

Please see latest screenshot below. I honestly cannot think of anything else at this point.

When I run bconsole from terminal, it just goes back to the prompt, without any error or message either.

Capture.JPG

Capture1.JPG

James Wood

unread,
Aug 18, 2022, 6:29:30 PM8/18/22
to bacularis
Disregard the previous message.
I have managed to find the solution, the director service was not running and needing to set that to automatic.

Marcin Haba

unread,
Aug 18, 2022, 8:06:24 PM8/18/22
to James Wood, bacularis
Hello James,

Yes, it was a symptom of not started the Director service. Good to hear you managed to solve it.


Best regards,
Marcin Haba (gani)

For more options, visit https://groups.google.com/d/optout.

James Wood

unread,
Aug 21, 2022, 9:40:33 PM8/21/22
to bacularis
Hello again,

The web interface is running now, but have some other issues which I can't seem to resolve.

Capture2.JPG
I receive the above, whenever a job tries to run.

Also receiving below, when trying to create a custom job.

Capture3.JPG


Any help you can provide will be appreciated. :)

Marcin Haba

unread,
Aug 21, 2022, 10:02:59 PM8/21/22
to James Wood, bacularis
Hello James,

My answers to your problems are inlines below.

On Mon, 22 Aug 2022 at 03:40, James Wood <jimb...@gmail.com> wrote:
Hello again,

The web interface is running now, but have some other issues which I can't seem to resolve.

Capture2.JPG
I receive the above, whenever a job tries to run.

For the error above, this message says that your Storage Daemon and File Daemon are not working or they are inaccessible. You can check if they are working at all and if it listening on port 9102 9103, for example using commands:

netstat -tlnp | grep 9102
netstat -tlnp | grep 9103

or this:

lsof -i:9102
lsof -i:9103

If they are not working, they should be started.

Also note about using localhost as the Storage Daemon (and File Daemon) address - this address needs to be accessible in your network so if File Daemon will try to access Storage Daemon on address 'localhost' then it will be trying to access its own local File Daemon host instead of Storage Daemon host. So, I would  propose to change in the bacula-dir.conf in Storage {} resource the Storage Daemon addresses to other addresses than 'localhost' because 'localhost' will work only if all your Bacula components (Director, Storage Daemon and File Daemon) are on the same host and nowhere else what is rare case.
 

Also receiving below, when trying to create a custom job.

Capture3.JPG


Any help you can provide will be appreciated. :)

Here you can find solution for this permission denied problem:

https://bacularis.app/doc/brief/troubleshooting.html#permission-denied-error-when-saving-bacula-configuration

Good luck :-)

For more options, visit https://groups.google.com/d/optout.

James Wood

unread,
Sep 18, 2022, 9:26:17 PM9/18/22
to bacularis
Hello again,
I managed to get the web ui working and can access it. I was away for a while and back at work now.
I am a little confused, how do I add another linux PC to be backed up by Bacularis? I am not sure how to get this working.
Thank you in advance.

Marcin Haba

unread,
Sep 18, 2022, 9:55:13 PM9/18/22
to bacularis
Hello James,

Good to hear that you managed to get the Bacularis working.

Currently to add another host to be backed up you need to install Bacula client (bacula-fd) on that host and then add it to the Bacula Director by Bacularis 'Add client' button.

If you want to manage all the Bacula client configuration on the Bacularis level, you need to install on that host Bacularis and then connect it the main Bacularis interface. This process is described in the Remote host management chapter in the Bacularis documentation here:

https://bacularis.app/doc/remote/basic.html

and also here:

https://bacularis.app/doc/remote/preparing.html

All this process adding and configuring Bacula clients and Bacularis can take a bit of time. But I have a good news. In the new coming release we made this installation process much easier. This version should be available soon, probably it is matter of one week.


Best regards,
Marcin Haba (gani)

James Wood

unread,
Sep 29, 2022, 9:40:06 PM9/29/22
to bacularis
Thank you for your reply, I appreciate it.
Silly question, how best to perform an update? Is this something documented? As I can't seem to find it.

Marcin Haba

unread,
Sep 29, 2022, 11:26:00 PM9/29/22
to bacularis
Hello James,

The update process depends on how you installed Bacularis. If you used Bacularis binary packages (deb or rpm) then it is the package manager command like:

For deb packages:
apt update
apt upgrade

For rpm packages:
dnf update

More information about other installation methods and update you can find in the 'Updating Bacularis' chapter in the Bacularis documentation here:

https://bacularis.app/doc/brief/updating.html


Good luck :-)

Best regards,
Marcin Haba (gani)

James Wood

unread,
Oct 4, 2022, 12:34:44 AM10/4/22
to bacularis
Hello,
That makes sense. I wasn't sure whether the update was performed by a different command or somewhere within the Web UI.
I had already run apt update and upgrade, without noticing it had already upgraded Bacularis and just noticed the Deployment feature added there.

I am attempting to use deployment on another remote linux server, but continue to receive the error in the results: Add SUDO settings which fails.

Capture.JPG

Marcin Haba

unread,
Oct 4, 2022, 2:05:51 AM10/4/22
to bacularis
Hello James,

For the deployment function, please make sure that you have installed on the main Bacularis host (where you use the interface) the deployment requirements. They are:

 - expect
 - SSH binary (SSH client)
 - SCP binary
 - GPG binary

They are not installed automatically, so you need to install them manually. More information about the deployment requirements you can read here:

https://bacularis.app/doc/deployment/basic.html#requirements

SSH and GPG usually are alredy installed, but 'expect' is something that usually is absent by default and requires installation.

If installing them will not help, then could you show us what is displayed on the 'Raw output' tab?

Good luck,


Best regards,
Marcin Haba (gani)

Reply all
Reply to author
Forward
0 new messages