Appengine LocalResourceFileServlet no file found for: - google-app-engine

I'm using some in-house tool to upload a config file. But I get the following error:
Jan 10, 2013 11:18:58 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /content/xxx.xml
Where xxx.xml is the file that I've uploaded. Any hints as to what this erorr means? The class LocalResourceFileServlet does not even seem to be present with my vesion of appengine. My hunch is telling me to edit web.xml but I'm not sure...
Any help/hints would be appreciated.

GAE has a read-only filesystem. So you can not upload a file to appengine and then access it via a direct url. You can only access files that were uploaded as part of the project upload.
However, you can upload file to GAE Blobstore and then access ti via your own handler - see Blobstore docs for examples.

Related

Failed while trying to upload file to snowflake

I registered a snowflake trail account and I tried to upload local file to snowflake. following the tutorial https://docs.snowflake.net/manuals/user-guide/data-load-internal-tutorial.html
I am on windows platform and it is failing when I run the put command.
https://docs.snowflake.net/manuals/user-guide/getting-started-tutorial-stage-data-files.html​
The error is
john#MYWAREHOUSE#MYDATABASE.PUBLIC>put file://c:\temp\load\contacts*.csv #my_csv_stage auto_compress=true;
Unable to parse config file: C:\Users\john/.aws/credentials
Could you please help on that?
You might be trying to upload a file to a S3 stage for which you don't have the proper credentials.
Try to run this instead -
put file://c:\temp\load\contacts*.csv #~ auto_compress=true;

Spacy on AppEngine standard

I'm trying to use Spacy on the new AppEngine Standard Python 3.7 runtime.
When I try to deploy I get:
ERROR: (gcloud.app.deploy) Cannot upload file
[/my/project/path/venv/lib/python3.7/site-packages/spacy/lang/tr/lemmatizer.py],
which has size [41523943] (greater than maximum allowed size of
[33554432]). Please delete the file or add to the skip_files entry in
your application .yaml file and try again.
A few oddities:
The docs seem to indicate that I don't need to upload the virtual environment and it will be created from requirements.txt
Looking at the log file, it seems to ignore .pyc files, but not the venv directory
The error message says to add to the skip_files in your application .yaml file and try again., but the docs say the python3.7 runtime doesn't use skip files and to use a .gcloudignore file instead, but adding venv/ or venv/* doesn't work (it appears to be ignored)
To fix this, I needed up update gcloud and reauthenticate:
gcloud components update
gcloud auth login

AppEngine deploy error - HttpIoException: Error posting to URL

Today we start recieving this message when trying to deploy.
...
Scanned 8750 files.
Scanned 9000 files.
Scanned 9250 files.
Scanned 9500 files.
Scanned 9750 files.
Initiating update.
Cloning 711 static files.
Cloning 9233 application files.
Cloned 2000 files.
Cloned 4000 files.
Cloned 6000 files.
Cloned 8000 files.
Deploying:
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Rolling back the update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/deploy?app_id=facturanube&version=1&
500 Internal Server Error
<h3>Server Error</h3><p>A server error has occurred.</p>
Debugging information may be found in C:\Users\usuario\AppData\Local\Temp\appengine-deploy6314649189927600314.log
Debugging information file contents:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/deploy?app_id=si-nube&version=1&
500 Internal Server Error
<h3>Server Error</h3><p>A server error has occurred.</p>
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:303)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:254)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:233)
at com.google.appengine.tools.admin.LoggingClientDeploySender.send(LoggingClientDeploySender.java:47)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:1100)
at com.google.appengine.tools.admin.AppVersionUpload.deploy(AppVersionUpload.java:949)
at com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:850)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFilesTransaction(AppVersionUpload.java:176)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:151)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:474)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:400)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Important considerations:
The appengine-web.xml file has no errors.
We tried deploying in different versions with no success.
The application can be deployed in another appengine application, but not in our production application.
We have no cuota-related problems. Our payments have no
problems.
Our current versions:
GWT SDK 2.4.0
App Engine 1.9.54
Java 7
Update
I was able to deploy today (2018/03/18) with no changes to code or configuration files. I guess Google did something to solve the issue.
500 A server error has occurred on deployment is usually related to malformed configs, including app.yaml and cron.yaml (and Java equivalents). Or if unsupported stanzas are included. Please check your GAE app configs and attempt to strip them down to the essentials just to narrow down which stanzas/flags are messing up the deployment.

