All Apps and Add-ons

troubleshooting mailclient

jibanes
Path Finder

TA-mailclient should output to splunkd.log the result of POP/IMAP connections, in order to troubleshoot errors; or simply alert a user if his password is no longer valid or simply if mailclient wasn't able to retrieve emails.

0 Karma

jibanes
Path Finder

10-18-2016 16:30:22.547 +0000 WARN HttpListener - Socket error from 127.0.0.1 while accessing /servicesNS/nobody/search/data/inputs/mail/xxx%40gmail.com/: Broken pipe

0 Karma

jibanes
Path Finder

10-03-2016 16:05:02.937 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py" ERRORlocal variable 'e' referenced before assignment

0 Karma

jibanes
Path Finder

I'm running Splunk 6.5.0 now btw.

0 Karma

seunomosowon
Communicator

Yeah. One minute. my error.Will re-load in 5

0 Karma

jibanes
Path Finder

thanks, let me know.

0 Karma

seunomosowon
Communicator

Fixed and tested. Uploaded 0.4.8

0 Karma

jibanes
Path Finder

This error doesn't show up anymore, but index=mail is still empty, and while mail.py is scheduled to run, it doesn't seem to error (it just INFO when it starts); would you have the magic string to run it from command line perhaps?

tcpdump on the imap port shows that the communication is established (in my case with imap.google.com) but ends up after a few seconds; it's SSL so I can't easily know what went through in the exchange itself.

0 Karma

jibanes
Path Finder

sorry I meant imap.gmail.com

0 Karma

seunomosowon
Communicator

I just tried it on mine for POP3 and IMAP, and it works alright. What interval do you have the input setup to poll the server?

0 Karma

jibanes
Path Finder

I just moved it to every 15 minutes for troubleshooting; but there's not much to troubleshoot.

0 Karma

seunomosowon
Communicator

Nothing shows when you do this?
index=_internal sourcetype=splunkd component=ExecProcessor mail.py log_level=INFO?

I'll try this using this for a gmail account tonight. And let you know if i find any issues using gmail.

0 Karma

jibanes
Path Finder

10-03-2016 18:45:00.908 +0000 INFO ExecProcessor - New scheduled exec process:
python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:45:00.302 +0000 INFO ExecProcessor - message from "python /opt/sp
lunk/etc/apps/TA-mailclient/bin/mail.py" Password entity created - mail\xxx@
gmail.com.
10-03-2016 18:45:00.002 +0000 INFO ExecProcessor - setting reschedule_ms=899998
, for command=python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:43:57.488 +0000 INFO ExecProcessor - New scheduled exec process:
python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:41:09.671 +0000 INFO ExecProcessor - New scheduled exec process:
python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py

0 Karma

seunomosowon
Communicator

You could try setting the ExecProcessor to Debug, and see what you find int he logs.

/opt/splunk/bin/splunk set log-level ExecProcessor -level DEBUG

0 Karma

jibanes
Path Finder

Last run ( I removed my email address with xxx 😞

query: index=_internal sourcetype=splunkd component=ExecProcessor mail.py

results:

10-03-2016 18:30:00.346 +0000 INFO ExecProcessor - message from "python /opt/sp
lunk/etc/apps/TA-mailclient/bin/mail.py" Got credentials from endpoint - Usernam
e(xxx@gmail.com)
10-03-2016 18:30:00.002 +0000 INFO ExecProcessor - setting reschedule_ms=899998
, for command=python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py

0 Karma

jibanes
Path Finder

I've deleted the input, recreated it, and the relevant query now displays:
(notice that my email address is prepended with \ not = as it was before?)

10-03-2016 18:45:00.908 +0000 INFO ExecProcessor - New scheduled exec process: python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:45:00.302 +0000 INFO ExecProcessor - message from "python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py" Password entity created - mail\xxx@gmail.com.
10-03-2016 18:45:00.002 +0000 INFO ExecProcessor - setting reschedule_ms=899998, for command=python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:43:57.488 +0000 INFO ExecProcessor - New scheduled exec process: python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py
10-03-2016 18:41:09.671 +0000 INFO ExecProcessor - New scheduled exec process: python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py

0 Karma

seunomosowon
Communicator

Yes, I'm currently testing, and should put this up today or tomorrow.

Thanks again.

0 Karma

jibanes
Path Finder

Thanks will test

0 Karma

seunomosowon
Communicator

Do let me know how you get along with the update.

0 Karma

jibanes
Path Finder

09-20-2016 15:45:00.279 +0000 INFO ExecProcessor - message from "python /opt/splunk/etc/apps/TA-mailclient/bin/mail.py" Got credentials from endpoint - Username(xxx@gmail.com)

This unfortunately, is the only message I get from TA-mailclient, I don't see any mail going in the index, nor I know what made it fail to do so.

0 Karma

seunomosowon
Communicator

Hi Jibanes,

I'll add this in over the next week and test, and I'll release an update. It'll log as INFO. Should also include support for more special characters in the password field.

Cheers

0 Karma

jibanes
Path Finder

did you have a chance to look into this?

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...