Snort Errors: ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory - snort

First time Snort user and running into two issues. After installation on a Windows 10 machine, I am able to initialize snort via an elevated command prompt: snort -A console. While snort it running however I noticed "Warning: No Preprocessors configured for policy 0." mixed into the console output.
A quick Stackoverflow search pointed me to run the following command to solve this, they said: This message indicates that no snort preprocessor is loaded. In order to get rid of this warning, please use the command: snort -v -c /etc/snort/snort.conf
But when I run this command I am greeted with another error:
Running in IDS mode
--== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "/etc/snort/snort.conf"
ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory.
Fatal Error, Quitting..
This is where I get lost since that's where I have the config file (initally it was just /etc/snort.conf, but created a snort folder so the directory / file exists).
If anyone has any insight into this I would be more than grateful!

Make sure the file snort.conf has necessary permission and ownership. The directory /etc/snort should contain "chmod -R 5775" level permission. If you are installing it from source, you would be always able to copy the snort.conf to /etc/snort.

Related

MobaXterm error: FXApp::openDisplay: unable to open display :0.0

I'm trying to open an Abaqus GUI on a cluster. So far I've done this using:
I log in on the cluster using MobaXterm
I start a job using:
qsub -I - X -l nodes=1:ppn=1,mem=32gb
I load Abaqus:
module load abaqus/2019
I call the Abaqus GUI:
abaqus cae
As said, this used to work until the day before yesterday. Now I get the following error when I try this:
Abaqus License Manager checked out the following license:
"cae" from Flexnet server the_server
<15 out of 30 licenses remain available>
FXApp::openDisplay: unable to open display :0.0
Fatal Exception: connect
Abaqus Error: Abaqus/CAE Kernel excited with an error
I've looked around and it seems that somebody else had a very similar problem here, with solutions being posted here (see the figure below). However, the solution specifies '/etc/NetworkManager/nm-system-settings.conf', a file I cannot seem to find (I'm using Windows).
Does anybody know how to solve this issue?
The problem was that
qsub -I - X -l nodes=1:ppn=1,mem=32gb
should be
qsub -I -X -l nodes=1:ppn=1,mem=32gb
(removing the space between - and X)

Odoo server restart eror

I have created a model now I am using this command to restart the module
but it is showing this error
using this command to restart module
odoo start --config=/etc/odoo/odoo.conf -i HelloModule
the error is
odoo: error: The config file '/etc/odoo/odoo.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to generate it
the screenshot of the file which error shows that it is not available
Try adding readable permission to config file by chmod command
sudo chmod +r etc/odoo/odoo.conf
Check this link to know more about modifying file permissions.

gearmand: Could not open log file "/usr/local/var/log/gearmand.log"

I'm trying to install gearman in my Ubuntu 12.04.
Actually installation is successful. But when I start the daemon, I'm getting this error.
gearmand: Could not open log file "/usr/local/var/log/gearmand.log" from xxxx switching to stderr. (No such file or directory)
Am I missing anything here? I tried installing various versions of gearman, still the result is same.
Any help please...
/usr/local/var/log/gearmand.log is default value of --log-file option.
See gearmand --help
-l [ --log-file ] arg (=/usr/local/var/log/gearmand.log)
Log file to write errors and
information to. If the log-file
parameter is specified as 'stderr',
then output will go to stderr. If
'none', then no logfile will be
generated.

schroot is giving error on centos 6

