[ https://issues.apache.org/jira/browse/IGNITE-15951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nikolay Izhikov updated IGNITE-15951: ------------------------------------- Fix Version/s: 2.12 > Node fails on startup if service is configured through IgniteConfiguration > and Authentication is enabled > --------------------------------------------------------------------------------------------------------- > > Key: IGNITE-15951 > URL: https://issues.apache.org/jira/browse/IGNITE-15951 > Project: Ignite > Issue Type: Bug > Reporter: Mikhail Petrov > Assignee: Mikhail Petrov > Priority: Major > Fix For: 2.12 > > > Node fails on startup if service is configured through IgniteConfiguration > and Authentication is enabled. > Reproducer: > {code:java} > /** */ > public class ServiceAuthenticationTest extends GridCommonAbstractTest { > /** {@inheritDoc} */ > @Override protected IgniteConfiguration getConfiguration(String > igniteInstanceName) throws Exception { > IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); > cfg.setAuthenticationEnabled(true); > ServiceConfiguration srvcCfg = new ServiceConfiguration(); > srvcCfg.setMaxPerNodeCount(1); > srvcCfg.setTotalCount(1); > srvcCfg.setName("TestService"); > srvcCfg.setService(new TestService()); > cfg.setServiceConfiguration(srvcCfg); > cfg.setDataStorageConfiguration(new DataStorageConfiguration() > .setDefaultDataRegionConfiguration(new DataRegionConfiguration() > .setPersistenceEnabled(true))); > return cfg; > } > /** */ > @Test > public void test() throws Exception { > startGrid(); > } > /** */ > public static class TestService implements Service { > // No-op. > } > } {code} > Exception: > {code:java} > 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:823) > at org.apache.ignite.test.TestClass.test(TestClass.java:54) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > 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.lang.Thread.run(Thread.java:748) {code} > The main problem here is that > org.apache.ignite.internal.processors.service.IgniteServiceProcessor#prepareServiceConfigurations > tries to authorize service deployment operation before node joined topology > in case some services were preconfigured via IgniteConfiguration. -- This message was sent by Atlassian Jira (v8.20.1#820001)