Skip to content

Cherry-pick #19945 to 7.x: Packetbeat process monitor: Ignore missing /proc/net/tcp6#20013

Merged
adriansr merged 1 commit intoelastic:7.xfrom
adriansr:backport_19945_7.x
Jul 20, 2020
Merged

Cherry-pick #19945 to 7.x: Packetbeat process monitor: Ignore missing /proc/net/tcp6#20013
adriansr merged 1 commit intoelastic:7.xfrom
adriansr:backport_19945_7.x

Conversation

@adriansr
Copy link
Copy Markdown
Contributor

@adriansr adriansr commented Jul 17, 2020

Cherry-pick of PR #19945 to 7.x branch. Original message:

What does this PR do?

This makes Packetbeat's process monitor to continue execution when /proc/net/tcp6 is missing (ipv6 disabled in kernel).

Why is it important?

The process monitor feature was not working when ipv6 was disabled.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • Boot kernel with ipv6.disable=1
  • Run packetbeat with -E packetbeat.procs.enabled=true

Related issues

Closes #19941

Logs

Errors before this fix:

2020-07-15T10:01:30.006Z	ERROR	procs/procs_linux.go:73	GetLocalPortToPIDMapping: parsing '/proc/net/tcp6': open /proc/net/tcp6: no such file or directory
2020-07-15T10:01:30.006Z	ERROR	procs/procs.go:224	unable to list local ports: open /proc/net/tcp6: no such file or directory

Warning after this fix (shown only once):

2020-07-16T12:04:20.802Z	WARN	procs/procs_linux.go:80	No IPv6 socket info reported by the kernel. Process monitor won't enrich IPv6 events

)

This makes Packetbeat's process monitor to continue execution when
/proc/net/tcp6 is missing (ipv6 disabled in kernel).

Closes elastic#19941

(cherry picked from commit 4ce680c)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 17, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 17, 2020
@botelastic
Copy link
Copy Markdown

botelastic bot commented Jul 17, 2020

This pull request doesn't have a Team:<team> label.

@adriansr adriansr merged commit 1a802fb into elastic:7.x Jul 20, 2020
@zube zube bot removed the [zube]: Done label Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants