Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16019

With authentication enabled. Failure of a node when starting the next one with a service in the configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.12
    • None

    Description

      With authentication enabled
      Failure of a node when starting the next one with a service in the configuration

      Reproducer

      public class ServiceDeployTest extends AbstractSecurityTest {
          /** {@inheritDoc} */
          @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
              IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
      
              cfg.setAuthenticationEnabled(true);
      
              cfg.setDataStorageConfiguration(new DataStorageConfiguration()
                  .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
                      .setPersistenceEnabled(true)));
      
              ServiceConfiguration srvcCfg = new ServiceConfiguration();
      
              srvcCfg.setName("CounterService");
              srvcCfg.setMaxPerNodeCount(1);
              srvcCfg.setTotalCount(1);
              srvcCfg.setService(new CounterServiceImpl());
      
              cfg.setServiceConfiguration(srvcCfg);
      
              return cfg;
          }
      
          /** */
          @Test
          public void test() throws Exception {
              startGrid(0);
      
              startGrid(1);
      
              assertEquals(2, G.allGrids().size());
          }
      
          /** {@inheritDoc} */
          @Override protected void beforeTest() throws Exception {
              super.beforeTest();
      
              cleanPersistenceDir();
          }
      
          /** */
          public static class CounterServiceImpl implements Service {
              /** Is started. */
              volatile boolean isStarted = false;
      
              /** Cntr. */
              private AtomicInteger cntr = null;
      
              /** {@inheritDoc} */
              @Override public void cancel() {
                  isStarted = false;
              }
      
              /** {@inheritDoc} */
              @Override public void init() throws Exception {
                  isStarted = true;
      
                  cntr = new AtomicInteger();
              }
      
              /** {@inheritDoc} */
              @Override public void execute() throws Exception {
                  while (isStarted) {
                      cntr.incrementAndGet();
      
                      TimeUnit.SECONDS.sleep(1);
                  }
              }
          }
      }
      

      ERROR

      [2021-11-29 17:20:51,883][ERROR][tcp-disco-msg-worker-[crd]-#3%service.ServiceDeployTest0%-#66%service.ServiceDeployTest0%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=SYSTEM_WORKER_TERMINATION, err=java.lang.IllegalStateException: Failed to find security context for subject with given ID : b9a59be8-3ff5-48b5-bd1e-5927f7a00001]]
      java.lang.IllegalStateException: Failed to find security context for subject with given ID : b9a59be8-3ff5-48b5-bd1e-5927f7a00001
      	at org.apache.ignite.internal.processors.security.IgniteSecurityProcessor.withContext(IgniteSecurityProcessor.java:167)
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.onJoiningNodeDataReceived(IgniteServiceProcessor.java:379)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$5.onExchange(GridDiscoveryManager.java:1054)
      	at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.onExchange(TcpDiscoverySpi.java:2201)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processNodeAddedMessage(ServerImpl.java:5116)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processJoinRequestMessage(ServerImpl.java:4749)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processMessage(ServerImpl.java:3233)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.processMessage(ServerImpl.java:2920)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$MessageWorker.body(ServerImpl.java:8106)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$RingMessageWorker.body(ServerImpl.java:3091)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125)
      	at org.apache.ignite.spi.discovery.tcp.ServerImpl$MessageWorkerThread.body(ServerImpl.java:8037)
      	at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:58)
      
      

      WA
      Set services in the configuration of the first node

      Attachments

        Issue Links

          Activity

            People

              nizhikov Nikolay Izhikov
              RyzhovSV Sergei Ryzhov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m