Forum Discussion

dpike_24334's avatar
dpike_24334
Icon for Nimbostratus rankNimbostratus
Oct 28, 2007

WebLogic and iControl SDK

Hi,

I have developed a small application which uses the iControl to connect to the Big IP server and either set a pool member to enabled or disabled. This works fine when I run it from the command line but when I add it as a shutdown / startup class in WebLogic I receive the error below:


(401)F5 Authorization Required
        at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:744)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)

I have registered the certificate with the JDK that WebLogic is using but cannot think of any other reason as to why this would work from the command line but not under WebLogic. Is it possible that there is a conflict between a jar file that WebLogic uses and iControl requires?

2 Replies

  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Hey dpike,

     

     

    That erros (401 F5 Authorization Required) is actually a response to a failed login attempt after the certificate has been accepted. There are two possible scenarios:

     

    1. The account doesn't have access rights to whatever you're trying to do (unlikely if the same code works from the command line).

     

    2. The credentials received by the BIG-IP do not match any known credentials in the system.

     

     

    I would snag the XML going out from both applicaitons and see what is different. My guess is that there is something on the end of the username or password when run as a shutdown/startup class.

     

     

    I'm afraid I don't have WebLogic running at the moment, so I can't test any deeper, but that should point you in the right direction.

     

     

    Don.
  • Don is right on. A 401 error indicates that you are not sending the correct credentials to the BIG-IP. If you haven't already, I'd suggest you use the iControl Library for Java which wraps up all the certificate validation code as well as the credential management.

     

     

    Check out my tech tip on Language options where I illustrate how to use setup and use the java library.

     

     

    http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=115

     

    Click here

     

     

     

    -Joe