Nexus3.27 apt repo can't search lastest version

hello, I use the Nexuser3.27 in k8s. Today when I posted a deb bag into Nexus Apt Host Repo, it was successfu and found in the Nexus Web, but it can’t search by 'apt serch’. I could find the log.

2021-01-19 02:01:36,621+0000 DEBUG [event-12-thread-16800] anonymous org.sonatype.nexus.repository.search.index.SearchIndexServiceImpl - Bulk adding to index document 93b9b9eb9a7ecb0696b975dfc4a0ac2f from RepositoryImpl$$EnhancerByGuice$$f168a4a4{type=hosted, format=apt, name='xxx'}: {
  "isPrerelease" : false,
  "assets" : [ {
    "content_type" : "application/x-debian-package",
    "name" : "pool/d/xxx/xxx_2.9.1-20210118090419_amd64.deb",
    "attributes" : {
      "provenance" : {
        "hashes_not_verified" : false
      },
      "checksum" : {
        "sha1" : "b2c66fef75ffe1d382217a7966d84217fbfce84a",
        "sha256" : "0b0364ac1c053fbd7e30d3396ae6dee7d3c51ad2239e933b5a925ccc4a644de9",
        "md5" : "1989296971fba7b460a70e9386dda02d"
      },
      "content" : {
        "last_modified" : 1610960663511
      },
      "apt" : {
        "package_version" : "2.9.1-20210118090419",
        "package_name" : "xxxx",
        "index_section" : ".....\nSize: 1880012\nMD5Sum: 1989296971fba7b460a70e9386dda02d\nSHA1: b2c66fef75ffe1d382217a7966d84217fbfce84a\nSHA256: 0b0364ac1c053fbd7e30d3396ae6dee7d3c51ad2239e933b5a925ccc4a644de9",
        "asset_kind" : "DEB",
        "architecture" : "amd64"
      }
    },
    "id" : "7f6379d32f8dd78f7961fc6699d7f89b"
  } ],
  "format" : "apt",
  "name" : "xxxx",
  "attributes" : { },
  "normalized_version" : "000000002.000000009.000000001-20210118090419",
  "lastDownloaded" : "2021-01-19T02:01:36.615+0000",
  "version" : "2.9.1-20210118090419",
  "lastBlobUpdated" : "2021-01-18T09:04:23.629+0000",
  "repository_name" : "xxx",
  "group" : "amd64"
}
2021-01-19 02:01:36,621+0000 DEBUG [search-service-impl 0-5-thread-1] *SYSTEM org.sonatype.nexus.repository.search.index.BulkProcessorUpdater - Trying to add index/delete request to batch.
2021-01-19 02:01:36,621+0000 DEBUG [search-service-impl 0-5-thread-1] *SYSTEM org.sonatype.nexus.repository.search.index.BulkProcessorUpdater - Added index/delete request to batch.
2021-01-19 02:01:36,622+0000 DEBUG [search-service-impl 0-5-thread-1] *SYSTEM org.sonatype.nexus.repository.search.index.BulkProcessorFlusher - Trying to flush indexes ...
2021-01-19 02:01:36,622+0000 DEBUG [search-service-impl 0-5-thread-1] *SYSTEM org.sonatype.nexus.repository.search.index.BulkIndexUpdateListener - index update starting, executionId: 13473, request count: 1, request size (bytes): 2007

Then I checked the metadata page, like

dists/bionic/main/binary-amd64/Packages

I could’t find this version bag. After some mins( more than 10mins), suddenly it could search in this page. I did nothing and didn’t know what happened.

I think there are maybe the Nexus Resource is not enough. Here are some info.

resources:
  limits:
    cpu: 8
    memory: 32Gi
  requests:
    cpu: 8
    memory: 32Gi

INSTALL4J_ADD_VM_PARAMS: "-Xms4g -Xmx4g -XX:MaxDirectMemorySize=17530M  -Djava.util.prefs.userRoot=/nexus-data"

By the way, I also checked the metric info.

I don’t know how to repeat this problems , Of course , May I check the index in Nexus? I don’t know how nexus updates the metadata information after the file is uploaded. Es and Lucene are used here, but I can’t find the corresponding API inside the pod

You can see a list of system requirements in our documentation (System Requirements). I’d bet your k8s nxrm instance has a very slow disk which will cause performance issues, but it could also be related to memory or cpu.

thanks for answer. If there is an API to track the index update process, it will help troubleshoot problems.

We don’t provide an API but you can make http access to elasticsearch available. I wouldn’t recommend leaving it enabled as you’ll be opening up a potential vulnerability in your instance. Elasticsearch is configured in nexus-<version>/ etc/fabric/elasticsearch.yml. If you modify that file to make http.enabled: true then you can use normal elasticsearch tools to evaluate elasticsearch. I believe we’re still on the 2.4.x line of elasticsearch so you may need to use older versions of elasticsearch tooling.