• United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Qradar socket error: Connection Refused

50YWKCY4F3 gravatar image
Question by tarang777  (51) | May 23, 2018 at 01:04 AM qradarqradar_appdevsyslogtcpipdatacollection

I have a TCP syslog handler that connects my application backend to the TCP 514 port of Qradar for data collection and ingestion as events. The data collection scripts runs 24/7 looking for new data and indexed into qradar.

Once during overnight data collection, data collection stops and an exception is generated stating "socket.error [Error 111] connection refused". This exception is thrown in the TCP handler as shown in fig

![alt text][1]

To reproduce the same exception I tried disconnecting the internet connection and adding a proxy firewall but can't reproduce the same. Any idea why such connection is refused. Below is the code where i connect to the TCP port using socket

 class TCPSysLogHandler(logging.handlers.SysLogHandler):
 
   def __init__(self, address,
                facility=None):
     logging.Handler.__init__(self)
 
     self.address = address
     self.facility = facility
     self.unixsocket = 0
     self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self.socket.connect(address)
 
   def close(self):
     self.socket.close()
     logging.Handler.close(self)

As the data collection loops around, the same exception is logged every time and the connection is not established after that. Any way to re-establish the connection or any viable next steps to resume data collection? [1]: /answers/storage/temp/22296-tcperror.png

tcperror.png (51.6 kB)

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

1 reply

  • Sort: 
50Y30DUVHS gravatar image

Answer by Daniel Zerkle (623) | May 24, 2018 at 08:09 PM

That was trying to connect to the QRadar console syslog port?

The most likely explanation is that QRadar services were restarting at the time, and so the QRadar console wasn't collecting syslog events. This does happen, so make sure that your app can handle these sorts of exceptions gracefully. It should repeatedly sleep for a bit and retry until it succeeds.

Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
50YWKCY4F3 gravatar image tarang777 (51)   May 29, 2018 at 12:58 AM 0
Share

[DZ] That was trying to connect to the QRadar console syslog port?

Yes it connects to syslog port. The address var contains (console address, 514)

I also think that the Qradar might be restarting and that caused the exception. But even after a complete restart, the same exception is logged every 2 sec and no connection got established. So, how do I handle it gracefully, I mean it obviously tries again and again without success?

Follow this question

144 people are following this question.

Answers

Answers & comments

Related questions

BIG IP ASM QRadar 0 Answers

Fetch data from reference data tables. 1 Answer

Hardcoded devicetypeid doesn't work with other application with same devicetypeid? 0 Answers

QRadar syslogging RHEL 7 1 Answer

Best practice to use log source identifier to identify events? 0 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • DataPower
  • Decision Optimization
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges