After creating a new cron.xml file in my java project, when I upload my app to GAE, some errors occur:
Detail:
Verifying availability:
Will check again in 1 seconds.
Will check again in 2 seconds.
Will check again in 4 seconds.
Will check again in 8 seconds.
Closing update: new version is ready to start serving.
Updating datastore:
Uploading index definitions.
Uploading cron jobs.com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/cron/update?app_id=aptosin&version=1&
500 Internal Server Error
Server Error (500)
A server error has occurred.
cron.xml:
<?xml version="1.0" encoding="UTF-8"?>
<cronentries>
<cron>
<url>/url</url>
<description>Backup data 02 times per day</description>
<schedule>every 12 hours</schedule>
<timezone>America/New_York</timezone>
<target>ah-builtin-python-bundle</target>
</cron>
</cronentries>
The URL : /_ah/datastore_admin/backup.create?name=BackupDaily &kind=Datastore&kind=Datastore&filesystem= blobstore&gs_bucket_name=smsspamfilteraptosin
Can somebody tell me what is going wrong here?
Thank you.
Related
I am using maven plugin 1.9.60 with JDK 8
Running command
mvn install appengine:update -Dappengine.additionalParams="--service_account_json_key_file=client-secret.json"
I could see the version deployed but 0% traffic. Logs says error as below. Could someone suggest how to fix this?
Beginning interaction for module default...
0% Created staging directory at: '/var/folders/ny/z92xw4ps0j71v43mnvjzjyd80000gn/T/appcfg7082099622802800350.tmp'
5% Scanning for jsp files.
8% Generated git repository information file.
20% Scanning files on local disk.
25% Initiating update.
28% Cloning 34 application files.
40% Uploading 2 files.
52% Uploaded 1 files.
61% Uploaded 2 files.
68% Sending batch containing 2 file(s) totaling 1KB.
73% Initializing precompilation...
90% Deploying new version.
95% Closing update: new version is ready to start serving.
98% Uploading index definitions.
Feb. 19, 2018 12:54:48 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
This is try #0
Feb. 19, 2018 12:54:48 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
This is try #1
Feb. 19, 2018 12:54:49 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
This is try #2
Feb. 19, 2018 12:54:49 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
This is try #3
Error Details:
2018-02-19 00:54:17.700:INFO::main: Logging initialized #409ms
2018-02-19 00:54:17.816:INFO:oejs.Server:main: jetty-9.3.18.v20170406
2018-02-19 00:54:19.481:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=1228ms
2018-02-19 00:54:19.497:INFO:oejq.QuickStartDescriptorGenerator:main: Quickstart generating
2018-02-19 00:54:19.512:INFO:oejsh.ContextHandler:main: Started o.e.j.q.QuickStartWebApp#2aceadd4{/,file:///private/var/folders/ny/z92xw4ps0j71v43mnvjzjyd80000gn/T/appcfg7082099622802800350.tmp/,AVAILABLE}
2018-02-19 00:54:19.514:INFO:oejs.Server:main: Started #2231ms
2018-02-19 00:54:19.517:INFO:oejsh.ContextHandler:main: Stopped o.e.j.q.QuickStartWebApp#2aceadd4{/,file:///private/var/folders/ny/z92xw4ps0j71v43mnvjzjyd80000gn/T/appcfg7082099622802800350.tmp/,UNAVAILABLE}
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
Unable to update app: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=clean-aleph-191303&version=beta-001&
403 Forbidden
You do not have permission to modify this app (app_id=u'f~clean-aleph-191303').
appengine-web.xml
```
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>clean-aleph-191303</application>
<version>beta-001</version>
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
</appengine-web-app>
```
pom.xml (plugin declaration)
```
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.60</version>
</plugin>
```
Complete bitbucket repo can be found here.
https://bitbucket.org/rohgoyal/springbootgcp-example/src
The issue you are experiencing is due to a missing role on the service account. It probably has the "App Engine Deployer" role assigned but it is missing the "Datastore Index Admin" role and this causes the 403s while POSTing to appengine.google.com/api/datastore/index/
After adding that role, you'll need to regenerate the private key (client-secret.json as you've named it) because the old one won't have the new permissions.
Some more information on roles needed to deploy GAE apps can be found on Deploying using IAM roles section.
Note: Thanks for providing a full repro. It is always helpful.
Am using digitalocean VPS I installed solr-5.5.0
sudo service solr status
Found 1 Solr nodes:
Solr process 1072 running on port 8983
{
"solr_home":"/var/solr/data/",
"version":"5.2.1 1684708 - shalin - 2015-06-10 23:20:13",
"startTime":"2016-02-25T17:14:47.47Z",
"uptime":"0 days, 8 hours, 39 minutes, 54 seconds",
"memory":"92.1 MB (%18.8) of 490.7 MB"}
http://myip:8983/solr/
am getting this error on my screen.
HTTP ERROR 404
Problem accessing /solr/. Reason:
Not Found
Powered by Jetty://
how to fix this error
As the exception says, you are missing the solrconfig.xml file in the conf folder of your core.
To get this file and all others, go to {SOLR_DIST}/server/solr/configsets/basic_configs and copy over the conf folder to /var/solr/data/gettingstarted1 and restart solr.
This will fix the error.
I am attempting to run a cronjob on App Engine with Endpoints.
I am receiving a Method Not Allowed (HTTP 405) error when I use the cronjob. How can I get around this error?
Here is my current cron.xml:
<?xml version="1.0" encoding="UTF-8"?>
<cronentries>
<cron>
<url>/_ah/spi/messaging/v1/checkUpdates</url>
<description>Check for news every 5 minutes</description>
<schedule>every 5 minutes</schedule>
</cron>
<cron>
<url>/_ah/spi/package.backend.MessagingEndpoint.checkUpdates</url>
<description>Check for news every 5 minutes</description>
<schedule>every 5 minutes</schedule>
</cron>
</cronentries>
My Endpoint without code body:
#ApiMethod(
name = "checkUpdatesPost",
httpMethod = ApiMethod.HttpMethod.POST
)
public void checkUpdatesPost() {
checkUpdates();
}
#ApiMethod(
name = "checkUpdates",
httpMethod = ApiMethod.HttpMethod.GET
)
public void checkUpdates() {
// ... Stuff
}
Running either of these functions through Google APIs Explorer runs correctly:
Testing with GET
GET https://myapp.appspot.com/_ah/api/messaging/v1/checkUpdates
Testing with POST
POST https://myapp.appspot.com/_ah/api/messaging/v1/checkUpdatesPost
Here is the log, as seen on the Logs Viewer:
You can see here AppEngine-. refers to an attempt by Cron. Chrome 48 is an attempt by my browser / Google APIs Explorer.
As I understand it, Cron does not work with POST. For this reason, I created another function for GET that mirrors the function of POST.
In my cron.xml I supplied two variations.
/_ah/spi/messaging/v1/checkUpdates - This is what I would use in a browser to access the resource.
/_ah/spi/package.backend.MessagingEndpoint.checkUpdates - This is what I see in the Logs Viewer once I have run #1 in the browser.
It appears to be clearly stated in the documentation.
Calling Google Cloud Endpoints
You cannot call a Google Cloud Endpoint from a cron job. Instead, you
should issue a request to a target that is served by a handler that's
specified in your app's configuration file or in a dispatch file. That
handler then calls the appropriate endpoint class and method.
I am new to Solr and trying to figure out the basics of indexing one file. I've started with this tutorial http://lucene.apache.org/solr/quickstart.html, but being on windows I am hitting a wall when it comes to running the command to index.
This is what my output looks like:
SolrCloud example is running, please visit http://localhost:8983/solr"
C:\Projects\solr-5.1.0>java -Dc=gettingstarted -Dtype=text/csv -Dfiletypes=cs -
jar example/exampledocs/post.jar Z:/Indexer/tfs/ShippingOptionsPerRecipient.aspx
.cs
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/gettingstarted/update usi
ng content-type text/csv...
POSTing file ShippingOptionsPerRecipient.aspx.cs to [base]
SimplePostTool: WARNING: Solr returned an error #503 (Service Unavailable) for u
rl: http://localhost:8983/solr/gettingstarted/update
SimplePostTool: WARNING: Response: <?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">503</int><int name="QTime">4057</i
nt></lst><lst name="error"><str name="msg">No registered leader was found after
waiting for 4000ms , collection: gettingstarted slice: shard1</str><int name="co
de">503</int></lst>
</response>
SimplePostTool: WARNING: IOException while reading response: java.io.IOException
: Server returned HTTP response code: 503 for URL: http://localhost:8983/solr/ge
ttingstarted/update
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/updat
e...
Time spent: 0:00:04.255
Unfortunately, I can't find much documentation on any of these errors.
Any help would be appreciated.
I tried to upload my test gwt app but I've just faced a quite strange error. Every time I try to upload app I get this:
Unable to update app: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
See the deployment console for more details Unable to update app:
Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
... console says this
Skipping GWT compilation since no relevant changes have occurred since
the last deploy. Created staging directory at:
'C:\DOCUME~1\1\LOCALS~1\Temp\appcfg4973998929980348825.tmp' Scanning
for jsp files. Scanning files on local disk. Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to
URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
Debugging information may be found in C:\Documents and
Settings\1\Local Settings\Temp\appengine-deploy1308974562331110258.log
... and error log says this:
Unable to update: com.google.appengine.tools.admin.HttpIoException:
Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=gwttestapp001&version=1.0&
500 Internal Server Error
Server Error (500) A server error has occurred.
at
com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:281)
at
com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:234)
at
com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:213)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:606)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:414)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:122)
at
com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:328)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:52)
at
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:265)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:144)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I just updated GAE from 1.5.2 to 1.6.2 but the error keeps going :(
How to fix it?
Well... I had to make my own research of this kind of problem deeper on...
So I guess I finally found the problem root :S The thing is in my app version syntax;
My appengine-web.xml file was containing
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>gwttestapp001</application>
<version>1.0</version>
</appengine-web-app>
... but according to tutorial I found the thing is "there is no way to use dots" in version spelling so I changed the content to
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>gwttestapp001</application>
<version>1</version>
</appengine-web-app>
... and all uploaded successfully :)
I hope that tip saves ones day
Solution to this can be like, as it worked for me:
properties starts
<appengine.app.version>10</appengine.app.version>
<appengine.target.version>1.8.7</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
properties ends
configuration starts
<version>${appengine.app.version}</version>
configuration ends
In configuration label, write version as that in properties label as above. Hope this will help.