Does GAE Blob get_serving_url() work on localhost?

I have a python GAE application, with an ndb datastore storing images as a blob property.
I use get_serving_url() function to serve images, and it works properly on the Google App Engine production server ("my-app".appspot.com).
When i try it on localhost, the URL seems to be generated correctly, but if I click on it I receive a blank page.
Is it normal, because GAE does not implement it on localhost, or it's a problem of my development environment? Anyway: is there a way to make it works on localhost? I didn't find any information on the web.
Thank you.
update
Some additional details: all the upload process work correctly, I see the uploaded image in the blobstore viewer, and its url is something like localhost:8000/*blob-key*?display=inline.
When i call get_serving_url() on localhost, i obtain an url like localhost:8080/_ah/img/*blob-key* and it does not work (blank page). I just discovered that on Log Console I receive this message:
ERROR 2013-12-30 11:52:14,299 module.py:665] Request to '/_ah/img/vMDNz9x9ak9VcjBXmfMBcg==' failed
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\module.py", line 661, in _handle_request
return handler.handle(match, environ, wrapped_start_response)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\wsgi_handler.py", line 59, in handle
return self._wsgi_app(environ, start_response)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\blob_image.py", line 195, in call
return self.serve_image(environ, start_response)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\blob_image.py", line 184, in serve_image
image, mime_type = self._transform_image(blobkey, options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\blob_image.py", line 68, in _transform_image
image = _get_images_stub()._OpenImageData(image_data)
AttributeError: 'ImagesNotImplementedServiceStub' object has no attribute '_OpenImageData'
Anyway, when i deploy on the production server, the get_serving_url() produce something like lh6.ggpht.com/*longer-blob-key* that points on Google servers and works correctly.
You need to install PIL to make it working on your local machine.
Install PIL from https://developers.google.com/appengine/docs/python/images/installingPIL
I solved the issue updating Google App Engine.
Now I have the release 1.9.15 and don't have the problem anymore.

Google App Engine Bulkloader “Authentication Failed”

I'm trying to use the bulkloader to load my data to the App-Engine server. I run the following command using Python 2.5:-
appcfg.py upload_data --application=myappname --kind=mykind
--filename=data_archive.csv --url=http://myappname.appspot.com/remote_api
But its failing with this Authentication error:-
[INFO ] Connecting to myappname.appspot.com/remote_api
[ERROR ] Exception during authentication
URLError: <urlopen error [Errno 10061] No connection could
be made because the target machine actively refused it>
[INFO ] Authentication Failed
My idea is to do a bulk download from my development server and then use this dump to do a upload to the app-engine server. The bulk download worked fine. I used this format for this:-
appcfg.py download_data --application=myappname --kind=mykind
--url=http://localhost:8888/remote_api --filename=data_archive.csv
But the bulk upoad fails. A couple of things: the bulk download asked me for a userid and password, but the bulk upload does not. Also, I don't currently have a app.yaml file which I see mentioned a lot - do I need one to do this ?
Thanks in advance for any help.
M.
EDIT
For anyone else struggling with this, the problem was indeed being behind the proxy server, but there was another 'error' with what is above. The app-id needs the "s~" bit added to it.
appcfg.py upload_data --application=s~myappname --kind=mykind
--filename=data_archive.csv --url=http://myappname.appspot.com/remote_api
This isn't an authentication issue - that message is a red-herring - your machine is unable to contact the App Engine app at all. Do you have a proxy you need to transit through in order to make external connections?
You do not need --application=s~myappname when using bulkloader - Google have mentioned before:
Warning! Do not use the --application= flag to get the application ID
when using the bulk loader. Instead, use --url=.
For more detail take a look here:
https://developers.google.com/appengine/docs/python/tools/uploadingdata
app.yaml is how it finds your server. I am not sure how you can try and upload without one.
In addition to having an app.yaml that points to the production server, the production server also needs to have remote_api turned on (in it's app.yaml and in the version you are trying to reach):
builtins:
- remote_api: on

Resources