Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Connect to MAXIMO (LDAP Authentication enabled) from external system

  • 1.  Connect to MAXIMO (LDAP Authentication enabled) from external system

    Posted Mon May 16, 2022 02:33 PM
    Maximo setup details:
    MAXIMO (version 7.6.1.2) system installed in websphere cluster and authentication is enabled with appserver authentication (LDAP).
    Our requirement:
    We are trying to open the MXSession from an external client (java program) using MXThinClientSessionFactory but we are unable to establish the connection successfully so we would like to understand if there is anything wrong with the program/JNDI properties.
    Below is our program:


    Hashtable env = new Hashtable()
    env.put("maximo.appservername", "websphere")
    env.put("maximo.jndi.rootContext", "cell/nodes/ maximoNode/servers/MAXIMO")
    env.put("java.naming.corba.orb", org.omg.CORBA.ORB.init((String[]) null, null))
    env.put("maximo.jndi.ejb.accesstoken", "ejb/maximo/remote/accesstokenprovider")
    env.put("java.security.auth.login.config", "jaas_client.conf")
    env.put("java.naming.provider.url", "corbaloc:iiop: maximohost:2809")
    env.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory")
    System.setProperty("java.security.auth.login.config", "jaas_client.conf")
    String mxServerURL = " maximohost:13400/MAXIMO"

    MXThinClientSessionFactory f = new MXThinClientSessionFactory(env)
    MXSession.setMXSessionImplFactory(f)
    MXSession maximoSession = MXSession.getNewSession()
    maximoSession.setHost(mxServerURL)
    maximoSession.setUserName(mxUsername)
    maximoSession.setPassword(mxPassword)
    maximoSession.connect()


    Execution #1:
    When running the program from the build server which is different from the application server, we are getting below error.
    Apr 27, 2022 4:43:41 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT hostname: maximohost.pat
    net port: 0"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown Source)
    Caused by: java.net.BindException: Cannot assign requested address: connect
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Unknown Source)

    Execution #2:
    When running the program from the application server, we are getting below error.
    Note: We tried running the program by setting this -Djava.net.preferIPv4Stack=true but same error. Another thing we also added the hosts entry in the hosts file (C:\Windows\System32\drivers\etc\hosts) but same resulted into same error.
    Caused by: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machi
    ne
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)

    ------------------------------
    Venkatesh Bandi
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Connect to MAXIMO (LDAP Authentication enabled) from external system

    Posted Mon May 30, 2022 01:16 AM
    What looks like above is a connection via RMI method - isnt it the case ?
    LDAP based authentication is not supported in RMI method if i am not wrong. 

    Can you check it again ?

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------