Notification of shutdown commencing
by Brian Stansberry
I can't figure out a way to produce a notification of an impending
server shutdown if a user does a soft kill of the server process.
It's easy enough if shutdown is initiated by a management op; the op
handler can trigger the notification. But a soft kill triggers a
shutdown hook registered by the MSC ServiceContainer, and once that
starts, services start stopping semi-randomly and its too late to notify
anyone that that is going to start happening.
The MSC shutdown stuff isn't exposed, …
[View More]so there's no way to tie into
that. Adding another shutdown hook doesn't help as there's no
predictable order of execution.
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
[View Less]
11 years, 11 months
Graceful Shutdown (Revision 2)
by Jason T. Greene
*EDITED*
We've worked out the rough outline of how graceful shutdown will work in
AS7.
The process of graceful shutdown actually is reflected by a number of
states:
1. Running - all services acting normally
2. Suspending - services refuse new "permits" (see below), existing
permits are allowed to be retained (and threads running under such a
permit may still acquire new permits)
3. Suspended - no permits are present and none may be issued
4. Shutting Down - our existing server stop …
[View More]process / reload admin mode
The following transitions are allowed:
1. Running → Suspending: Transition occurs at user request (to suspend
or gracefully shut down).
2. Suspending → Suspended: Transition occurs when all permits are cleared.
3. Suspending → Running: Transition occurs at user request (to exit
suspend mode or cancel graceful shutdown before it completes).
4. Suspended → Running: Transition occurs at user request (to exit
suspend mode).
5. Suspended → Shutting Down: Transition occurs automatically (if a
graceful shutdown was requested) or at user request (if a shut down
request of any kind is entered in the Suspended state).
6. Running → Shutting Down: Transition occurs at user request (to shut
down the server "un-gracefully").
7. Suspending → Shutting Down (User aborts a graceful shutdown)
These "permits" are issued by the "Shutdown Manager", whose job is to
manage these states. They are issued corresponding to the following events:
1. The invocation of an EJB method
2. The creation of a web session
3. A creation of a transaction
4. MessageEndpoint and WorkManager aquire permit allowing for release()
from a thirdparty to indicate connection close.
When a permit cannot be issued due to the server shutting down, a
standard exception message should be produced so that the user can see a
familiar error message regardless of what mechanism is used to access
the server.
--
- DML
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
[View Less]
12 years, 6 months
Pull Request Retesting Ability
by Jason T. Greene
FYI,
If you submit a pull request and the test fails due to a possible
intermittent failure or some environmental problem (github was down or
something), instead of rebasing your patch to force a retest, you can
now just ask with a phrase that has "retest this please":
Could you retest this please?
jboss-as-pull-request, you are awesome, now go retest this please!
etc
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
12 years, 7 months
Use of CLI to add security-domain
by Wolf-Dieter Fink
Hi,
I try to add this to the standalone.xml via CLI:
<subsystem xmlns="urn:jboss:domain:security:1.2">
<security-domains>
....
<security-domain name="lbank" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required">
<module-option name="usersProperties"
value="${jboss.server.config.dir}/lbank-users.…
[View More]properties"/>
<module-option name="rolesProperties"
value="${jboss.server.config.dir}/lbank-roles.properties"/>
<module-option name="password-stacking"
value="useFirstPass"/>
</login-module>
</authentication>
</security-domain>
If I add it to XML the CLI will show:
/[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank:read-resource(recursive=true)
{
"outcome" => "success",
"result" => {
"acl" => undefined,
"audit" => undefined,
"authorization" => undefined,
"cache-type" => "default",
"identity-trust" => undefined,
"jsse" => undefined,
"mapping" => undefined,
"authentication" => {"classic" => {"login-modules" => [{
"code" => "UsersRoles",
"flag" => "required",
"module-options" => [
("usersProperties" => expression
"${jboss.server.config.dir}/lbank-users.properties"),
("rolesProperties" => expression
"${jboss.server.config.dir}/lbank-roles.properties"),
("password-stacking" => "useFirstPass")
]
}]}}
}
}
[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:read-attribute(name=login-modules)
{
"outcome" => "success",
"result" => [{
"code" => "UsersRoles",
"flag" => "required",
"module-options" => [
("usersProperties" => expression
"${jboss.server.config.dir}/lbank-users.properties"),
("rolesProperties" => expression
"${jboss.server.config.dir}/lbank-roles.properties"),
("password-stacking" => "useFirstPass")
]
}]
}
/
#simple is
//subsystem=security/security-domain=lbank:add(cache-type=default)/
but how to know that "classic" must used?
//subsystem=security/security-domain=lbank/authentication=/
tab completition will not help, only if I type =classic: the tab
completition will show commands otherwise not
I suppose that this should be correct, but it shows an error:
EAP6
/[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])
{
"outcome" => "failed",
"failure-description" => "JBAS014688: Wrong type for value.
Expected [LIST] but was STRING",
"rolled-back" => true
}
/
AS7.2 (upstream)
/[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])
{
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource '[
(\"subsystem\" => \"security\"),
(\"security-domain\" => \"lbank2\"),
(\"authentication\" => \"classic\")
]' not found",
"rolled-back" => true
}/
Next difficulty is to add the module-options with expressions.
Any guiding or help?
Wolf
BTW the CLI tab completition crash:
//subsystem=security/security-domain=lbankx/authentication=(
java.lang.IllegalArgumentException: The argument value is not specified
for name: 'null'
at
org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.addProperty(DefaultOperationRequestBuilder.java:113)
at
org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:208)
at
org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:51)
at
org.jboss.as.cli.operation.OperationRequestCompleter.complete(OperationRequestCompleter.java:142)
at org.jboss.as.cli.CommandCompleter.complete(CommandCompleter.java:93)
at org.jboss.as.cli.impl.Console$Factory$1$1.complete(Console.java:96)
at org.jboss.jreadline.console.Console.complete(Console.java:809)
at org.jboss.jreadline.console.Console.read(Console.java:383)
at org.jboss.jreadline.console.Console.read(Console.java:221)
at org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:166)
at
org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1129)
at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:243)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.modules.Module.run(Module.java:270)
at org.jboss.modules.Main.main(Main.java:294)
/
[View Less]
12 years, 7 months
problem with the classloader, not able to load a JDBC driver
by Flemming Harms
Hi
I'm trying to finish https://issues.jboss.org/browse/AS7-1371 but I ran
into a problem with the class loader. I need way to load the class for a
specified JDBC driver, but I can't seem to figure out how to make it
available on the classpath too my authentication service.
I try to load the connection class like this, and testing it with the
existing H2 JDBC driver:
ClassLoader original = null;
try {
original = Thread.currentThread().getContextClassLoader();
…
[View More]if (original != null) {
Thread.currentThread().setContextClassLoader(null);
}
Class.forName(this.driver).newInstance();
} finally {
if (original != null) {
Thread.currentThread().setContextClassLoader(original);
}
}
The user can setup a outbound connection to a database for authentication,
by using the configuration below
<security-realm name="ManagementRealm">
<authentication>
<local default-user="$local"/>
<database connection="db" plain-text="true">
<!-- simple-select-users table="users" username-field="user"
password-field="password"/ -->
<sql-select-users sql="select user,password from users where
user = ?" />
</database>
</authentication>
</security-realm>
<outbound-connections>
<database>
<connection driver="org.h2.jdbcx.JdbcDataSource" name="db"
url="jdbc:h2:/tmp/test;DB_CLOSE_DELAY=-1" username="sa" password=""
min-pool-size="10" max-pool-size="20" />
</database>
</outbound-connections>
Any suggestions how to solve this?
Thanks!
br
Flemming
[View Less]
12 years, 8 months
Help with intermittent tests & Build failure notifications
by Jason T. Greene
Hi everyone,
Our stability of the testsuite has improved quite a bit but we are still
seeing occasional failures. I will be away on paternity leave so won't
be able to continue this work for a couple weeks. Kabir will be looking
into and/or disabling problematic tests, but if you could give him a
hand it would be much appreciated, and it will ultimately end up saving
everyone's time chasing false positives (especially with pull requests).
To help with this I have set the lightning jobs …
[View More]to email the dev list on
any failure. It might start off a bit noisy, but once we have a stable
test suite, these should be less common, and you will know it's
something serious.
Thanks!
--
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat
[View Less]
12 years, 8 months
Help with "New missing/unsatisfied dependencies" problem
by Flemming Harms
Hello all,
I'm trying to finish "Domain Management - Add support for database
authentication.", but the servers in domain mode starts up with an error
and the log indicate missing dependencies. I have been debugging and to
what I can tell all services is started. If I run in standalone mode
everything is working fine.
[Server:server-one] 12:00:16,723 INFO [org.jboss.as.controller]
(Controller Boot Thread) JBAS014774: Service status report
[Server:server-one] JBAS014775: New missing/…
[View More]unsatisfied dependencies:
[Server:server-one] service
jboss.server.controller.management.connection_manager.db (missing)
dependents: [service
jboss.server.controller.management.security_realm.ManagementRealm.database_authentication,
service
jboss.server.controller.management.security_realm.ApplicationRealm.database_authorization,
service
jboss.server.controller.management.security_realm.ApplicationRealm.database_authentication]
[Server:server-one]
[Server:server-one] 12:00:16,727 ERROR [org.jboss.as] (Controller Boot
Thread) JBAS015875: JBoss AS 7.2.0.Alpha1-SNAPSHOT "Steropes" started (with
errors) in 523167ms - Started 219 of 306 services (6 services failed or
missing dependencies, 80 services are passive or on-demand)
https://github.com/fharms/jboss-as/tree/AS7-1370
I have attached the configuration files
Any suggestions to where I should look or what it could be?
Thanks
[View Less]
12 years, 8 months