Appserver Down - Forum - Mobile - Progress Community

Appserver Down

 Forum

Appserver Down

This question is not answered

Hi there,

Please can someone tell me how I would go about checking in my mobile application if my appserver is down?

Basically on Login where I validate the user credentials I run my login business entity read method but this does not return any errors when the appserver is down. How do I check if my appserver is up and if my appserver up I want to do my appserver call, otherwise display a message to the user.   

Thanks in advance.

All Replies
  • OpenEdge Management is capable of notifying you about AppServer status via email alerts so you know immediately about AppServer not running.   It also provides charts and reports for historical data.

  • In addition to Matt's point, if you are using an OpenEdge 11.4 or later Web application as the back end, your mobile application code can use the progress.data.Session object's ping() method to determine the status of the back end, including whether the AppServer is running. If ping() returns false, it will also provide a string constant that identifies the reason for the failure. If the AppServer is down, that reason will be progress.data.Session.APPSERVER_OFFLINE ("AppServer is not available"). You could call ping() just before calling your read method.

    An alternative is to have the Session object call ping automatically for you on a set interval, and subscribe to the Session object's offline event. You would use the Session.pingInterval property to start the automatic pinging, and also call Session.subscribe() to subscribe to the offline event (and you would want to subscribe to the online event, too). If you are using an 11.4 back end, one of the reasons the offline event will be fired is that the AppServer is down, and you handler will receive progress.data.Session.APPSERVER_OFFLINE as the offlineReason argument (2nd parameter).

    The 11.4 documentation covers ping(), pingInterval, and the offline event, but let me know if you have any questions about how to use them in your case.

    Unfortunately, OE prior to 11.4 didn't have support for telling a Mobile client app that the AppServer is down. I'm puzzled, though, that you are not receiving an error on your read call. I would expect you to receive an error of some sort if the data can't be retrieved.

    Regards,

    --Wayne

  • Hello,

    >> Basically on Login where I validate the user credentials I run my login business entity read method but this does not return any errors when the appserver is down.

    The usage of the offline and online events in the Session object and usage of ping() would probably be the solution for this issue.

    Just in case, I wanted to mentioned that you should get an error message when the the AppServer is down. Perhaps, the response is empty, but you should still get an error.

    My testing shows that the READ request fails with Status Code 500 Internal server Error.

    Thanks.

  • Hi Edsel,
     
    Yes that is correct, I also get a 500 Internal server Error.
     
    I am calling my Session Object from the page load event. Not sure if that is the wrong approach.
     
    When I test the offline event on the session object using a message and switching my appserver off, my message does not display.
     

    Meyrick Flanegan

    Developer - Managed Services

    Email: mflanegan@elcb.co.za

     

    ELCB Information Services (Pty) Ltd

    Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

    E A S T  L O N D O N

    Tel: +27(43)  704 0700

    Fax: +27(43) 704 0701

    J O H A N N E S B U R G

    Tel: +27(10) 035 0310

    Fax: +27(10) 035 0311

    P O R T  E L I Z A B E T H

    Tel: +27(41) 373 0529

    Fax: +27(86) 650 0135

    Disclaimer


    From: egarcia [mailto:bounce-egarcia@community.progress.com]
    Sent: 18 May 2015 04:28 PM
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] Appserver Down
     
    Reply by egarcia

    Hello,

    >> Basically on Login where I validate the user credentials I run my login business entity read method but this does not return any errors when the appserver is down.

    The usage of the offline and online events in the Session object and usage of ping() would probably be the solution for this issue.

    Just in case, I wanted to mentioned that you should get an error message when the the AppServer is down. Perhaps, the response is empty, but you should still get an error.

    My testing shows that the READ request fails with Status Code 500 Internal server Error.

    Thanks.

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Hi Meyrick,

    What version of OpenEdge did you use to create the Web application / service that is running on the back end?

    --Wayne

  • Hi there,
     
    Im using 11.3.2.
     

    Meyrick Flanegan

    Developer - Managed Services

    Email: mflanegan@elcb.co.za

     

    ELCB Information Services (Pty) Ltd

    Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

    E A S T  L O N D O N

    Tel: +27(43)  704 0700

    Fax: +27(43) 704 0701

    J O H A N N E S B U R G

    Tel: +27(10) 035 0310

    Fax: +27(10) 035 0311

    P O R T  E L I Z A B E T H

    Tel: +27(41) 373 0529

    Fax: +27(86) 650 0135

    Disclaimer


    From: whenshaw [mailto:bounce-whenshaw@community.progress.com]
    Sent: 19 May 2015 03:29 PM
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] Appserver Down
     
    Reply by whenshaw

    Hi Meyrick,

    What version of OpenEdge did you use to create the Web application / service that is running on the back end?

    --Wayne

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • If the back end is 11.3.2, it doesn't have the special feature that the client Session uses to tell whether the AppServer is running. Unfortunately, that means that the ping and offline events can only tell you about the status of the server and the Web application (and the connection). The 500 that you get when you do a read is the only information you'll get, but of course you could get 500 for various reasons, not just the AppServer being down.

  • Hi there,
     
    I think that will be fine for now because I just need to notify the user that the application is down. Currently when this happens, the user keeps clicking the login button but nothing is happening.
     
    Is there a way of trapping this error in order for me to notify the user via a message that the application is currently down.
     
    Thanks in advance.
     

    Meyrick Flanegan

    Developer - Managed Services

    Email: mflanegan@elcb.co.za

     

    ELCB Information Services (Pty) Ltd

    Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

    E A S T  L O N D O N

    Tel: +27(43)  704 0700

    Fax: +27(43) 704 0701

    J O H A N N E S B U R G

    Tel: +27(10) 035 0310

    Fax: +27(10) 035 0311

    P O R T  E L I Z A B E T H

    Tel: +27(41) 373 0529

    Fax: +27(86) 650 0135

    Disclaimer


    From: whenshaw [mailto:bounce-whenshaw@community.progress.com]
    Sent: 19 May 2015 09:05 PM
    To: TU.Mobile@community.progress.com
    Subject: RE: [Technical Users - Mobile] Appserver Down
     
    Reply by whenshaw

    If the back end is 11.3.2, it doesn't have the special feature that the client Session uses to tell whether the AppServer is running. Unfortunately, that means that the ping and offline events can only tell you about the status of the server and the Web application (and the connection). The 500 that you get when you do a read is the only information you'll get, but of course you could get 500 for various reasons, not just the AppServer being down.

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Hello Meyrick,

    > Currently when this happens, the user keeps clicking the login button but nothing is happening.

    Depending on the sequence that you are using for the login button, you may need to test whether the call to login(), addcatalog(), or fill() failed. Since you are using JSDO Services, you should be able to specify code for the error event handler, or Login or Read.

    I hope this helps.