Monday, 5 June 2017

WebSphere Liberty Profile - Tracing

I've not yet got to the bottom of this, but I'm seeing this: -

[05/06/17 17:02:52:531 BST] 00000022 y.authentication.jaas.modules.UsernameAndPasswordLoginModule A CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.
[05/06/17 17:02:52:594 BST] 00000024 y.authentication.jaas.modules.UsernameAndPasswordLoginModule A CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.
[05/06/17 17:02:52:616 BST] 00000031 y.authentication.jaas.modules.UsernameAndPasswordLoginModule A CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.

in the messages.log file on my WebSphere Liberty Profile Collective Controller, whilst trying to register a remote host: -

wlpn-collective registerHost hostname=wlpn.uk.ibm.com --host=wlpc.uk.ibm.com --port=9443 –-user=admin --password=passw0rd --rpcUser=wasadmin --rpcUserPassword=passw0rd —autoAcceptCertificates

Whilst debugging, I wanted to enable some tracing.

This is what I did: -

Update server.xml

vi /opt/IBM/work/servers/cc/server.xml

Add trace specification

    <logging traceSpecification="com.ibm.ws.security.*=all:com.ibm.ws.webcontainer.security.*=all"/>

Watch the trace

tail -f /opt/IBM/work/servers/cc/logs/trace.log

[05/06/17 17:02:52:531 BST] 00000022 id=c258be29 m.ws.security.quickstart.internal.QuickStartSecurityRegistry > checkPassword Entry
                                                                                                               wasadmin
                                                                                                               <sensitive java.lang.String@6f65828e>
[05/06/17 17:02:52:531 BST] 00000022 id=c258be29 m.ws.security.quickstart.internal.QuickStartSecurityRegistry < checkPassword Exit
                                                                                                               null
[05/06/17 17:02:52:531 BST] 00000022 id=         y.authentication.jaas.modules.UsernameAndPasswordLoginModule A CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.
[05/06/17 17:02:52:563 BST] 00000022 id=         com.ibm.ws.security.authentication.AuthenticationException   > <init> Entry
                                                                                                               CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.
[05/06/17 17:02:52:563 BST] 00000022 id=f47e0a6e com.ibm.ws.security.authentication.AuthenticationException   < <init> Exit
                                                                                                               com.ibm.ws.security.authentication.AuthenticationException: CWWKS1100A: Authentication did not succeed for user ID wasadmin. An invalid user ID or password was specified.
        at com.ibm.ws.security.authentication.jaas.modules.UsernameAndPasswordLoginModule.login(UsernameAndPasswordLoginModule.java:81)
        at com.ibm.ws.kernel.boot.security.LoginModuleProxy.login(LoginModuleProxy.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:788)
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:196)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
        at java.security.AccessController.doPrivileged(AccessController.java:650)
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:696)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:597)
        at com.ibm.ws.security.authentication.internal.jaas.JAASServiceImpl.doLoginContext(JAASServiceImpl.java:344)
        at com.ibm.ws.security.authentication.internal.jaas.JAASServiceImpl.performLogin(JAASServiceImpl.java:330)
        at com.ibm.ws.security.authentication.internal.jaas.JAASServiceImpl.performLogin(JAASServiceImpl.java:315)
        at com.ibm.ws.security.authentication.internal.AuthenticationServiceImpl.performJAASLogin(AuthenticationServiceImpl.java:458)
        at com.ibm.ws.security.authentication.internal.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:203)
        at com.ibm.ws.webcontainer.security.internal.BasicAuthAuthenticator.basicAuthenticate(BasicAuthAuthenticator.java:127)
        at com.ibm.ws.webcontainer.security.internal.BasicAuthAuthenticator.handleBasicAuth(BasicAuthAuthenticator.java:118)
        at com.ibm.ws.webcontainer.security.internal.BasicAuthAuthenticator.authenticate(BasicAuthAuthenticator.java:71)
        at com.ibm.ws.webcontainer.security.WebAuthenticatorProxy.authenticate(WebAuthenticatorProxy.java:93)
        at com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.authenticateRequest(WebAppSecurityCollaboratorImpl.java:1050)
        at com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.determineWebReply(WebAppSecurityCollaboratorImpl.java:849)
        at com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.performSecurityChecks(WebAppSecurityCollaboratorImpl.java:609)
        at com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.preInvoke(WebAppSecurityCollaboratorImpl.java:532)
        at com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.preInvokeCollaborators(CollaboratorHelper.java:458)
        at com.ibm.ws.webcontainer.osgi.collaborator.CollaboratorHelperImpl.preInvokeCollaborators(CollaboratorHelperImpl.java:267)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1125)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4956)
        at com.ibm.ws.webcontainer31.osgi.webapp.WebApp31.handleRequest(WebApp31.java:525)
        at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:315)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1014)
        at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:280)
        at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:967)
        at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:359)
        at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:318)
        at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
        at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
        at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
        at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
        at com.ibm.ws.channel.ssl.internal.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1043)
        at com.ibm.ws.channel.ssl.internal.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:632)
        at com.ibm.ws.channel.ssl.internal.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1777)
        at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
        at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
        at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
        at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(Thread.java:785)

...

With thanks to this: -


No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...