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

Cache_MaxSize warning messages #329

Closed
rauldpm opened this issue Jul 23, 2024 · 5 comments
Closed

Cache_MaxSize warning messages #329

rauldpm opened this issue Jul 23, 2024 · 5 comments
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@rauldpm
Copy link
Member

rauldpm commented Jul 23, 2024

Description

The following messages have been found in the v4.9.0-alpha3 AMI related to a cache_maxsize warning

/var/log/wazuh-indexer/wazuh-cluster_server.json:{"type": "server", "timestamp": "2024-07-22T18:57:06,117Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "wazuh-cluster", "node.name": "node-1", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])" }
/var/log/wazuh-indexer/wazuh-cluster_server.json:{"type": "server", "timestamp": "2024-07-22T18:57:11,098Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "wazuh-cluster", "node.name": "node-1", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "qfXq7LsDSdePocAvVAcDFA", "node.id": "d-zLG1gNSQWCHE4hLMhimw"  }
/var/log/wazuh-indexer/wazuh-cluster.log:[2024-07-22T18:57:06,117][WARN ][o.o.p.c.u.JsonConverter  ] [node-1] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])

We need to determine the origin of this warning and why it is appearing

This error appeared in the following testing issues

Related

@f-galland
Copy link
Member

I got to reproduce this:

/var/log/wazuh-indexer/wazuh-cluster.log:[2024-07-25T10:13:20,666][WARN ][o.o.p.c.u.JsonConverter  ] [node-1] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/wazuh-indexer/wazuh-cluster_server.json:{"type": "server", "timestamp": "2024-07-25T05:12:34,266-03:00", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "wazuh-cluster", "node.name": "node-1", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "N71f9yWEQQy5cy0SkPAcSQ", "node.id": "IROodFS5RTiaAqF_x6JxhA"  }

@f-galland
Copy link
Member

This is also present on a vanilla opensearch 2.13 install

root@ubuntu:~# grep -Ri 'cachemaxsize' /var/log/opensearch/
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:03,185][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:08,157][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:13,160][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:18,161][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:23,163][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:28,165][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:33,165][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch.log:[2024-07-25T14:29:38,166][WARN ][o.o.p.c.u.JsonConverter  ] [ubuntu] Json Mapping Error: Cannot invoke "java.lang.Long.longValue()" because "this.cacheMaxSize" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus["Cache_MaxSize"])
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:03,185Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])" }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:08,157Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:13,160Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:18,161Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:23,163Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:28,165Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:33,165Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }
/var/log/opensearch/opensearch_server.json:{"type": "server", "timestamp": "2024-07-25T14:29:38,166Z", "level": "WARN", "component": "o.o.p.c.u.JsonConverter", "cluster.name": "opensearch", "node.name": "ubuntu", "message": "Json Mapping Error: Cannot invoke \"java.lang.Long.longValue()\" because \"this.cacheMaxSize\" is null (through reference chain: org.opensearch.performanceanalyzer.collectors.CacheConfigMetricsCollector$CacheMaxSizeStatus[\"Cache_MaxSize\"])", "cluster.uuid": "TR1ShFD0T1KH0C2-Vp1LUg", "node.id": "D3XVOkyIScu7yt6XI43SjA"  }

@f-galland
Copy link
Member

However, it doesn't seem to happen under 2.15:

root@ubuntu:~# OPENSEARCH_INITIAL_ADMIN_PASSWORD=Secret.Password.1234 apt install ./opensearch-2.15.0-linux-x64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'opensearch' instead of './opensearch-2.15.0-linux-x64.deb'
The following NEW packages will be installed:
  opensearch
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 0 B/893 MB of archives.
After this operation, 1171 MB of additional disk space will be used.
Get:1 /root/opensearch-2.15.0-linux-x64.deb opensearch amd64 2.15.0 [893 MB]
Selecting previously unselected package opensearch.
(Reading database ... 37700 files and directories currently installed.)
Preparing to unpack .../opensearch-2.15.0-linux-x64.deb ...
Running OpenSearch Pre-Installation Script
Unpacking opensearch (2.15.0) ...
Setting up opensearch (2.15.0) ...
Running OpenSearch Post-Installation Script
### NOT starting on installation, please execute the following statements to configure opensearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable opensearch.service
### You can start opensearch service by executing
 sudo systemctl start opensearch.service
### Create opensearch demo certificates in /etc/opensearch/
 See demo certs creation log in /var/log/opensearch/install_demo_configuration.log
### Breaking change in packaging since 2.13.0
 In 2.13.0 and later releases of OpenSearch, we have changed the permissions associated with access to installed files
 If you are configuring tools that require read access to the OpenSearch configuration files, we recommend you add the user that runs these tools to the 'opensearch' group
 For more information, see https://github.com/opensearch-project/opensearch-build/pull/4043
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
N: Download is performed unsandboxed as root as file '/root/opensearch-2.15.0-linux-x64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
root@ubuntu:~# systemctl start opensearch
root@ubuntu:~# grep -Ri 'cachemaxsize' /var/log/opensearch/
root@ubuntu:~# 

@f-galland
Copy link
Member

f-galland commented Jul 25, 2024

It looks like this was addressed in this PR:

Bumping our fork to 2.15 should get rid of the warning as well.

@wazuhci wazuhci moved this from In progress to Blocked in Release 4.9.0 Jul 25, 2024
@gdiazlo
Copy link
Member

gdiazlo commented Jul 31, 2024

Closing as this is already fixed in upstream OpenSearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants