[google-appengine] Get IP of the Instance serving the request

2013-12-10 Thread Tarun Soni
Hi,

I have my app connected to a TCP Socket and it's throws an error saying bad 
header at

   Via: SIP/2.0/TCP socket.getLocalAddress().getHostAddress(
)"+":"+socket.getLocalPort() 

socket.getLocalAddress().getHostAddress() always returns 127.0.0.1. How to 
get the IP address of the socket making the request.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] App experiencing high latency

2012-05-16 Thread Tarun Pondicherry
Sorry, I posted too hastily.  The issue was with my proxy.  The normal ae
logs should have tipped me off.

On Wed, May 16, 2012 at 8:57 PM, tarun2000 wrote:

> One of my Java HRD apps is experiencing very high latency.  The appid is
> webaleppo.  I have not made any changes to the deployed version recently
> and it was working fine yesterday.  The application logs show normal delays
> for the requests even though the latency is 30+ seconds (or timeout).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/9kq5Y8VDmG4J.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Reverse Proxy for custom domain SSL and Users Service possible?

2012-03-21 Thread Tarun Pondicherry
I think I'd have the same issue since the continue url would be relative to
appspot unless I specify it fully, but that results in a 500 =(.  However,
if someone got it to work please let me know!

On Wed, Mar 21, 2012 at 4:22 PM, Jeff Schnitzer  wrote:

> Not sure if this will help you, but we've been reasonably happy with
> CloudFlare's SSL support.  It provides SSL to CF's edge, then http
> between CF and Google - not great if you're taking CC#s, but perfectly
> adequate for protecting against FireSheep-type attacks.
>
> We aren't using Google auth, however.
>
> It might be another option to try - it might simplify things, and the
> non-SSL hop on the final leg might solve redirect issues.  At the very
> least it means you don't need to maintain the proxy.
>
> Jeff
>
> On Wed, Mar 21, 2012 at 6:49 PM, tarun2000 
> wrote:
> > I'm posting my workaround that I've implemented for anyone that may be
> > interested in the future.  I'd also appreciate feedback.
> >
> > 1) Client hits https://mydomain.com/blah which goes through EC2 proxy
> > https://appid.appspot.com/blah
> > 2) The client is redirected to the google login page, with continue set
> as
> > /aa?continue=/blah
> > 3) Client logs into Google Accounts and is then redirected to
> > https://appid.appspot.com/aa?continue=/blah
> > 4) Client hits https://appid.appspot.com/aa which serves a redirect to
> > https://mydomain.com/sc?c=ACSID&continue=/blah where ACSID is the Google
> > account session cookie read by the handler for /aa.
> > 5) Client hits https://mydomain.com/sc?c=ACSID&continue=/blah which
> sets the
> > ACSID session cookie for the domain mydomain.com and redirects to
> > https://mydomain.com/blah based on a continue parameter in aa passed to
> sc
> >
> > Following is my web.xml
> > / is publicly accessible
> > /aa is publicly accessible
> > /sc is publicly accessible
> > /* is restricted to logged in users
> >
> > Following is the restriction in the handlers (with some tricky url
> > escaping):
> > / --> if not logged in, redirect to login page continue=/aa
> > /aa --> if not logged in, redirect to login page continue=/aa
> > /sc --> if not logged in, redirect to login page continue=/aa
> > /* --> if not logged in, redirect to login page continue=/aa?continue=*
> >
> > After this, the user service seems to work normally even when going
> through
> > a proxy serving with SSL.  The ACSID cookie is now on mydomain.com and
> sent
> > through the proxy to appengine.
> >
> > The appspot domain will still show up to tech savvy users, but this is
> not
> > my main concern. My goal is to serve over https and keep my customdomain
> in
> > the url bar and be more secure with user data as serving over no SSL
> using
> > my custom domain.  Since the entire transaction is over https, I don't
> think
> > this exposes the session cookie any more than using mydomain.com without
> > SSL.  Any other cross site attacks would work even without this scheme
> > anyway.
> >
> > I'm still not sure why mydomain.com/_ah/conflogin?state=blah fails and
> > requires this workaround.
> >
> > On Tuesday, March 20, 2012 8:37:40 PM UTC-7, tarun2000 wrote:
> >>
> >> I set up a reverse proxy with nginx on ec2 to provide ssl for my
> appengine
> >> custom domain.  It works until users need to login.  The users are
> >> redirected to my appspot url after authenticating if I provide a
> relative
> >> continue url.  I tried setting the continue parameter with the entire
> url
> >> (the one that hits the proxy) instead of just the relative location, but
> >> this results in a 500 on appengine when appengine redirects to
> >> mycustomdomain?conflogin (which the proxy sends to my appspot url).
> >>
> >> Is there a way to use Google Accounts and User Service with a reverse
> >> proxy or will I need to create my own sign on system?  (I know SSL for
> >> custom domains is in testing but I'm looking for an immediate solution
> since
> >> there is no telling when this will be available).
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/google-appengine/-/FbsUXa8YKgAJ.
> >
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post t

[google-appengine] Getting server 500 error on just deploying sample code !!!

2011-12-27 Thread Tarun Chhabra
Hi,

I created a new application today using HRD database and thought about just 
testing the deployment using the sample code only. When I try to start the 
sample "Hello World" servlet I got a server 500 error. I checked the logs 
and the stack trace is as follows:

java.lang.UnsupportedClassVersionError: test/TestServlet : Unsupported 
major.minor version 51.0
at 
com.google.appengine.runtime.Request.process-5297cb957e8ca529(Request.java)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at 
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at 
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at 
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
at java.lang.Thread.run(Thread.java:679)


Is app engine down at the moment or what could be possibly wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/66JqiPK49PEJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Integeration of ZK with Google App Engine

2010-11-29 Thread Tarun
Hi,

I tried the demo of the ZK direct RIA framework as I had read that it
is compatible with Google App Engine. I downloaded the latest version
and then was trying to create my first project using the How- To wiki:

http://books.zkoss.org/wiki/ZK_Installation_Guide/Setting_up_Servers/Google_App_Engine

but it the link explains how to configure the ZK project but doesn't
tell how to create a Google App Engine project that has ZK support. I
tried to manually do that but didn't really work. Can somebody please
tell me how to make a GAE project with that support.

Thanks is advance

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Pagination using Query Cursors

2010-11-23 Thread Tarun
Hi,

I have not yet found the appropriate solution to this problem.

The idea of iterating and caching the cursor values at every start of
the page is one solution that I had also tried.
It works, but I guess it is not the optimum way to do it. There should
be a better way which has no performance issues.

On Nov 12, 1:54 pm, dflorey  wrote:
> I am solving this problem by iterating through the result list
> asynchronously and caching the cursors pointing to each start of the
> page.
> Check out how it look here:
>
> http://ucm.floreyosft.net
>
> On Nov 12, 9:43 am, msmart  wrote:
>
> > Just out of curiousity. Did you solve your problem. If yes, how?
>
> > Greetings!
> >  Michael Martinides
>
> > On 27 Sep., 07:25, Tarun  wrote:
>
> > > Hi,
>
> > > I have been trying to performPaginationon the App Engine using Java,
> > > for a large data set of information. I read about it on many previous
> > > posts including the official documentation of Google App Engine :
>
> > >http://code.google.com/appengine/docs/java/datastore/queriesandindexe...
>
> > > Considering the constraints of fetching data from the datastore,
> > > nearly all the posts suggested the use of Cursors (a feature that was
> > > added in version 1.3.3.1 of the App Engine SDK ).
>
> > > Most of the code examples that I came across were performingpaginationby 
> > > displaying the pages sequentially, but my requirement is
> > > to even allow displaying the result for any page, i.e a random access
> > > is required. In simple words, I wish to attain apaginationwhich is
> > > similar to Google's way of displaying search results.
>
> > > After going through the Java Docs of the SDK, I got to know that
> > > Cursors can only store the index value for the next set of entries.
>
> > > Is there any other way to satisfy my requirement?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Building Web service client on Google App Engine

2010-10-15 Thread Tarun
I have been trying to develop a web service client for a usual web
service. In order to do that I am using Apache Axis and it is
generating a code that uses RMI (Remote Method Invocation). Is there
any way we can customize it not to use that?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Pagination using Query Cursors

2010-09-27 Thread Tarun
Hi,

I have been trying to perform Pagination on the App Engine using Java,
for a large data set of information. I read about it on many previous
posts including the official documentation of Google App Engine :

http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors

Considering the constraints of fetching data from the datastore,
nearly all the posts suggested the use of Cursors (a feature that was
added in version 1.3.3.1 of the App Engine SDK ).

Most of the code examples that I came across were performing
pagination by displaying the pages sequentially, but my requirement is
to even allow displaying the result for any page, i.e a random access
is required. In simple words, I wish to attain a pagination which is
similar to Google's way of displaying search results.

After going through the Java Docs of the SDK, I got to know that
Cursors can only store the index value for the next set of entries.

Is there any other way to satisfy my requirement?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.