Maximo

Maximo

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

 View Only
  • 1.  Anywhere 7.6.4 - Redirection in build process

    Posted Fri October 23, 2020 01:07 PM
    Hi I would like to know if someone can help me for this.

    Can someone tell me where this "moved to" happens in the build process

    Exemple :

    init:

         [echo] 2020-10-23 12:35:53> Trying to connect to Maximo: https://domain:port/maximo

          [get] Getting: https://domain:port/maximo

          [get] To: /.../MaximoAnywhere/.maximo-url-test

          [get] https://domain:port/maximo moved to http://domain/maximo/

         [echo] 2020-10-23 12:35:53> Currently, it is an online build because the build.process=online property has been set in the build.properties file. If you prefer an offline build, change this property to be build.process=offline.


    I don't know where we are getting moved to a http adress.

    Thank you

    ------------------------------
    Mathieu Guilmette
    ------------------------------



    #Maximo
    #MaximoAnywhere
    #AssetandFacilitiesManagement


  • 2.  RE: Anywhere 7.6.4 - Redirection in build process

    Posted Mon October 26, 2020 12:57 AM
    Hi Mathieu,

    As per my knowledge , you can update the httpd.conf file in the web server folder to redirect http request to https.
    It looks like the opposite has been configured in your case.

    Here is an technote to understand the redirect of https to http. This might help you to find the issue in your web server.
    https://www.ibm.com/support/pages/rewriting-http-port-80-requests-https-port-443

    But, I am sure there might be an expert in the community who would be able to give you the exact issue and resolution.

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------



  • 3.  RE: Anywhere 7.6.4 - Redirection in build process

    Posted Mon October 26, 2020 09:15 AM
    I remember from this post

    https://community.ibm.com/community/user/iot/communities/community-home/digestviewer/viewthread?MessageKey=d01c76ed-ca03-4a99-9f1f-5e77c4c22c54&CommunityKey=46655afa-6904-4ed3-a90f-18fb4481d535&tab=digestviewer#bmd01c76ed-ca03-4a99-9f1f-5e77c4c22c54

    That Steven said that it's a bug where it always points to HTTP instead of HTTPS

    Extract:

    EDIT: Your error message was slightly different than ours (about CURL missing) so this probably isn't relevant. Leaving it here for reference just in case.

    I identified an issue where it always uses the http protocol, even if you require https. This was causing our deployment to fail like this. I opened a support case but don't have an APAR for it, but below is the work around I did that fixed it for us. 

    1) Open the anywhere-apps-builder.xml on your Anywhere environment. 
    2) Add <property name="protocol" value="${adapter.connection.protocol}"/> to the zip-upload-all-apps & -zip-app-upload in anywhere-apps-builder.xml
    3) Changed the postlogin= in the JavaScript of zip-upload-all-apps & -zip-app-upload from:
    postlogin = 'http://' + domain + ':' + port + '/' + context + '/oslc/login/j_security_check?j_username=' + user + '&j_password=' + pwd;
    to:

    postlogin = protocol+'://' + domain + ':' + port + '/' + context + '/oslc/login/j_security_check?j_username=' + user + '&j_password=' + pwd;

    4) Change the posturl in the JavaScript of -zip-app-upload from:
    posturl = 'http://'+domain+':'+port+'/'+context+'/oslc/os/OSLCMAXAPPDATA?action=wsmethod:uploadFile&appid='+appname+'&appversion='+versionname+':';

    to:
    posturl = protocol+'://'+domain+':'+port+'/'+context+'/oslc/os/OSLCMAXAPPDATA?action=wsmethod:uploadFile&appid='+appname+'&appversion='+versionname+':';

    If you wanted to keep it simple, you could just replace the http with https, but we wanted to keep it dynamic in case we ever needed to test it on HTTP for some reason. 

    I'll update this again when the APAR is created to share the number.




    ------------------------------
    Christopher Kung
    ------------------------------



  • 4.  RE: Anywhere 7.6.4 - Redirection in build process

    Posted Mon October 26, 2020 09:40 AM
    Hi Christopher, 

    Thank you for your reply but I already tried this fix. I currently have this fix in the anywhere-apps-builder.xml and still get the Moved to http error.

    Could it be a redirection of the DNS itself ?

    thank you


    ------------------------------
    Mathieu Guilmette
    ------------------------------