You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergei Ryzhov (Jira)" <ji...@apache.org> on 2021/11/23 14:19:00 UTC

[jira] [Resolved] (IGNITE-15976) Ignite fail at startup if the service set in the configuration and authenticationEnabled = true

     [ https://issues.apache.org/jira/browse/IGNITE-15976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergei Ryzhov resolved IGNITE-15976.
------------------------------------
    Resolution: Duplicate

> Ignite fail at startup if the service set in the configuration and authenticationEnabled = true
> -----------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-15976
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15976
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Sergei Ryzhov
>            Assignee: Sergei Ryzhov
>            Priority: Major
>              Labels: ise
>
> Ignite fail at startup if the service set in the configuration and authenticationEnabled = true
> {code:java}
> public class ServiceDeployTest extends GridCommonAbstractTest {
>     /** {@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("DemoCounterService");
>         srvcCfg.setMaxPerNodeCount(1);
>         srvcCfg.setTotalCount(1);
>         srvcCfg.setService(new DemoCounterServiceImpl());
>         cfg.setServiceConfiguration(srvcCfg);
>         return cfg;
>     }
>     /** */
>     @Test
>     public void test() throws Exception {
>         startGrid(0);
>     }
>     /** {@inheritDoc} */
>     @Override protected void beforeTest() throws Exception {
>         super.beforeTest();
>         cleanPersistenceDir();
>     }
>     /** */
>     public static class DemoCounterServiceImpl 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);
>             }
>         }
>     }
> }
> {code}
> Exception
> {code:java}
> [2021-11-23 15:22:16,853][ERROR][test-runner-#1%common.ServiceDeployTest%][ServiceDeployTest0] Got exception while starting (will rollback startup routine).
> java.lang.AssertionError
> 	at org.apache.ignite.internal.processors.security.IgniteSecurityProcessor.authorize(IgniteSecurityProcessor.java:232)
> 	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.checkPermissions(IgniteServiceProcessor.java:633)
> 	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.prepareServiceConfigurations(IgniteServiceProcessor.java:593)
> 	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.staticallyConfiguredServices(IgniteServiceProcessor.java:1556)
> 	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.collectJoiningNodeData(IgniteServiceProcessor.java:361)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$5.collect(GridDiscoveryManager.java:1009)
> 	at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.collectExchangeData(TcpDiscoverySpi.java:2143)
> 	at org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:1107)
> 	at org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:474)
> 	at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:2210)
> 	at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:278)
> 	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:1091)
> 	at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1953)
> 	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1300)
> 	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1798)
> 	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1720)
> 	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1159)
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:629)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:1252)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:1169)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:1145)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:998)
> 	at org.apache.ignite.testframework.junits.common.ServiceDeployTest.test(ServiceDeployTest.java:50)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2432)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)