Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Caching AppServer error pages

8 posts in General Discussion Last posting was on 2005-09-27 14:40:49.0Z
Chris M Posted on 2005-09-08 15:21:27.0Z
Sender: 617.432054c1.1804289383@sybase.com
From: Chris M
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Caching AppServer error pages
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <432056f7.661.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Sep 2005 08:21:27 -0700
X-Trace: forums-1-dub 1126192887 10.22.241.41 (8 Sep 2005 08:21:27 -0700)
X-Original-Trace: 8 Sep 2005 08:21:27 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:541
Article PK: 8942

Hi All,

We sometimes have a situation after a sync that an error
occurs and MBusiness seems to cache the error page (which is
from our Appserver). From then on, the user can't do
anything on their mobile device until we clear the user
cache via the admin server.

1) It'd be nice to work out how to stop MBusiness caching
these AppServer error pages. Any ideas?

2) We can't see anything in the logs to see where these
errors occured in the first place. Anyone got any ideas on
how to turn on full logging for M-Business?

Any ideas are appreciated.

Chris


Enrico Pallazzo Posted on 2005-09-08 19:01:51.0Z
From: "Enrico Pallazzo" <enricopallazzo@myway.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <432056f7.661.1681692777@sybase.com>
Subject: Re: Caching AppServer error pages
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vpn-dub-191.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-191.sybase.com
Message-ID: <43208a9f@forums-1-dub>
Date: 8 Sep 2005 12:01:51 -0700
X-Trace: forums-1-dub 1126206111 10.22.120.191 (8 Sep 2005 12:01:51 -0700)
X-Original-Trace: 8 Sep 2005 12:01:51 -0700, vpn-dub-191.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:543
Article PK: 8944

Does you app server error page actually return an HTTP error code (like 400,
404, 500) and not just a 200 with a page that say "there was an error". If
it does the latter then MBA has no way of knowing that its an error page.

<Chris M> wrote in message news:432056f7.661.1681692777@sybase.com...
> Hi All,
>
> We sometimes have a situation after a sync that an error
> occurs and MBusiness seems to cache the error page (which is
> from our Appserver). From then on, the user can't do
> anything on their mobile device until we clear the user
> cache via the admin server.
>
> 1) It'd be nice to work out how to stop MBusiness caching
> these AppServer error pages. Any ideas?
>
> 2) We can't see anything in the logs to see where these
> errors occured in the first place. Anyone got any ideas on
> how to turn on full logging for M-Business?
>
> Any ideas are appreciated.
>
> Chris


Chris M Posted on 2005-09-09 07:37:11.0Z
Sender: 704c.432137af.1804289383@sybase.com
From: Chris M
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <43213ba3.7074.1681692777@sybase.com>
References: <43208a9f@forums-1-dub>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 9 Sep 2005 00:37:07 -0700, 10.22.241.42
Lines: 58
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Sep 2005 00:37:08 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Sep 2005 00:37:11 -0700
X-Trace: forums-1-dub 1126251431 10.22.108.75 (9 Sep 2005 00:37:11 -0700)
X-Original-Trace: 9 Sep 2005 00:37:11 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:544
Article PK: 8945

Hi Enrico,

Thanks for your quick response. The appserver is
ColfusionMX/JRun4 and the error that gets cached on the
MBusiness server is a coldfusion error "Error in processing
request" (with a more detailed explanation of the error
revealing it is either "Session is invalid" or
"NullPointerException".

I understand that the underlying cause of the error is in
our code. I just don't understand that once the server
returns that page to the PDA, why it is cached and the user
can't do anything further until the cache on the server is
cleared.

It is also one of those errors that PDA users in the field
see quite often, but we can't seem to reproduce in the
office. The MBusiness logs don't appear to help much either
as there is nothing obvoius in any of the logs.

Please let me know if you have any ideas on how to stop the
server caching error pages? Maybe I could use a Java Filter
on the pages to either add HTTP headers to try and stop
caching (although I am not sure what MBusiness server
expects), or alternativley just examine each response and
trash the response if it is one of the ones that is causing
us issues.

