Problem Creating Repository

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Problem Creating Repository

Post by mrochelle »

I continue to get the following error when attempting to create a repository.
The snapshot repository in directory /usr/local/nagioslogserver/archives/snapshots_repository could not be created. Possibly due to permissions. Make sure the nagios user can write to the location.
Permissions are good.
drwxrwxrwx. 2 nagios nagios 6 Jun 16 10:12 snapshots_repository.
School me please. :geek:
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi,
How are you doing?

Please try the followings:

Code: Select all

chown -R nagios:nagios /usr/local/nagioslogserver/archives/snapshots_repository/
chown -R 775 /usr/local/nagioslogserver/archives/snapshots_repository/
Now, please try the creation of repository again.


Best Regards,
Vinh
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Problem Creating Repository

Post by mrochelle »

Doing good Vinh. I tried your commands but no change. Same error as before: The snapshot repository in directory /usr/local/nagioslogserver/archives/snapshots_repository could not be created. Possibly due to permissions. Make sure the nagios user can write to the location.
Marcus
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi Marcus,
Do you have SELinux turned on?

Please run this:

Code: Select all

sestatus
Can you manually create a file under "snapshots_repository"?

Code: Select all

su - nagios
touch /usr/local/nagioslogserver/archives/snapshots_repository/test.out

ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository/
Best Regards,
Vinh
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Problem Creating Repository

Post by mrochelle »

SELinux status: disabled
brb.

nagioslogserver]$ ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository/
total 0
drwxrwxr-x 2 nagios nagios ? 22 Jun 18 12:44 .
drwxrwxr-x. 3 nagios nagios unconfined_u:object_r:usr_t:s0 34 Jun 18 12:37 ..
-rw-r--r-- 1 nagios users ? 0 Jun 18 12:44 test.out
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi Marcus,
Hope you are having a good day.

Please run the below commands on your LogServer as "root":

Code: Select all

usermod -G nagios,apache,users nagios

chcon unconfined_u:object_r:usr_t:s0 /usr/local/nagioslogserver/archives/snapshots_repository

ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository

systemctl restart httpd
Now, please try adding the repository again.


Best Regards,
Vinh
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Problem Creating Repository

Post by mrochelle »

Ran the requested commands and problem still exits.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi,
What OS does your Nagios LogServer runs on?

What version of LogServer?

Also, please post screenshot or outputs of the followings:

Code: Select all

grep apache /etc/group

grep apache /etc/group

ls -laZ /usr/local/nagioslogserver/archives/snapshots_repository

rpm -qa | grep openssh
If you could, please restart your OS (system).

Code: Select all

systemctl stop logstash
systemctl stop elasticsearch
reboot

Best Regards,
Vinh
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi,
It would be very helpful if you could upload screenshot of the error(s) on the webpage?

Please also upload outputs of these folders after you have reboot your server:
ls -la /usr/local/nagioslogserver

ls -la /usr/local/nagioslogserver/archives

Regards,
Vinh
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Problem Creating Repository

Post by vtrac »

Hi,
I have asked my team member (Sean) for help, trying to look at the code that do the creation.

Please try this:

Code: Select all

cd /usr/local/nagioslogserver/archives/
rm -rf snapshots_repository

Now, please try adding the "snapshots_repository" again.

Best Regards,
Vinh
Locked