[JBoss JIRA] (WFCORE-4551) Cannot add Elytron jdbc-realm using embedded server in admin mode
by David Gill (Jira)
David Gill created WFCORE-4551:
----------------------------------
Summary: Cannot add Elytron jdbc-realm using embedded server in admin mode
Key: WFCORE-4551
URL: https://issues.jboss.org/browse/WFCORE-4551
Project: WildFly Core
Issue Type: Bug
Components: CLI, Embedded
Affects Versions: 9.0.1.Final, 8.0.0.Final
Reporter: David Gill
Assignee: Jean Francois Denise
On a fresh a Wildfly install (tested on 16.final and 17.final) the following jboss-cli commands will fail to add an Elytron jdbc-realm to an embedded server using the ExampleDS data source that is predefined out-of-the-box:
{noformat}
embed-server --server-config=standalone.xml
/subsystem=elytron/jdbc-realm=MyRealm:add(principal-query=[{sql="SELECT * FROM Users WHERE username = ?", data-source=ExampleDS}])
{noformat}
Resulting in this error:
{noformat}
ERROR [org.jboss.as.controller.management-operation] (pool-3-thread-1) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "elytron"),
("jdbc-realm" => "MyRealm")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.data-source.ExampleDS"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["org.wildfly.security.security-realm.MyRealm is missing [org.wildfly.data-source.ExampleDS]"]
}
{
"outcome" => "failed",
"failure-description" => {
"WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.data-source.ExampleDS"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["org.wildfly.security.security-realm.MyRealm is missing [org.wildfly.data-source.ExampleDS]"]
},
"rolled-back" => true
}
{noformat}
If you instead embed the server using {{--admin-only=false}} then the jdbc-realm will be added successfully.
A workaround seems to be to first add and remove some other type of realm with the same name as the jdbc-realm you want to add, here for example using an identity-realm:
{noformat}
embed-server --server-config=standalone.xml
# First add & remove a dummy realm with the same name as the jdbc-realm you want to add
/subsystem=elytron/identity-realm=MyRealm:add(identity='dummy identity realm')
/subsystem=elytron/identity-realm=MyRealm:remove
# Now the jdbc-realm will add successfully
/subsystem=elytron/jdbc-realm=MyRealm:add(principal-query=[{sql="SELECT * FROM Users WHERE username = ?", data-source=ExampleDS}])
{noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (WFCORE-4550) Create a test to validate CLI embedded server output after a reload
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFCORE-4550?page=com.atlassian.jira.plugi... ]
Brian Stansberry edited comment on WFCORE-4550 at 6/26/19 12:21 PM:
--------------------------------------------------------------------
We should never use ':reload' in a CLI context. Or even type it. ;-)
The low-level ':reload' operation isn't meant to work properly in the CLI context so checking what ways it breaks...meh. If we type it in a CLI context that just encourages users to make the mistake of using it.
was (Author: brian.stansberry):
We should never use ':reload' in a CLI context. Or even type it. ;-)
It's 'reload'. The high level command, not the low-level operation.
> Create a test to validate CLI embedded server output after a reload
> -------------------------------------------------------------------
>
> Key: WFCORE-4550
> URL: https://issues.jboss.org/browse/WFCORE-4550
> Project: WildFly Core
> Issue Type: Task
> Components: CLI, Test Suite
> Reporter: James Perkins
> Assignee: James Perkins
> Priority: Minor
>
> There are tests that validate the output however these use the {{CommandContext}} which doesn't consume all the console output. It would be useful to have a test which uses a new process to test for things like WFCORE-4543.
> Some thought will need to go into this on how it would work. We should use a {{:reload(running-mode=admin-only)}} operation and wait for the server to be ready, then use something like {{echo hello}} to ensure that logging was not configured on the CLI {{LogContext}}.
> This is not an urgent issue as manually verifying this is easy. However in the past we've had other issues similar to this and the output really should be verified. Both the {{:reload}} operation and {{reload}} command should likely be tested.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (WFCORE-4550) Create a test to validate CLI embedded server output after a reload
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFCORE-4550?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-4550:
------------------------------------------
We should never use ':reload' in a CLI context. Or even type it. ;-)
It's 'reload'. The high level command, not the low-level operation.
> Create a test to validate CLI embedded server output after a reload
> -------------------------------------------------------------------
>
> Key: WFCORE-4550
> URL: https://issues.jboss.org/browse/WFCORE-4550
> Project: WildFly Core
> Issue Type: Task
> Components: CLI, Test Suite
> Reporter: James Perkins
> Assignee: James Perkins
> Priority: Minor
>
> There are tests that validate the output however these use the {{CommandContext}} which doesn't consume all the console output. It would be useful to have a test which uses a new process to test for things like WFCORE-4543.
> Some thought will need to go into this on how it would work. We should use a {{:reload(running-mode=admin-only)}} operation and wait for the server to be ready, then use something like {{echo hello}} to ensure that logging was not configured on the CLI {{LogContext}}.
> This is not an urgent issue as manually verifying this is easy. However in the past we've had other issues similar to this and the output really should be verified. Both the {{:reload}} operation and {{reload}} command should likely be tested.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (WFCORE-4550) Create a test to validate CLI embedded server output after a reload
by James Perkins (Jira)
James Perkins created WFCORE-4550:
-------------------------------------
Summary: Create a test to validate CLI embedded server output after a reload
Key: WFCORE-4550
URL: https://issues.jboss.org/browse/WFCORE-4550
Project: WildFly Core
Issue Type: Task
Components: CLI, Test Suite
Reporter: James Perkins
Assignee: James Perkins
There are tests that validate the output however these use the {{CommandContext}} which doesn't consume all the console output. It would be useful to have a test which uses a new process to test for things like WFCORE-4543.
Some thought will need to go into this on how it would work. We should use a {{:reload(running-mode=admin-only)}} operation and wait for the server to be ready, then use something like {{echo hello}} to ensure that logging was not configured on the CLI {{LogContext}}.
This is not an urgent issue as manually verifying this is easy. However in the past we've had other issues similar to this and the output really should be verified. Both the {{:reload}} operation and {{reload}} command should likely be tested.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (DROOLS-4245) [DMN Designer] Documentation - Enhance presentation
by Elizabeth Clayton (Jira)
[ https://issues.jboss.org/browse/DROOLS-4245?page=com.atlassian.jira.plugi... ]
Elizabeth Clayton commented on DROOLS-4245:
-------------------------------------------
[~karreiro][~tirelli] Could you answer the questions that [~bdellasc] posted when you have a chance.? Sounds like he won't be able to commit to the work until he can assess the scope better. cc'ing [~stetson.robinson]
> [DMN Designer] Documentation - Enhance presentation
> ---------------------------------------------------
>
> Key: DROOLS-4245
> URL: https://issues.jboss.org/browse/DROOLS-4245
> Project: Drools
> Issue Type: Task
> Components: DMN Editor
> Reporter: Elizabeth Clayton
> Assignee: Brian Dellascio
> Priority: Major
> Labels: UX, UXTeam, VisualDesign, drools-tools
>
> Enhance styles and presentation of the Documentation output.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (WFLY-12031) Memory leak in wildfly transaction client
by Cheng Fang (Jira)
[ https://issues.jboss.org/browse/WFLY-12031?page=com.atlassian.jira.plugin... ]
Cheng Fang edited comment on WFLY-12031 at 6/26/19 10:42 AM:
-------------------------------------------------------------
[~petrjoac] could you try running with the latest wildfly-transaction-client [1.1.4.Final|https://github.com/wildfly/wildfly-transaction-client/release...], and see if that fixes the issue? If not, then we will need to apply the proposed fix on [2019-04-30|https://issues.jboss.org/browse/WFLY-12031?focusedCommentId=13...] in next release (maybe 1.1.5.Final). So either way, I think it's helpful to try out wildfly-transaction-client 1.1.4.Final
was (Author: cfang):
[~petrjoac] could you try running with the latest wildfly-transaction-client [1.1.4.Final|https://github.com/wildfly/wildfly-transaction-client/release...], and see if that fixes the issue? If not, then we will need to apply the proposed fix on [2019-04-30|https://issues.jboss.org/browse/WFLY-12031?focusedCommentId=13...] on top of 1.1.4.Final. So either way, I think it's helpful to try out wildfly-transaction-client 1.1.4.Final
> Memory leak in wildfly transaction client
> -----------------------------------------
>
> Key: WFLY-12031
> URL: https://issues.jboss.org/browse/WFLY-12031
> Project: WildFly
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 15.0.1.Final
> Environment: wildfly-transaction-client-1.1.3.Final
> wildfly.15.0.1.Final
> Windows 10
> Reporter: Joachim Petrich
> Assignee: Cheng Fang
> Priority: Critical
>
> After a volume run of our system we recognized millions of entries in the openFilePaths Object of class FileSystemXAResourceRegistry. When enabling traces for org.wildfly.transaction it seems that for adding an entry a xid string is used
> {code:java}
> XAResourceRegistryFile(Xid xid) throws SystemException {
> xaRecoveryPath.toFile().mkdir(); // create dir if non existent
> final String xidString = SimpleXid.of(xid).toHexString('_');
> this.filePath = xaRecoveryPath.resolve(xidString);
> openFilePaths.add(*xidString*);
> {code}
> and for removing the entire file path:
> {code:java}
> protected void removeResource(XAResource resource) throws XAException {
> if (resources.remove(resource)) {
> if (resources.isEmpty()) {
> // delete file
> try {
> if (fileChannel != null) {
> fileChannel.close();
> }
> Files.delete(filePath);
> // deleting using the filepath as key caused a memory leak,
> // if xid string have been added, therefore build the xid string for removing
> openFilePaths.remove(*filePath.toString()*);
> {code}
> We didn't find any code where this xid are cleaned up.
> As workaround we additionally extract the xid String from the file path and remove the corresponding entry.
> {code:java}
> String xidString = filePath.toString().substring(filePath.toString().indexOf(
> xaRecoveryPath.toString()) + xaRecoveryPath.toString().length() + 1);
> openFilePaths.remove(xidString);
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years
[JBoss JIRA] (WFLY-12031) Memory leak in wildfly transaction client
by Cheng Fang (Jira)
[ https://issues.jboss.org/browse/WFLY-12031?page=com.atlassian.jira.plugin... ]
Cheng Fang commented on WFLY-12031:
-----------------------------------
[~petrjoac] could you try running with the latest wildfly-transaction-client [1.1.4.Final|https://github.com/wildfly/wildfly-transaction-client/release...], and see if that fixes the issue? If not, then we will need to apply the proposed fix on [2019-04-30|https://issues.jboss.org/browse/WFLY-12031?focusedCommentId=13...] on top of 1.1.4.Final. So either way, I think it's helpful to try out wildfly-transaction-client 1.1.4.Final
> Memory leak in wildfly transaction client
> -----------------------------------------
>
> Key: WFLY-12031
> URL: https://issues.jboss.org/browse/WFLY-12031
> Project: WildFly
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 15.0.1.Final
> Environment: wildfly-transaction-client-1.1.3.Final
> wildfly.15.0.1.Final
> Windows 10
> Reporter: Joachim Petrich
> Assignee: Cheng Fang
> Priority: Critical
>
> After a volume run of our system we recognized millions of entries in the openFilePaths Object of class FileSystemXAResourceRegistry. When enabling traces for org.wildfly.transaction it seems that for adding an entry a xid string is used
> {code:java}
> XAResourceRegistryFile(Xid xid) throws SystemException {
> xaRecoveryPath.toFile().mkdir(); // create dir if non existent
> final String xidString = SimpleXid.of(xid).toHexString('_');
> this.filePath = xaRecoveryPath.resolve(xidString);
> openFilePaths.add(*xidString*);
> {code}
> and for removing the entire file path:
> {code:java}
> protected void removeResource(XAResource resource) throws XAException {
> if (resources.remove(resource)) {
> if (resources.isEmpty()) {
> // delete file
> try {
> if (fileChannel != null) {
> fileChannel.close();
> }
> Files.delete(filePath);
> // deleting using the filepath as key caused a memory leak,
> // if xid string have been added, therefore build the xid string for removing
> openFilePaths.remove(*filePath.toString()*);
> {code}
> We didn't find any code where this xid are cleaned up.
> As workaround we additionally extract the xid String from the file path and remove the corresponding entry.
> {code:java}
> String xidString = filePath.toString().substring(filePath.toString().indexOf(
> xaRecoveryPath.toString()) + xaRecoveryPath.toString().length() + 1);
> openFilePaths.remove(xidString);
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years