Thanks again for your response,
Chris

> Does you app server error page actually return an HTTP
> error code (like 400, 404, 500) and not just a 200 with a
> page that say "there was an error". If it does the latter
> then MBA has no way of knowing that its an error page.
>
>
> <Chris M> wrote in message
> > news:432056f7.661.1681692777@sybase.com... Hi All,
> >
> > We sometimes have a situation after a sync that an error
> > occurs and MBusiness seems to cache the error page
> > (which is from our Appserver). From then on, the user
> > can't do anything on their mobile device until we clear
> > the user cache via the admin server.
> >
> > 1) It'd be nice to work out how to stop MBusiness
> > caching these AppServer error pages. Any ideas?
> >
> > 2) We can't see anything in the logs to see where these
> > errors occured in the first place. Anyone got any ideas
> > on how to turn on full logging for M-Business?
> >
> > Any ideas are appreciated.
> >
> > Chris
>
>


Greg Fenton Posted on 2005-09-09 13:28:29.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
References: <43208a9f@forums-1-dub> <43213ba3.7074.1681692777@sybase.com>
In-Reply-To: <43213ba3.7074.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: gfenton-t30.sybase.com
Message-ID: <43218dfb$1@forums-2-dub>
X-Original-Trace: 9 Sep 2005 06:28:27 -0700, gfenton-t30.sybase.com
Lines: 44
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Sep 2005 06:28:28 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Sep 2005 06:28:29 -0700
X-Trace: forums-1-dub 1126272509 10.22.108.75 (9 Sep 2005 06:28:29 -0700)
X-Original-Trace: 9 Sep 2005 06:28:29 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:546
Article PK: 8946


Chris M wrote:
>
> I understand that the underlying cause of the error is in
> our code. I just don't understand that once the server
> returns that page to the PDA, why it is cached and the user
> can't do anything further until the cache on the server is
> cleared.
>

As Enrico pointed out, if the server is returning the page with a "200
OK" response code, then to the mBA server this "error page" is actually
the valid HTML page for the user to see. There is NO WAY around this
short of adding some kind of content-analysis to the mBA synchronization
system...and that would be a hack at best since it would mean grep'ing
for strings like "An error occured" in the returned page. The Right
Answer is to configure your server to give an appropriate response code
(e.g. "404 Not Found" or "500 Server Error").

Again, if the request is answered with a "200 OK" response and it has
its cache headers set as well, mBA is being told "here is the valid page
you asked for and I'd like you to cache it for XXX amount of time".
This is why the page would be stored in the cache and not recrawled on
subsequent requests.

So you need to check the complete response (the response headers) coming
back from your appserver to see if it is replying appropriately on an
error (a 4xx or 5xx response) or if it is lying to the mBA server (a 2xx
response). To do this, you can use the fantastic LiveHTTPHeaders
extension for the Firefox and Mozilla-based browsers:

http://livehttpheaders.mozdev.org/

or a command-line tool such as "wget" (available for most every
platform), or some other HTTP-analysis tool.

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Chris M Posted on 2005-09-13 13:04:33.0Z
Sender: 3180.4326bf05.1804289383@sybase.com
From: Chris M
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4326ce45.3286.1681692777@sybase.com>
References: <43218dfb$1@forums-2-dub>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 13 Sep 2005 06:04:05 -0700, 10.22.241.42
Lines: 83
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 13 Sep 2005 06:04:06 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 13 Sep 2005 06:04:33 -0700
X-Trace: forums-1-dub 1126616673 10.22.108.75 (13 Sep 2005 06:04:33 -0700)
X-Original-Trace: 13 Sep 2005 06:04:33 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:555
Article PK: 8949

Hi Greg,

Just to let you know, I followed your suggestions in terms
of installing livehttpheaders to find out the status code of
the app servers error page. It appears to be returning a
status code of 500 (and therefore I assume it shouldn't be
cached).

However, I have just managed to reproduce the error myself.
Every time I try to use our application after a sync, all I
see is the app servers error page. It stays this way until I
delete the users cache.

