appId from remote api; status code = 404

141 views
Skip to first unread message

Snahasish Ghosh

unread,
Sep 14, 2015, 8:10:06 AM9/14/15
to Google App Engine, snah...@adasoftware.com

Hi all

I am getting an error when I am trying to connect Google app engine project from my application(deployed in Tomcat) using Remote Api

Error is:
java.io.IOException: can't get appId from remote api; status code = 404, body:
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>404 Not Found</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Not Found</h1>
<h2>The requested URL <code>/remote_api</code> was not found on this server.</h2>
<h2></h2>
</body></html>

    at com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:420)


I have done all the steps which is described in https://cloud.google.com/appengine/docs/java/tools/remoteapi

RemoteApiOptions options = new RemoteApiOptions().server("<ap_id>.appspot.com", 443)
                        .credentials(username, password);//.remoteApiPath("/remote_api");
            
                RemoteApiInstaller installer = new RemoteApiInstaller();
                installer.install(options);
                try {
                    DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
                    System.out.println("Key of new entity is " +
                        ds.put(new Entity("Hello Remote API!")));
                } finally {
                    installer.uninstall();
                }


I am using 1.9.26 version.

Can anyone please help ??

Patrice (Cloud Platform Support)

unread,
Sep 14, 2015, 11:16:09 AM9/14/15
to Google App Engine, snah...@adasoftware.com
Hi snahasis,

This kind of question is actually better suited for StackOverflow. We do monitor that website for our tags and answer questions there. When you post over there, keep in mind Stack has its own quality standard you will need to follow.

In any case, with the error you have, seems to me like you simply didn't put the request handler for /remote_api in your app.yaml (or appengine-web.xml). I'd make sure I include the relevant configuration file (either app.yaml or appengine-web.xml) to your question.

Cheers!
Reply all
Reply to author
Forward
0 new messages