Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot invoke "Object.getClass()" because "leftObject" is null #362

Closed
abhi1693 opened this issue Dec 15, 2024 · 4 comments
Closed

Cannot invoke "Object.getClass()" because "leftObject" is null #362

abhi1693 opened this issue Dec 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@abhi1693
Copy link

abhi1693 commented Dec 15, 2024

Describe the bug
Processor script with tag script_calculate_time_flow_start_ns in pipeline logs-goflow2.sflow-0.1.1 failed with message Cannot invoke "Object.getClass()" because "leftObject" is null

I'm seeing this error when the logs reach elastic index. I'm unable to find relevant code to understand how to fix the error.

To Reproduce
Steps to reproduce the behavior:
Note: I'm seeing this error only when I run with -produce=raw, with -produce=sample no output is generated.

Command: goflow2 -format json -listen "sflow://:6343?queue_size=1" -mapping /etc/goflow2/mapping.yaml -transport.file /var/log/sflow/goflow2/goflow2.log -produce raw

mapping.yaml

# File: /etc/goflow2/mapping.yaml
formatter:
    fields: # list of fields to format in JSON
        - type
        - time_flow_start_ns
        - sampler_address
        - sequence_num
        - in_if
        - out_if
        - src_addr
        - dst_addr
        - etype
        - proto
        - src_port
        - dst_port
        - src_vlan
        - dst_vlan
        - sampling_rate
        - bytes

Expected behavior
To get output without errors using -produce=sample

Captures
If applicable, add output (JSON, protobuf), packet captures and device configuration.

Sampler device:

  • Brand: [e.g. Cisco, Juniper, Arista, Mikrotik] Cisco
  • Model: [e.g. MX, QFX] NXOS
  • Version: [e.g. 22] 9000v
  • Estimated flow traffic: [e.g. 5000 samples per second] 20 samples per second

GoFlow2:

  • Version: [e.g. v2.0.0] 2.2.1
  • Environment: [e.g. Kubernetes, Docker, Debian package] Debian
  • OS: [e.g. Linux Ubuntu Server 23.04] Ubuntu 24.04

Additional context
Trying to setup https://www.elastic.co/guide/en/integrations/current/goflow2.html

@abhi1693 abhi1693 added the bug Something isn't working label Dec 15, 2024
@lspgn
Copy link
Member

lspgn commented Dec 15, 2024

Hello @abhi1693,

Thank you for reporting. This looks like an elastic bug.
Could you send me a line of JSON that would trigger the issue?
And/or a packet capture?

@lspgn
Copy link
Member

lspgn commented Jan 24, 2025

@abhi1693 are you still experiencing the problem? Will close the ticket if I do not hear back

@abhi1693
Copy link
Author

You can close the ticket for now. It seems the issue was with using a virtual appliance.

@lspgn
Copy link
Member

lspgn commented Jan 24, 2025

Thank you :)

@lspgn lspgn closed this as completed Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants