Cacti, snmp error - open-source

When adding device to "Devices" I get "snmp error". Cacti can't properly connect to device though proper (I think) configuration (i attached png with config). When I debug on router I can see that security level in sent packet is "noauth" and there is no user in first packet:
Nov 14 14:03:23.503:
Incoming SNMP packet
Nov 14 14:03:23.503: v3 packet security model: v3 security level: noauth
Nov 14 14:03:23.503: username:
Nov 14 14:03:23.503: snmpEngineID: <id>
Nov 14 14:03:23.503: snmpEngineBoots: 0 snmpEngineTime: 0
Nov 14 14:03:23.503:
Incoming SNMP packet
Nov 14 14:03:23.503: v3 packet security model: v3 security level: noauth
Nov 14 14:03:23.503: username: service
Nov 14 14:03:23.503: snmpEngineID: <id>
Nov 14 14:03:23.503: snmpEngineBoots: 13 snmpEngineTime: 386 31276
However when I use snmpwalk from the same server everything looks fine, I get information I want:
snmpwalk -Os -v3 -l authnopriv -u service -a MD5 -A x.x.x.x:161 system
And on router snmp packet headr looks fine (security level is "auth"):
Incoming SNMP packet
Nov 14 14:06:58.375: v3 packet security model: v3 security level: auth
Nov 14 14:06:58.375: username: service
Nov 14 14:06:58.375: snmpEngineID: <id>
Nov 14 14:06:58.375: snmpEngineBoots: 13 snmpEngineTime: 38631491
Nov 14 14:06:58.379:
Incoming SNMP packet
Nov 14 14:06:58.379: v3 packet security model: v3 security level: auth
Nov 14 14:06:58.379: username: service
Nov 14 14:06:58.379: snmpEngineID: <id>
Nov 14 14:06:58.379: snmpEngineBoots: 13 snmpEngineTime: 38631491
Anyone can help?
Device config in cacti:
https://s18.postimg.org/w8aylpsnr/image.png

Related

How to enable kvm/qemu logs?

I'm working in company where by they are using kvm virtualisation
[root#601 log]# virsh list --all --title
Id Name State Title
----------------------------------------------------------------------------------
2 reporting-pilosa07 running 10.3.6.172
3 reporting-pilosa09 running 10.3.6.173
4 reporting-pilosa11 running 10.3.6.174
5 reporting-pilosa13 running 10.3.6.175
6 reporting-pilosa05 running 10.3.6.171
the VMs are running, but time to time, they dead for some reason and I would like to look at individual VM logs
[root#601 qemu]# ls -ltr
total 32
-rw------- 1 root root 2341 Oct 15 2018 reporting-pilosa07.log
-rw------- 1 root root 2341 Oct 15 2018 reporting-pilosa09.log
-rw------- 1 root root 2341 Oct 15 2018 reporting-pilosa11.log
-rw------- 1 root root 2341 Oct 15 2018 reporting-pilosa13.log
-rw------- 1 root root 4885 Nov 12 2018 reporting-pilosa05.log
-rw------- 1 root root 7181 Jul 25 04:14 offlineonboarder02.log
[root#601 qemu]# pwd
/var/log/libvirt/qemu
The logs are not logging since a year back. Where can I enable back the logs so that I can observe the cause to why the VMs went dead?
Thanks.

How do I fix SASL authentication failure

I'm trying to set up an email server on Centos 7 using postfix and dovecot.
whenever I telnet into my server, I get kicked out:
[root#mail log]# telnet mail.mydomain.com smtp
Trying IP ADDRESS...
Connected to mail.mydomain.com.
Escape character is '^]'.
Connection closed by foreign host.
When I check the logs in /var/log/maillog this is the error I see:
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: connect from ***********
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: warning: SASL authentication failure: Internal Error -4 in server.c near line 1757
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: warning: SASL authentication failure: Internal Error -4 in server.c near line 1757
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: warning: SASL authentication failure: Internal Error -4 in server.c near line 1757
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: warning: xsasl_cyrus_server_get_mechanism_list: no mechanism available
Mar 15 05:33:44 vultr postfix/smtps/smtpd[20434]: fatal: no SASL authentication mechanisms
Mar 15 05:33:45 vultr postfix/master[18735]: warning: process /usr/libexec/postfix/smtpd pid 20434 exit status 1
Mar 15 05:33:45 vultr postfix/master[18735]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Any help would be appreciated, thank you.

Cygnus can not persist data on Cosmos global instance

When trying to persist an entity from Cygnus to Cosmos global instance it fails.
Looking at the log file I see something like that:
2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:273) - >> GET /webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms HTTP/1.1
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> X-Auth-Token: xxxxxxxxxxxxxxxxxxx
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Host: cosmos.lab.fiware.org:14000
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Connection: Keep-Alive
12 Nov 2015 15:31:50,007 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
12 Nov 2015 15:31:50,284 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:716) - Closing the connection.
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,286 INFO [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:723) - I/O exception (java.net.SocketException) caught when processing request: Connection reset
12 Nov 2015 15:31:50,287 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:728) - Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:185)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
(I have obfuscated the token in the example above.)
for some reason the connection is closed.
Orion and Cygnus are installed on a fiware lab private instance in Spain2.
When trying to fire the same request from the command line from the Orion machine, I get the same disconnected response.
curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxx"
curl: (56) Failure when receiving data from the peer
But surprisingly, when doing the same request from the command line from the Cosmos global instance, it works!
See:
[ms#cosmosmaster-gi ~]$ curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxx"
{"FileStatus":{"pathSuffix":"","type":"FILE","length":2,"owner":"ms","group":"ms","permission":"644","accessTime":1447332222908,"modificationTime":1447253745711,"blockSize":67108864,"replication":3}}
[ms#cosmosmaster-gi ~]$
Seems like Cosmos will not service connection arriving from a fiware lab instance running on Spain2.
Does anyone knows what's the issue here, and how to correct this.
Thanks!
Menachem S.
Issue was solved by a workaround.
The Cygnus server was installed on an external node ( a Machine on Azure), and everything works fine wrt Orion-->Cygnus-->Cosmos stream.

How to debug Server Error 500 on Openshift, when rhc tail does not show errors?

I'm trying to debug a Server Error 500 with my application. I've read that you should use rhc tail to show a live log stream and with the current error, the log stream that appears when trying to display the page is:
==> app-root/logs/python.log <==
79.24.253.62 - - [01/Jan/2015:08:32:17 -0500] "GET /url/ HTTP/1.1" 500 27 "http://a-b.rhcloud.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36"
The error shown is:
Other pages work, this error only appears on certain "more advanced" pages (eg. static pages show correctly). The rest of the log, is:
==> app-root/logs/python.log <==
[Thu Jan 01 08:30:43 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c6,c654
[Thu Jan 01 08:30:43 2015] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 01 08:30:43 2015] [notice] Digest: done
[Thu Jan 01 08:30:43 2015] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/3.3.2 configured -- resuming normal operations
and:
==> app-root/logs/postgresql.log <==
2015-01-01 13:30:25 GMT LOG: shutting down
2015-01-01 13:30:25 GMT LOG: database system is shut down
2015-01-01 13:30:31 GMT LOG: could not bind socket for statistics collector: Permission denied
2015-01-01 13:30:31 GMT LOG: trying another address for the statistics collector
2015-01-01 13:30:31 GMT LOG: could not bind socket for statistics collector: Cannot assign requested address
2015-01-01 13:30:31 GMT LOG: disabling statistics collector for lack of working socket
2015-01-01 13:30:31 GMT WARNING: autovacuum not started because of misconfiguration
2015-01-01 13:30:31 GMT HINT: Enable the "track_counts" option.
2015-01-01 13:30:31 GMT LOG: database system was shut down at 2015-01-01 13:30:25 GMT
2015-01-01 13:30:31 GMT LOG: database system is ready to accept connections
What is the next step to debug this problem?
I added the following Django logging configuration which gave me the details of the 500 errors in a file django.log. I set LOG_DIR = os.environ.get('OPENSHIFT_LOG_DIR')
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'WARNING',
'class': 'logging.FileHandler',
'filename': os.path.join(LOG_DIR, 'django.log'),
},
},
'loggers': {
'django.request': {
'handlers': ['file'],
'level': 'WARNING',
'propagate': True,
},
},
}

Delay after RCTP command on GMail

I want to create a SMTP validation on registration at my website, but I got a strange behavior on GMail SMTP servers.
The validation looks like sending emails: after establishing connection with SMTP server I send commands EHLO, HELO, MAIL FROM, RCPT TO and QUIT.
Commands like HELO and MAIL FROM not take many time, but command RCPT TO can take about 3 seconds on GMail. For example, on several others servers this command takes only 200-300ms.
Also, if I check an existing email address, RCTP command takes only 600-900ms, but this delay always takes more then 3 seconds for unexisting address.
I think, this delay is an antispam behavior, but how I can bypass it?
My domain already has correct TXT-SPF and SPF records. My server not listed in any spam lists.
I'm not seeing the delay that you're reporting after RCPT TO. I run a mail server that logs the transcript with the remote MTA for every delivery. Looking at a few recent deliveries to gmail addresses, I see that the server for gmail responded with a 250 OK almost immediately after RCPT TO from my side. See below. (email addresses and IP's anonymized to protect the innocent!).
Tue Jul 23 16:01:52 2013 GMT DNS MX record lookup for gmail.com:
Tue Jul 23 16:01:52 2013 GMT MX1=gmail-smtp-in.l.google.com, MX2=alt1.gmail-smtp-in.l.google.com, MX3=alt2.gmail-smtp-in.l.google.com
Tue Jul 23 16:01:52 2013 GMT Attempting SMTP connection from smtp.myserver.com [x.x.x.x] to gmail-smtp-in.l.google.com [173.194.64.27] on port 25
Tue Jul 23 16:01:52 2013 GMT Delivery id 813435, process id 21352
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 220 mx.google.com ESMTP b5si18818338obh.145 - gsmtp
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: EHLO smtp.myserver.com
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 250-mx.google.com at your service, [x.x.x.x]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 PIPELINING
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: STARTTLS
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 220 2.0.0 Ready to start TLS
Tue Jul 23 16:01:52 2013 GMT starting TLS...
Tue Jul 23 16:01:52 2013 GMT TLS Enabled.
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: EHLO smtp.myserver.com
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 250-mx.google.com at your service, [x.x.x.x]
250-SIZE 35882577
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: MAIL FROM: <sender#sender.com>
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 250 2.1.0 OK b5si18818338obh.145 - gsmtp
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: RCPT TO: <recipient#gmail.com>
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 250 2.1.5 OK b5si18818338obh.145 - gsmtp
Tue Jul 23 16:01:52 2013 GMT smtp.myserver.com sent: DATA
Tue Jul 23 16:01:52 2013 GMT received from remotehost: 354 Go ahead b5si18818338obh.145 - gsmtp
Tue Jul 23 16:01:52 2013 GMT [sending message...] (14871 bytes)
Tue Jul 23 16:01:52 2013 GMT [message sent]
Tue Jul 23 16:01:53 2013 GMT received from remotehost: 250 2.0.0 OK 1374595312 b5si18818338obh.145 - gsmtp