Google App Engine Failure Notification Not Working

I am sending an email using the Google App Engine through my own domain admin@codeavengers.com.

I want to receive failure notifications, but I cannot get it to work.

I have the following code in appengine-web.xml

<inbound-services> <service>channel_presence</service> <service>mail_bounce</service> </inbound-services> 

web.xml contains:

 <servlet> <servlet-name>bouncehandler</servlet-name> <servlet-class>com.codeavengers.BounceHandlerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>bouncehandler</servlet-name> <url-pattern>/_ah/bounce</url-pattern> </servlet-mapping> 

And the BounceHandlerServlet contains ...

 @Override public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { log.severe("BounceHandler triggered"); } 

The fault handler does not start! Any ideas what might cause the problem? Does the fault handler work with a custom domain? Or does it only work for appspotmail.com accounts?

+4
source share
1 answer

A few things to consider:

  • Not all types of failures are transmitted to the application. This is easy to see if the admin @ user receives crash notifications in the form of email messages in their inbox, but you see that /_ah/bounce never started in your application logs. Try sending mail to a non-existent user in your domain for testing purposes.

  • if you see that /_ah/bounce was started but the log is empty, make sure your WEB-INF/logging.properties determines the appropriate logging level for the bounce servlet. There should not be a case for log.severe , but it is still worth checking out, since nothing is specified below in the GAE protocol configuration WARNING, and people tend to register material with INFO severity.

0
source

Source: https://habr.com/ru/post/1502306/


All Articles