Maximo

Maximo

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

 View Only
  • 1.  CORS issue with initialSetup of MAX 8

    Posted Mon June 12, 2023 11:17 AM

    Hi,

    I'm performing my MAS 8 installation only for the sake of knowing how to do it and provide a learning environment to users and developers used to Maximo 7.X

    I managed to install OpenShift in Single-Node and install the code portion of MAS using the Maximo Application Suite Automation operator in OpenShift

    According to these steps:

    https://github.com/cloud-native-toolkit/operator-masauto/blob/main/docs/MAS-Operator-Deployment.pdf

    I must now run the initialSetup and upload the license I had me generated.

    1) Navigate to https://admin.inst1.apps.mas8.domain/initialsetup

    2) Download and add the certificate to the browser Trust Store, when I go back to that URL or the api.inst1.mas8.domain, the URLs show as safe and trusted

    3) I enter username and password found from the inst1-credentials-superuser secret in OpenShift, seems to be working

    4) I get a blue spinning circle forever

    My browser console is full of these errors :

    initialsetup:1 Access to XMLHttpRequest at 'https://api.inst1.apps.mas8.domain/schemas/workspaces' from origin 'https://admin.inst1.apps.mas8.domain' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    ---

    One last thing I need to mention is to get anything openShift related accessible from my Windows laptop (the OpenShift is running inside a VMWare workstation) I edited my Windows hosts file with a bunch of entries ; don't know if anything is missing to get the initialsetup up and running

    192.168.2.100    api.mas8.domain
    192.168.2.100    oauth-openshift.apps.mas8.domain
    192.168.2.100    console-openshift-console.apps.mas8.domain
    192.168.2.100    grafana-openshift-monitoring.apps.mas8.domain
    192.168.2.100    thanos-querier-openshift-monitoring.apps.mas8.domain
    192.168.2.100    prometheus-k8s-openshift-monitoring.apps.mas8.domain
    192.168.2.100    alertmanager-main-openshift-monitoring.apps.mas8.domain
    192.168.2.100    admin.inst1.apps.mas8.domain
    192.168.2.100    api.inst1.apps.mas8.domain
    192.168.2.100    auth.inst1.apps.mas8.domain
    192.168.2.100    auth.inst1.apps.mas8.domain/login
    192.168.2.100    home.inst1.apps.mas8.domain
    192.168.2.100    masdev.home.inst1.apps.mas8.domain
    192.168.2.100    auth.inst1.apps.mas8.domain/initialSetup

    ----------

    Any clues would be appreciated!

    Thanks!

    Francois



    ------------------------------
    Francois Beliveau
    ------------------------------


  • 2.  RE: CORS issue with initialSetup of MAX 8

    Posted Mon June 12, 2023 11:21 AM

    Francois,

    I ran into this same issue and after 30 minutes to an hour it just resolved itself.  I am not sure what process hadn't completed, but apparently there must be some registration process that occurs to ensure the proper CORS headers.

    I would give it an hour and come back to see if it hasn't done the same for you.  Maybe Steven Shull will have a more technical explanation as to what the internal process is.

    Jason



    ------------------------------
    Jason VenHuizen
    https://sharptree.io
    https://opqo.io
    ------------------------------



  • 3.  RE: CORS issue with initialSetup of MAX 8

    Posted Mon June 12, 2023 11:40 AM
      |   view attached

    Jason,

    Thanks for the reply.

    Actually I finished "core" installation yesterday morning, and it's been like that ever since.

    The only culprit I can see with my limited knowledge is that 2 pods or not working, they are crashing and restarting

    The 2 "ins1-coreapi" are the only 2 pods that are failed or running with 0 out of X container, all other pods seem fine

    I attached the log from the first of the failing pods

    Thanks again for your help, much appreciated



    ------------------------------
    Francois Beliveau
    ------------------------------

    Attachment(s)

    txt
    pod log.txt   5 KB 1 version


  • 4.  RE: CORS issue with initialSetup of MAX 8

    Posted Mon June 12, 2023 11:46 AM

    Have you tried killing those pods and seeing if they get recreated?  I realize this is not exactly helpful information, but I have found for transient errors this is sometimes the answer, perhaps someone with more detailed knowledge of the install process can provide a better response.



    ------------------------------
    Jason VenHuizen
    https://sharptree.io
    https://opqo.io
    ------------------------------



  • 5.  RE: CORS issue with initialSetup of MAX 8

    Posted Mon June 12, 2023 01:17 PM

    Yes I did. If I keep them alive (like the have been for a while) they auto-restart by themselves and fail again, and we can see the count of restart going up.

    The 3 pods are out of a ReplicaSet

    And they fail over and over. That being said I don't even know if this is related to my main issue which is the setup page will not load and the CORS error I am seeing, but I will try to the pods issue as maybe the root cause for now



    ------------------------------
    Francois Beliveau
    ------------------------------



  • 6.  RE: CORS issue with initialSetup of MAX 8

    Posted Tue June 13, 2023 10:39 AM

    This is not a bug or any issue. You just have to accept the "api" URL's certificate to move forward from the spinning circle. I have it documented it here (see Accept Certification section) https://mam-hol.eu-gb.mybluemix.net/ocp_8.9/post_deployment/

    Note that you won't encounter this situation if you use public certificates like Let's Encrypt. 



    ------------------------------
    Arif Ali
    ------------------------------



  • 7.  RE: CORS issue with initialSetup of MAX 8

    Posted Tue June 13, 2023 10:47 AM

    I did. Now both the api and admin URL once I hit them they show as secured because i imported the certificates in the trust store.

    I don't know which one I installed though ; are the certificates different if I exported when I was on the admin URL compared to the api URL?

    I might just remove all certificates I imported and try again by going to initial setup first, replacing the admin for api, and getting that certificate and import it



    ------------------------------
    Francois Beliveau
    ------------------------------