Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-28593

InterruptedException: null recording audit event inside RepositoryAuditor.on(org.sonatype.nexus.repository.RepositoryEvent)]

Details

    • 3
    • 2

    Description

      It was noticed a proxy repo was automatically blocked by a check status thread. Then when an audit event was attempted to be recorded for it, that logged an ERROR and exception we have seen before in NEXUS-19253.

      NEXUS-19253 was claimed to be fixed in 3.16.0, but this issue was seen again in 3.31.1.

      2021-08-05 10:19:00,334-0500 INFO  [Check Status https://pypi.python.org]  *UNKNOWN org.sonatype.nexus.repository.httpclient.internal.HttpClientFacetImpl - Repository status for pypi continued as AUTO_BLOCKED_UNAVAILABLE until 2021-08-05T10:20:20.333-05:00 - reason org.apache.http.conn.ConnectTimeoutException: Connect to pypi.python.org:443 [pypi.python.org/199.232.28.223] failed: connect timed out for https://pypi.python.org (previous reason was org.apache.http.conn.ConnectTimeoutException: Connect to pypi.python.org:443 [pypi.python.org/199.232.28.223] failed: connect timed out for https://pypi.python.org)
      
      2021-08-05 10:19:00,335-0500 ERROR [Check Status https://pypi.python.org]  *UNKNOWN com.google.common.eventbus.EventBus.nexus - Could not dispatch event RemoteConnectionStatusEvent{status=Remote Auto Blocked and Unavailable - org.apache.http.conn.ConnectTimeoutException: Connect to pypi.python.org:443 [pypi.python.org/199.232.28.223] failed: connect timed out, repository=RepositoryImpl$$EnhancerByGuice$$690351848{type=proxy, format=pypi, name='pypi'}} to subscriber org.sonatype.nexus.repository.manager.internal.RepositoryAuditor@44d245ee method [public void org.sonatype.nexus.repository.manager.internal.RepositoryAuditor.on(org.sonatype.nexus.repository.RepositoryEvent)]
      java.lang.RuntimeException: java.lang.InterruptedException
       at com.google.common.base.Throwables.propagate(Throwables.java:241)
       at org.sonatype.goodies.common.Locks.lock(Locks.java:47)
       at org.sonatype.goodies.common.Locks.read(Locks.java:57)
       at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:269)
       at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
       at org.sonatype.nexus.audit.internal.AuditRecorderImpl.record(AuditRecorderImpl.java:85)
       at org.sonatype.nexus.audit.AuditorSupport.record(AuditorSupport.java:127)
       at org.sonatype.nexus.repository.manager.internal.RepositoryAuditor.on(RepositoryAuditor.java:99)
       at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
       at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
       at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
       at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
       at com.google.common.eventbus.Dispatcher$ImmediateDispatcher.dispatch(Dispatcher.java:186)
       at com.google.common.eventbus.EventBus.post(EventBus.java:212)
       at org.sonatype.nexus.internal.event.EventManagerImpl.post(EventManagerImpl.java:127)
       at org.sonatype.nexus.repository.httpclient.internal.HttpClientFacetImpl.onStatusChanged(HttpClientFacetImpl.java:217)
       at org.sonatype.nexus.repository.httpclient.internal.BlockingHttpClient.updateStatus(BlockingHttpClient.java:186)
       at org.sonatype.nexus.repository.httpclient.internal.BlockingHttpClient.updateStatusToUnavailable(BlockingHttpClient.java:162)
       at org.sonatype.nexus.repository.httpclient.internal.BlockingHttpClient.filter(BlockingHttpClient.java:137)
       at org.sonatype.nexus.repository.httpclient.FilteredHttpClientSupport.doExecute(FilteredHttpClientSupport.java:56)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
       at org.sonatype.nexus.repository.httpclient.internal.BlockingHttpClient$CheckStatus.run(BlockingHttpClient.java:254)
       at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.InterruptedException: null
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
       at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.tryLock(ReentrantReadWriteLock.java:871)
       at org.sonatype.goodies.common.Locks.lock(Locks.java:42)
       ... 25 common frames omitted
      

      Expected

      Avoid the RuntimeException: java.lang.InterruptedException on recording the audit event, and successfully log the event.

      Attachments

        Activity

          People

            Unassigned Unassigned
            plynch Peter Lynch
            Michael Oliverio Michael Oliverio
            NXRM - Sentinels
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              tigCommentSecurity.panel-title