[JBoss JIRA] (ISPN-6341) StateTransferManager should be the first component to stop
by Dan Berindei (JIRA)
Dan Berindei created ISPN-6341:
----------------------------------
Summary: StateTransferManager should be the first component to stop
Key: ISPN-6341
URL: https://issues.jboss.org/browse/ISPN-6341
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.2.0.CR1
Reporter: Dan Berindei
Assignee: Dan Berindei
When a cache stops, it first removes the component registry from the {{GlobalComponentsRegistry}}'s {{namedComponents}} map, which means the node (let's call it {{A}}) will reply with a {{CacheNotFoundResponse}} to any remote command.
Another node {{B}} trying to execute a write/transactional command will receive the {{CacheNotFoundResponse}}, assume that a new cache topology with id {{current topology id + 1}} is coming soon, and wait for that new topology before retrying.
Normally this is not a problem, because {{StateTransferManagerImpl.stop()}} sends a {{CacheTopologyControlCommand(LEAVE)}} to the coordinator quickly enough, then {{B}} receives the {{current topology id + 1}} topology and retries the command.
But in some cases, the cache components that stop before {{StateTransferManagerImpl}} can take a long time to do so. In particular, because of {{ISPN-5507}}, {{TransactionTable}} can block for {{cacheStopTimeout}} if there are remote transactions in progress, even though the cache can no longer process remote commands.
We should give {{StateTransferManagerImpl.stop()}} a priority of {{0}}, so that the {{CacheTopologyControlCommand(LEAVE)}} comand is sent as soon as possible.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-6261) CLI fails on secured caches
by Vojtech Juranek (JIRA)
[ https://issues.jboss.org/browse/ISPN-6261?page=com.atlassian.jira.plugin.... ]
Vojtech Juranek updated ISPN-6261:
----------------------------------
Description:
When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
{noformat}
00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "datagrid-infinispan"),
("cache-container" => "local")
]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
{noformat}
*Steps to reproduce:*
* create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
* create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
{noformat}
<cache-container name="local" default-cache="testcache">
<security>
<authorization>
<identity-role-mapper/>
<role name="admin" permissions="ADMIN" />
</authorization>
</security>
<local-cache name="testcache" start="EAGER" batching="false">
<security>
<authorization roles="admin" enabled="true"/>
</security>
<transaction mode="NONE"/>
</local-cache>
</cache-container>
{noformat}
* start ISPN server in standalone mode
* start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
* once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
Alternatively, you can run CLI without GUI and run
{noformat}
cd subsystem=datagrid-infinispan/cache-container=local
ls
{noformat}
was:
When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
{noformat}
00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "datagrid-infinispan"),
("cache-container" => "local")
]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
{noformat}
*Steps to reproduce:*
* create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
* create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
{noformat}
<cache-container name="local" default-cache="testcache">
<security>
<authorization>
<identity-role-mapper/>
<role name="admin" permissions="ADMIN" />
</authorization>
</security>
<local-cache name="testcache" start="EAGER" batching="false">
<security>
<authorization roles="admin" enabled="true"/>
</security>
<transaction mode="NONE"/>
</local-cache>
</cache-container>
{noformat}
* start ISPN server in standalone mode
* start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
* once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
> CLI fails on secured caches
> ---------------------------
>
> Key: ISPN-6261
> URL: https://issues.jboss.org/browse/ISPN-6261
> Project: Infinispan
> Issue Type: Bug
> Components: CLI, Security
> Reporter: Vojtech Juranek
> Assignee: Vojtech Juranek
>
> When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
> {noformat}
> 00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "datagrid-infinispan"),
> ("cache-container" => "local")
> ]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
> at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
> at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
> at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
> at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
> {noformat}
> *Steps to reproduce:*
> * create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
> * create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
> {noformat}
> <cache-container name="local" default-cache="testcache">
> <security>
> <authorization>
> <identity-role-mapper/>
> <role name="admin" permissions="ADMIN" />
> </authorization>
> </security>
> <local-cache name="testcache" start="EAGER" batching="false">
> <security>
> <authorization roles="admin" enabled="true"/>
> </security>
> <transaction mode="NONE"/>
> </local-cache>
> </cache-container>
> {noformat}
> * start ISPN server in standalone mode
> * start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
> * once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
> Alternatively, you can run CLI without GUI and run
> {noformat}
> cd subsystem=datagrid-infinispan/cache-container=local
> ls
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-5507) Transactions committed immediately before cache stop can block shutdown
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5507?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-5507:
------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1315393
Bugzilla Update: Perform
> Transactions committed immediately before cache stop can block shutdown
> -----------------------------------------------------------------------
>
> Key: ISPN-5507
> URL: https://issues.jboss.org/browse/ISPN-5507
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Test Suite - Core
> Affects Versions: 7.2.1.Final, 8.0.0.Alpha1
> Reporter: Dan Berindei
> Priority: Blocker
> Labels: testsuite_stability
> Fix For: 8.2.0.Final
>
>
> This is causing random failures in {{DistributedEntryRetrieverTxTest.verifyNodeLeavesBeforeGettingData}}.
> The test inserts some values into the cache, starts an iteration, and then kills one of the nodes. In rare instances, the killed cache only receives the TxCompletionCommand for one of the writes after it started the shutdown, and ignores it. That leaves the remote tx on-going, and {{TransactionTable.shutDownGracefully()}} blocks for 30 seconds - causing a {{TimeoutException}} elsewhere in the test.
> {noformat}
> 10:52:18,129 TRACE (remote-thread-NodeAM-p12133-t6:) [CommandAwareRpcDispatcher] About to send back response SuccessfulResponse{responseValue=null} for command CommitCommand {gtx=GlobalTransaction:<NodeAL-45757>:22325:remote, cacheName='org.infinispan.iteration.DistributedEntryRetrieverTxTest', topologyId=4}
> 10:52:18,129 TRACE (testng-DistributedEntryRetrieverTxTest:) [JGroupsTransport] dests=[NodeAM-45518, NodeAL-45757], command=TxCompletionNotificationCommand{ xid=null, internalId=0, topologyId=4, gtx=GlobalTransaction:<NodeAL-45757>:22325:local, cacheName=org.infinispan.iteration.DistributedEntryRetrieverTxTest} , mode=ASYNCHRONOUS, timeout=15000
> 10:52:18,133 DEBUG (testng-DistributedEntryRetrieverTxTest:) [CacheImpl] Stopping cache org.infinispan.iteration.DistributedEntryRetrieverTxTest on NodeAM-45518
> 10:52:18,133 TRACE (OOB-2,NodeAM-45518:) [GlobalInboundInvocationHandler] Attempting to execute CacheRpcCommand: TxCompletionNotificationCommand{ xid=null, internalId=0, topologyId=4, gtx=GlobalTransaction:<NodeAL-45757>:22325:local, cacheName=org.infinispan.iteration.DistributedEntryRetrieverTxTest} [sender=NodeAL-45757]
> 10:52:18,133 TRACE (OOB-2,NodeAM-45518:) [GlobalInboundInvocationHandler] Silently ignoring that org.infinispan.iteration.DistributedEntryRetrieverTxTest cache is not defined
> 10:52:18,133 DEBUG (testng-DistributedEntryRetrieverTxTest:) [TransactionTable] Wait for on-going transactions to finish for 30 seconds.
> 10:52:48,139 WARN (testng-DistributedEntryRetrieverTxTest:) [TransactionTable] ISPN000100: Stopping, but there are 0 local transactions and 1 remote transactions that did not finish in time.
> 10:52:48,386 ERROR (testng-DistributedEntryRetrieverTxTest:) [UnitTestTestNGListener] Test verifyNodeLeavesBeforeGettingData(org.infinispan.iteration.DistributedEntryRetrieverTxTest) failed.
> java.lang.IllegalStateException: Thread already timed out waiting for event pre_send_response_released
> at org.infinispan.test.fwk.CheckPoint.trigger(CheckPoint.java:131)
> at org.infinispan.test.fwk.CheckPoint.trigger(CheckPoint.java:116)
> at org.infinispan.iteration.DistributedEntryRetrieverTest.verifyNodeLeavesBeforeGettingData(DistributedEntryRetrieverTest.java:105)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-6293) Registering a clustered listener in a DIST cluster leads to SuspectException if one member is not joined yet
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-6293?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-6293:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Integrated. Thanks [~william.burns]!
> Registering a clustered listener in a DIST cluster leads to SuspectException if one member is not joined yet
> ------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-6293
> URL: https://issues.jboss.org/browse/ISPN-6293
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 8.2.0.Beta2
> Reporter: Adrian Nistor
> Assignee: William Burns
> Fix For: 8.2.0.Final
>
>
> Reproducer:
> {code}
> import org.infinispan.configuration.cache.CacheMode;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.notifications.Listener;
> import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
> import org.infinispan.notifications.cachelistener.event.CacheEntryEvent;
> import org.infinispan.test.MultipleCacheManagersTest;
> import org.testng.annotations.Test;
> @Test(groups = "functional", testName = "ClusteredListenerJoinsTest")
> public class ClusteredListenerJoinsTest extends MultipleCacheManagersTest {
> @Listener(clustered = true)
> private static final class NoOpListener {
> @CacheEntryCreated
> public void handleEvent(CacheEntryEvent<Object, Object> e) {
> }
> }
> @Override
> protected void createCacheManagers() {
> ConfigurationBuilder c = buildConfiguration();
> createCluster(c, 3);
> waitForClusterToForm();
> }
> private ConfigurationBuilder buildConfiguration() {
> ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); //unreproducible with CacheMode.REPL_SYNC
> c.clustering().hash().numOwners(2);
> return c;
> }
> public void testJoins() {
> cache(0).addListener(new NoOpListener());
> addClusterEnabledCacheManager(buildConfiguration());
> //waitForClusterToForm();
> cache(0).addListener(new NoOpListener()); //fails most times with SuspectException; uncomment the line above to ensure it does not fail
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-6339) Indexing information not displayed
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-6339?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-6339:
-------------------------------------
The DMR support for :mass-reindex already exists, it just needs the UI part. The indexing statistics are not exposed in DMR. This should be in a different jira.
> Indexing information not displayed
> ----------------------------------
>
> Key: ISPN-6339
> URL: https://issues.jboss.org/browse/ISPN-6339
> Project: Infinispan
> Issue Type: Enhancement
> Components: Console
> Reporter: Pedro Zapata
> Assignee: Vladimir Blagojevic
>
> Currently, no indexing information is displayed. Also, there should be the need to issue a reindex operation (DMR: mass-reindex) and display result error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-6261) CLI fails on secured caches
by Vojtech Juranek (JIRA)
[ https://issues.jboss.org/browse/ISPN-6261?page=com.atlassian.jira.plugin.... ]
Vojtech Juranek updated ISPN-6261:
----------------------------------
Description:
When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
{noformat}
00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "datagrid-infinispan"),
("cache-container" => "local")
]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
{noformat}
*Steps to reproduce:*
* create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
* create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
{noformat}
<cache-container name="local" default-cache="testcache">
<security>
<authorization>
<identity-role-mapper/>
<role name="admin" permissions="ADMIN" />
</authorization>
</security>
<local-cache name="testcache" start="EAGER" batching="false">
<security>
<authorization roles="admin" enabled="true"/>
</security>
<transaction mode="NONE"/>
</local-cache>
</cache-container>
{noformat}
* start ISPN server in standalone mode
* start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
* once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
was:
When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
{noformat}
00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "datagrid-infinispan"),
("cache-container" => "local")
]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
{noformat}
> CLI fails on secured caches
> ---------------------------
>
> Key: ISPN-6261
> URL: https://issues.jboss.org/browse/ISPN-6261
> Project: Infinispan
> Issue Type: Bug
> Components: CLI, Security
> Reporter: Vojtech Juranek
> Assignee: Vojtech Juranek
>
> When running CLI on secured caches, it fails with exception bellow. This exception is quite confusing, as user has properly defined ADMIN permission on given cache. What is actually happening is that some operation, like statistics, called by CLI, iterates over all defined caches, including internal caches, and user hasn't required permission on all these caches (in this case on internal script cache)
> {noformat}
> 00:04:23,563 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "datagrid-infinispan"),
> ("cache-container" => "local")
> ]): java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'Subject with principal(s): [user@ManagementRealm, admin@ManagementRealm, admin, org.jboss.remoting3.security.UserPrincipal@36ebcb, InetAddressPrincipal <127.0.0.1/127.0.0.1>, InetAddressPrincipal <127.0.0.1/127.0.0.1>]' lacks 'ADMIN' permission
> at org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:86)
> at org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
> at org.infinispan.security.impl.SecureCacheImpl.getStats(SecureCacheImpl.java:567)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.calculateAverageRemoveTime(CacheContainerStatsImpl.java:131)
> at org.infinispan.stats.impl.CacheContainerStatsImpl.getAverageRemoveTime(CacheContainerStatsImpl.java:121)
> at org.jboss.as.clustering.infinispan.subsystem.CacheContainerMetricsHandler.executeRuntimeStep(CacheContainerMetricsHandler.java:196)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:53)
> {noformat}
> *Steps to reproduce:*
> * create mgmt user using {{add-user.sh}} script (e.g. user {{user}}) and assign him role {{admin}} in {{standalone/configuration/mgmt-groups.properties}}
> * create secure cache {{testcache}} with following configuration in {{standalone.xml}} (security enabled and admin user has admin rights):
> {noformat}
> <cache-container name="local" default-cache="testcache">
> <security>
> <authorization>
> <identity-role-mapper/>
> <role name="admin" permissions="ADMIN" />
> </authorization>
> </security>
> <local-cache name="testcache" start="EAGER" batching="false">
> <security>
> <authorization roles="admin" enabled="true"/>
> </security>
> <transaction mode="NONE"/>
> </local-cache>
> </cache-container>
> {noformat}
> * start ISPN server in standalone mode
> * start ISPN console in GUI mode ({{ispn-cli.sh --gui --user=user --password=pass}}) and navigate to {{subsystem=datagrid-infinispan -> cache-container=local}}
> * once clicked on {{cache-container=local}} no cache should appear there (while there should be {{testcache}}) and exception above should appear in ISPN server log
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-6300) Parameters, CacheManager and Marshaller are not passed to JavaScript in case of mode=distributed
by Anna Manukyan (JIRA)
[ https://issues.jboss.org/browse/ISPN-6300?page=com.atlassian.jira.plugin.... ]
Anna Manukyan updated ISPN-6300:
--------------------------------
Description:
When in javascript file the mode is set to distributed, the cacheManager, marshaller and parameters are not passed from the server.
{code}
// mode=distributed,language=javascript,parameters=[a]
cache.put("a", a)
cacheManager.getAddress()
{code}
Java Call:
{code}
CompletableFuture<ArrayList<JGroupsAddress>> resultsFuture = scriptingManager.runScript("distExec.js", new TaskContext().cache(cache(0)).addParameter("a", "value"));
{code}
The following line execution throws:
{code}
Caused by: <eval>:3 ReferenceError: "a" is not defined
or
"cacheManager" is not defined if the cache put is commented.
{code}
UPDATE:
When the same script is run using on Hotrod Server via Hotrod client, the following exception is thrown:
{code}
org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=53 returned server error (status=0x85): java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
org.infinispan.commons.marshall.NotSerializableException: jdk.nashorn.api.scripting.ScriptObjectMirror
an exception which occurred:
in field ecmaError
in field cause
in field cause
in object org.infinispan.commons.CacheException@5f8d3629
-> toString = org.infinispan.commons.CacheException: ISPN026003: Script execution error
in object org.infinispan.remoting.responses.ExceptionResponse@19da5d4b
-> toString = ExceptionResponse
at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:343)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:132)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:118)
at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
at org.infinispan.client.hotrod.impl.operations.ExecuteOperation.executeOperation(ExecuteOperation.java:49)
at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.execute(RemoteCacheImpl.java:703)
at org.infinispan.client.hotrod.ExecTest.testScriptExecutionWithPassingParams(ExecTest.java:119)
...
{code}
was:
When in javascript file the mode is set to distributed, the cacheManager, marshaller and parameters are not passed from the server.
{code}
// mode=distributed,language=javascript,parameters=[a]
cache.put("a", a)
cacheManager.getAddress()
{code}
Java Call:
{code}
CompletableFuture<ArrayList<JGroupsAddress>> resultsFuture = scriptingManager.runScript("distExec.js", new TaskContext().cache(cache(0)).addParameter("a", "value"));
{code}
The following line execution throws:
{code}
Caused by: <eval>:3 ReferenceError: "a" is not defined
or
"cacheManager" is not defined if the cache put is commented.
{code}
> Parameters, CacheManager and Marshaller are not passed to JavaScript in case of mode=distributed
> ------------------------------------------------------------------------------------------------
>
> Key: ISPN-6300
> URL: https://issues.jboss.org/browse/ISPN-6300
> Project: Infinispan
> Issue Type: Bug
> Components: Tasks
> Affects Versions: 8.1.2.Final
> Reporter: Anna Manukyan
>
> When in javascript file the mode is set to distributed, the cacheManager, marshaller and parameters are not passed from the server.
> {code}
> // mode=distributed,language=javascript,parameters=[a]
> cache.put("a", a)
> cacheManager.getAddress()
> {code}
> Java Call:
> {code}
> CompletableFuture<ArrayList<JGroupsAddress>> resultsFuture = scriptingManager.runScript("distExec.js", new TaskContext().cache(cache(0)).addParameter("a", "value"));
> {code}
> The following line execution throws:
> {code}
> Caused by: <eval>:3 ReferenceError: "a" is not defined
> or
> "cacheManager" is not defined if the cache put is commented.
> {code}
> UPDATE:
> When the same script is run using on Hotrod Server via Hotrod client, the following exception is thrown:
> {code}
> org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=53 returned server error (status=0x85): java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
> java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
> org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ExecTest-NodeA-26018, see cause for remote stack trace
> org.infinispan.commons.marshall.NotSerializableException: jdk.nashorn.api.scripting.ScriptObjectMirror
> an exception which occurred:
> in field ecmaError
> in field cause
> in field cause
> in object org.infinispan.commons.CacheException@5f8d3629
> -> toString = org.infinispan.commons.CacheException: ISPN026003: Script execution error
> in object org.infinispan.remoting.responses.ExceptionResponse@19da5d4b
> -> toString = ExceptionResponse
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:343)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:132)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:118)
> at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
> at org.infinispan.client.hotrod.impl.operations.ExecuteOperation.executeOperation(ExecuteOperation.java:49)
> at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:54)
> at org.infinispan.client.hotrod.impl.RemoteCacheImpl.execute(RemoteCacheImpl.java:703)
> at org.infinispan.client.hotrod.ExecTest.testScriptExecutionWithPassingParams(ExecTest.java:119)
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month