While it is relatively simple to get the app logs on the AppEngine Java Dev server, I haven't been able to find how to get the request logs. This seems like such a basic feature that there must be an easy way to do it, but so far, I'm stumped. Any help would be appreciated.
There is no nice log viewer, logs are directly dumped to server STDOUT, if you use Idea IDE, you will see logs in Application Servers tab at the bottom. Logs are just dumped as they come in (each log.info("logged event"), it is not possible to view logs per request base.
Related
For some reason my project is not showing logs in the page https://console.cloud.google.com/logs/viewer and I'm prompted with the message:
Welcome to Cloud Logging
View, search, analyze, and download your project's log data, all in one place. This is where you will find the logs for all your projects and Cloud Platform services.
You do not have any logs in your project right now.
However I definitely have logs generated by a google app engine and cloud build, I can access them without a problem using the gcloud command:
gcloud logging read "resource.type=gae_app" --limit 10 --format json
Also, I've enabled error reporting and I can see the logs there for errors, but if I click the label "View Logs" it does nothing.
There's something broken in my project but I'm not sure how to reach support in this case, also has anyone ever experienced something similar ? Is there any action that I can perform that could fix this issue ?
Thank you for any help :)
It magically fixed itself this morning. Yesterday I've enabled stackdriver monitoring in the hope that it could fix the issue, I don't know if that is relevant.
For anyone facing the same problem, best suggestion would be to contact support. For me it fixed automatically after few days :)
I access an ADF based application through the Web. The application suddenly goes blank and nothing is written in the server logs. For applications using jnlp or java applet we can enable java trace to find what exactly happened when the request was sent to the server. Is there any way we can get similar trace for this web based application?
Regards,
Sameer
ADF generates plenty of logging, but if you get an error and you can't see it in the logs - that developer's fault - bad code that swallows the errors.
Using Eclipse, I am experiencing an error when trying to deploy a rather basic web app with JAX-RS and JAXB. It runs okay locally, but when trying it on the remote servers I get the message shown below...
'Deploying to Google' has encountered a problem / This application does not exist
Below shows my appengine-web.xml
The XML file illustrates that I am using the same name in the xml as what's specified in the project properties...
The output window show...
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: '/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appcfg2754901216637807129.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=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
Debugging information may be found in /private/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appengine-deploy447984481661870877.log
The referenced debug logs show...
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:644)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:449)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:124)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
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:53)
Any answers will be appreciated. At one point my browser was not logged in to the target google account, so I swapped to the correct one a little later, Google does render the application name as expected.
Okay, this was simple in the end! Eclipse performs an auto-login to the Google account, unfortunately I created the Eclipse project whilst being logged in to one Google account and then tried to specify the application name afterwards.
You'll see in the bottom-right (or bottom-left in some versions) a Google icon with the name of the user that you are logged in as. If that's not the account where your application is defined, then simply logout of that account, then login as the correct Google account.
Now there's no error :-)
I know this question is super old but I had this issue all day and finally I found a solution. Maybe it will help someone out in the future.
After you create a project in Google Cloud Platform, you must go to google cloud shell in your project and run the command
gcloud beta app create
After you run this command, you will get prompted to choose a region. Then go back to eclipse and try deploying it. It worked for me.
There are not just 1 way can cause this problem. For me, I have this problem when I create the project using Maven. But I don't have the same issue if I directly create the project from the Google plugin.
There might be another issue, when you register with Google App Engine, you receive email indicating your activation. If you have not received the email yet, this problem could occur too.
Another issue could be to use the gmail account for the Google App Engine to avoid any such errors.
I am developing a web application on an App Engine backend using the GAE dev server. My problem is that as soon as I start serving pages from the backend, log messages stop appearing on the log console. Not all logging goes away. The start up log entries look normal. I even see that annoying "can't open zipfile" message with tags that show that the message was logged from the backend instance. It's only logging calls executed when my pages are served by the backend instance that don't appear.
I don't know if this is a bug or if I should be looking some other place for my logs. If I upload the app to the production server and look in the logs, the messages are present.
Any help would be appreciated.
Backends has separate logs just like different application versions has. Select your backend in a drop-down menu, in the blue bar at the top of the appengine admin console and you will see logs from the backend.
As soon as I figured out how to invoke my app as a Backends app, my log messages stopped appearing.
I found this helpful post which says the Backends logs are kept separately and that I need to switch to Backends view by selecting the named backend from the dropdown at the top of the admin console, but I don't see anything Backends specific in that list to select.
Perhaps this is a clue... when I invoke my app via myapp.appspot.com/dostuff, in the log I see I'm getting the DeadlineExceededError after 60 secs, indicating it's not running as a Backends app. But when I invoke it via mybackend.myapp.appspot.com/dostuff, it continues running as needed, but no log entries!
Seems like I'm missing something. Thanks.
Somehow my app wasn't fully recognized by GAE as a Backend app. And therefore my backend instances weren't available in the drop-list. Seeing that others had similar trouble with a Python 2.7 app (ex.) that had been initially uploaded as a 2.5 app, I created a new app in GAE and uploaded to there and it worked. Sorry I don't have a more definitive answer.
Before all was working well, I also ended up creating an empty /_ah/start handler as suggested by someone in this thread. Also if you're deploying a multi-threaded backend, make sure to check this post out -- there's some important stuff I didn't run across in the docs.