When I'm using command: schroot -c 32bit -- bash --login -c "rm -rf ~/SC32 ;"
I'm getting these errors:
E: 20copyfiles: cp: cannot create regular file `/var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc/resolv.conf': No such file or directory
E: 32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce: Chroot setup failed: stage=setup-start
Since i'm new to Linux Environment i don't know what to do to solve this error.
The Cent OS which I'm using is 6.3 with x64 architecture
Also i have configured 32bit in /etc/schroot/schroot.conf as
[32bit]
type=directory
description=CentOS 6.3 32bit
directory=/chroot/32bit
users=temp
root-groups=root
personality=linux32
Also I Have this directory available /chroot/32bit
I'm not the root user of the system.
Can anybody tell me what to do to resolve this error?
To debug problems with schroot, try running it verbosely:
schroot -v
or to make it really verbose
schroot -v --debug=notice
The actual failure here is to copy /etc/resolv.conf. There are two potential reasons for this
The source file isn't copyable. Normally unlikely, but try cp and cat by hand to check.
The destination doesn't exist. This is the usual cause of such errors.
Your chroot is /chroot/32bit and it's being (bind) mounted on /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce. If /chroot/32bit/etc does not exist, then /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc won't exist either, and so the copy operation will fail. You must have a proper system available under /chroot/32bit with all the usual directories (/bin, /etc, /lib etc.).
Assuming that you do have a proper chroot in /chroot/32bit, then something has gone wrong during setup. Running with verbose or debug messages enabled may shed some light on the cause of the failure.
Regards,
Roger
(schroot author)
I followed #Roger 's solution and all is well. But I found another workaround solution:
Enter your schroot directory, maybe like this location: /chroot/32bit, you can find this path in "/etc/schroot/schroot.conf" setting file.
cd /chroot/32bit
mv /chroot/32bit/etc/resolv.conf /chroot/32bit/etc/resolv.conf.bk
Then you can try your schroot login command and check is success.
schroot -c 32bit
(32bit)WDan#linux-buildy01:~$
Enjoy it!

Unable to run PostgreSQL as Windows service

I had this in my Windows services:
C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe runservice -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w
It never finishes executing. But if I did this on the dos shell:
C:/Program Files/PostgreSQL/8.4/bin/pg_ctl.exe start -N "postgresql-8.4" -D "D:/PostgreSQL/8.4/data" -w
Notice that I only changed the "runservice" to "start" and it works just fine.
Any idea?
The command runservice can only be executed by the service manager
in order to fix my localhost windows 7 to start postgres as a service
i used the following command to start the data
pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" start
Then checked the status for errors
pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" status
if you get error 1063 , its more than likely permissions, i executed the following command
cacls "C:\Program Files\PostgreSQL\9.1\data" /E /T /C /G postgres:F
then reran the start/status, it showed everything fine, but still service manager would not start the service
So, in Services->postgresql->options->logon i set the log on as the Local system account instead of the postgres user, and voila it worked
this happened to me because i set my data directory to be somewhere the postgres windows user account didn't have access to.
I had this problem in Windows after a system crash. Running the first command showed invalid data in C:\Program Files\PostgreSQL\9.1\data\postmaster.pid. Deleting that file did the trick. Reference.
I faced the same issue after moving manually the database data files (PG_DATA directory) without recreating all the necessary permissions.
Here is how I solved my issue:
1. Check permissions on old PG_DATA directory:
cacls "c:\path\to\old\pgdata\dir"
2. Check permissions on new PG_DATA directory:
cacls "d:\path\to\NEW\pgdata\dir"
3. Compare outputs from 1. and 2.
Find the differences between users and/or permissions then synchronize them.
Nota: I found it easier to use explorer for the synchronization step rather than using cacls directly from the command line.
If you changed pg_hba.conf , maybe you missed somewhere in file. For example there must be CIDR after IP in that file. It must be like 192.168.1.100/32
If you forgot to put 32, then server doesnt restart.
Investigation of startup logs could be a clue. For the case problem is in the pg_hba.conf you could see something like this:
2018-11-13 00:39:34.841 PST [8284] FATAL: could not load pg_hba.conf
2018-11-13 00:39:34.842 PST [8284] LOG: database system is shut down
You need to check your logfiles and the windows eventlog for some hint of what the problem is. If there is nothing at all there, you need to break out something like Process Monitor and get a stacktrace of where it's hung.
I have had this issue in the past, and it was that the installer did not set up the permissions correctly for the user that the service was to run as.
I've also ran into this problem with postgresql throwing and error after trying to initialize the database cluster. After analyzing the log files and running command line scripts for 4 hours I've got the solution to anyone running into this problem for Windows Versions.
This is not a detailed description as to why its happening. I've installed odoo 10, 11, 12 and 13 numerous times on countless client servers and windows systems and this is the first time I've ever ran into this problem. I cant say if its because I have MS VS Enterprise installed and Android Studio on this machine or what. But Below is the easy answer on how to fix it and initialize the cluster and create the database files in the data folder.
Open the data folder for postgresql. - For Odoo installs it will normally be "C:\Program Files (x86)\Odoo 13.0\PostgreSQL" Unless you chose another location when installing.
Remove any or all files from this folder - If not you will get an error when running initdb.exe
Right click the data folder and open up the properties for it. Click on the Security tab and then click the advanced button on the bottom.
You need to change the owner of this folder to openpgsvc. Click Change and type in openpgsvc and click ok. Once done click the check box below saying that you want this change to affect containers with this container as well.
Then on the Permissions tab click the add button on the bottom. You need to add openpgsvc as a user and give this user full rights. Click apply and and ok to close out of all the folder properties.
Now you need to open cmd.exe - Once open we are going to call initdb.exe and pass some values to it as well.
First run chdir and change the working directory to the location of initdb.exe. For me, running odoo 13 on a windows 10 machine the location is this..
"C:\Program Files (x86)\Odoo 13.0\PostgreSQL\bin"
There is one variable that need to be passed as well to make this work here is the list. NEEDS TO BE INCLUDED IN THE CALL TO initdb.exe
Postgres Data Dir: "C:\Program Files (x86)\Odoo 13.0\PostgreSQL\data"
The End Result with the parameter would look like this for my installation:
"C:\Program Files (x86)\Odoo 13.0\PostgreSQL\bin\initdb.exe" -D "C:\Program Files (x86)\Odoo 13.0\PostgreSQL\data"
Hit Enter and let it rip. The output of this command should look like this below.
Cmd.exe running initdb.exe script
Make sure there is no buggy empty file Program at C:\ like C:\Program
In this case, explorer will warn whenever you log on into Windows.
File Name Warning
-----------------
There is a file or folder on your computer called "C:\Program" which
could cause certain applications to not function correctly. Renaming it
to "C:\Program1" would solve this problem. Would you like to rename
it now?
Installing PostgreSQL 10 On Windows 7 (yes the clock is ticking...). I first tried the latest version 11 which completely failed to install... not a good sign for Windows users. Anyway.
Quick answer: Change the account in the Windows Services panel from Network to Local.
Details of my case
During installation I created/selected a data folder in the user profile folder, because obviously the folder suggested by default, within the program folder, wouldn't work, and if it worked it would be a very idea to put data here (I don't know whether it's usual to do that on Unix/Linux, but for Windows it's it's not allowed for a long time).
At the end (when populating the data cluster) I received an error:
Failed to load SQL Modules into database Cluster
but the installation was able to complete. I found two pages about previous error, here and here, but they didn't seem relevant to my case, so I just started pgAdmin and, on the left "browser", saw the server wasn't active.
I tried to start it from here (had to type the main password), but it went inactive immediately again. So I tried to use the Windows services panel to start "postgresql-x64-10", no joy. I copied the command from this panel and pasted it into a Windows console (cmd.exe) where I finally received this
error 1063.
Searching I found this related question, and was convinced the problem was about permissions.
Solution working for my case
In the services panel I changed the account used to start the service from Network Service to Local System as suggested in a comment by #AlexanderRios.
sc create "postgresql-9.2" binPath= "\"C:/Program Files (x86)/PostgreSQL/9.2/bin/pg_ctl.exe\" runservice -N \"postgresql-9.2\" -D \"C:/Program Files (x86)/PostgreSQL/9.2/data\" -w" DisplayName= "postgresql-9.2" start= auto
Try this on CMD run as Administrator
(Add your parameters depend on your version)
Stop all postgres processes
Go to the postgres data folder (C:\Program Files\PostgreSQL\9.6\data)
Delete the postmaster.opts and postmaster.pid files
From the control panel, in administrative
tools and the services console start the postgres service
open pgAdmin III and then in right pane find server then just right click and connect, enter the password. after connected go to the browser and refresh ODOO. Problem solved.
See image to get better understanding