While I still had this error, I tried to copy the entire
AvantGo directory on the server to another directory so I
would have all the logs, sync info etc to review and see if
I could do a text search to see where the error page would
be stored. However, it wouldn't copy everything until all of
the AvantGo services were stopped. When I restarted them,
the next time I synced my cached error message had
dissappeared :(.

I noticed that the error message seemed to be caused by form
submissions so I will have a look at trying to work out how
to reproduce it and therefore how to solve the root cause of
the problem.

In the meantime though, is there anything in the information
I copied that I could look at to see where my error page is
being cached?

Regards,
Chris

> Chris M wrote:
> >
> > I understand that the underlying cause of the error is
> > in our code. I just don't understand that once the
> > server returns that page to the PDA, why it is cached
> > and the user can't do anything further until the cache
> > on the server is cleared.
> >
>
> As Enrico pointed out, if the server is returning the page
> with a "200 OK" response code, then to the mBA server
> this "error page" is actually the valid HTML page for the
> user to see. There is NO WAY around this short of adding
> some kind of content-analysis to the mBA synchronization
> system...and that would be a hack at best since it would
> mean grep'ing for strings like "An error occured" in the
> returned page. The Right Answer is to configure your
> server to give an appropriate response code (e.g. "404
> Not Found" or "500 Server Error").
>
> Again, if the request is answered with a "200 OK" response
> and it has its cache headers set as well, mBA is being
> told "here is the valid page you asked for and I'd like
> you to cache it for XXX amount of time". This is why the
> page would be stored in the cache and not recrawled on
> subsequent requests.
>
> So you need to check the complete response (the response
> headers) coming back from your appserver to see if it is
> replying appropriately on an error (a 4xx or 5xx
> response) or if it is lying to the mBA server (a 2xx
> response). To do this, you can use the fantastic
> LiveHTTPHeaders extension for the Firefox and
> Mozilla-based browsers:
>
> http://livehttpheaders.mozdev.org/
>
> or a command-line tool such as "wget" (available for most
> every platform), or some other HTTP-analysis tool.
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/


Chris M Posted on 2005-09-26 11:27:08.0Z
Sender: 3be5.4337d962.1804289383@sybase.com
From: Chris M
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4337db0c.3c13.1681692777@sybase.com>
References: <43218dfb$1@forums-2-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Sep 2005 04:27:08 -0700
X-Trace: forums-1-dub 1127734028 10.22.241.41 (26 Sep 2005 04:27:08 -0700)
X-Original-Trace: 26 Sep 2005 04:27:08 -0700, 10.22.241.41
Lines: 66
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:573
Article PK: 8959

Hi again Greg,

Just a quick question to see if you had any other
suggestions on this one. I did check the response status
code of our app servers error pages and they do appear to be
500 if the error is due to a server problem (according to
live headers at any rate).

Is there anything I can check on the server to actually see
which page is being cached and which URL actually caused
that page to be cached?

Any help you (or anyone else) can give would be appreciated.

Thanks,
Chris

> Chris M wrote:
> >
> > I understand that the underlying cause of the error is
> > in our code. I just don't understand that once the
> > server returns that page to the PDA, why it is cached
> > and the user can't do anything further until the cache
> > on the server is cleared.
> >
>
> As Enrico pointed out, if the server is returning the page
> with a "200 OK" response code, then to the mBA server
> this "error page" is actually the valid HTML page for the
> user to see. There is NO WAY around this short of adding
> some kind of content-analysis to the mBA synchronization
> system...and that would be a hack at best since it would
> mean grep'ing for strings like "An error occured" in the
> returned page. The Right Answer is to configure your
> server to give an appropriate response code (e.g. "404
> Not Found" or "500 Server Error").
>
> Again, if the request is answered with a "200 OK" response
> and it has its cache headers set as well, mBA is being
> told "here is the valid page you asked for and I'd like
> you to cache it for XXX amount of time". This is why the
> page would be stored in the cache and not recrawled on
> subsequent requests.
>
> So you need to check the complete response (the response
> headers) coming back from your appserver to see if it is
> replying appropriately on an error (a 4xx or 5xx
> response) or if it is lying to the mBA server (a 2xx
> response). To do this, you can use the fantastic
> LiveHTTPHeaders extension for the Firefox and
> Mozilla-based browsers:
>
> http://livehttpheaders.mozdev.org/
>
> or a command-line tool such as "wget" (available for most
> every platform), or some other HTTP-analysis tool.
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/


Greg Fenton Posted on 2005-09-27 14:40:49.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
References: <43218dfb$1@forums-2-dub> <4337db0c.3c13.1681692777@sybase.com>
In-Reply-To: <4337db0c.3c13.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: gfenton-t30.sybase.com
X-Original-NNTP-Posting-Host: gfenton-t30.sybase.com
Message-ID: <433959f1$1@forums-1-dub>
Date: 27 Sep 2005 07:40:49 -0700
X-Trace: forums-1-dub 1127832049 10.25.98.144 (27 Sep 2005 07:40:49 -0700)
X-Original-Trace: 27 Sep 2005 07:40:49 -0700, gfenton-t30.sybase.com
Lines: 25
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:575
Article PK: 8960


Chris M wrote:
>
> Just a quick question to see if you had any other
> suggestions on this one. I did check the response status
> code of our app servers error pages and they do appear to be
> 500 if the error is due to a server problem (according to
> live headers at any rate).
>

Hmm...the mBA server does not cache responses with 5xx response codes.
So if you are seeing the error page in your client, I cannot think of
how this is happening.

I suggest contacting iAnywhere Technical Support:

http://www.ianywhere.com/support/contact/contact_support.html

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Chris M Posted on 2005-09-12 08:35:31.0Z
Sender: 3712.4325386c.1804289383@sybase.com
From: Chris M
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Caching AppServer error pages
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <43253dd3.376f.1681692777@sybase.com>
References: <43218dfb$1@forums-2-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Sep 2005 01:35:31 -0700
X-Trace: forums-1-dub 1126514131 10.22.241.41 (12 Sep 2005 01:35:31 -0700)
X-Original-Trace: 12 Sep 2005 01:35:31 -0700, 10.22.241.41
Lines: 70
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:551
Article PK: 17718

Hi Greg,

Thanks for your response. I will try to determine what the
return status is of our AppServers error page as you
suggest. If it is the case that the AppServer's error page
returns a HTTP status of 200, then I will try to possibly
set the caching headers via a filter (as we really don't
want to cache any pages on the device). This may be an
interim solution while we sort out the root cause of the
error(s).

Thanks again.
Chris

P.S. -> Do you happen to know anything about our other issue
(Error while reading from device) that I posted. I
accidently posted the title of the error as my name and the
created by as the title of the error.

> Chris M wrote:
> >
> > I understand that the underlying cause of the error is
> > in our code. I just don't understand that once the
> > server returns that page to the PDA, why it is cached
> > and the user can't do anything further until the cache
> > on the server is cleared.
> >
>
> As Enrico pointed out, if the server is returning the page
> with a "200 OK" response code, then to the mBA server
> this "error page" is actually the valid HTML page for the
> user to see. There is NO WAY around this short of adding
> some kind of content-analysis to the mBA synchronization
> system...and that would be a hack at best since it would
> mean grep'ing for strings like "An error occured" in the
> returned page. The Right Answer is to configure your
> server to give an appropriate response code (e.g. "404
> Not Found" or "500 Server Error").
>
> Again, if the request is answered with a "200 OK" response
> and it has its cache headers set as well, mBA is being
> told "here is the valid page you asked for and I'd like
> you to cache it for XXX amount of time". This is why the
> page would be stored in the cache and not recrawled on
> subsequent requests.
>
> So you need to check the complete response (the response
> headers) coming back from your appserver to see if it is
> replying appropriately on an error (a 4xx or 5xx
> response) or if it is lying to the mBA server (a 2xx
> response). To do this, you can use the fantastic
> LiveHTTPHeaders extension for the Firefox and
> Mozilla-based browsers:
>
> http://livehttpheaders.mozdev.org/
>
> or a command-line tool such as "wget" (available for most
> every platform), or some other HTTP-analysis tool.
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/