-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED while using Stackdriver logging library #2407
Comments
For You said adding dependency worked until a few days back. Did it stop working after changing version? It seems unlikely that the same build randomly breaks. |
@pongad Thanks for your inputs. Yes, I tried 2.0.3.Final. Actually, I haven't changed anything. But my guess is there are lot of google dependencies that are being pulled into the project as transitive dependencies. Something in the downstream project changed which is affecting it. Before when I encountered this issue I noticed that netty-tcnative-boringssl-static is being excluded. After adding it, the resolve got resolved. But unfortunately something changed and I started to see this issue again.
Thank you |
I see. I'll work to reproduce this. |
@sanumandla I unfortunately cannot reproduce this issue. I created a fresh maven package and added dependency
I then copied this sample code and executed it. It executed successfully and I can see the log "message" in my cloud console. Could it be that some other dependency is conflicting with ours...? |
@pongad Yes, my suspicion is it's interfering with some other libraries. Couldn't figure out what it could be. Some more context
I use other google services as well, SD monitoring and error reporting
Here is the code that I use
Thank you |
I have the following suspicion: The error "Jetty ALPN/NPN has not been properly configured" is usually caused by gRPC not being able to find SSL libraries. Our libraries declare dependency on boringssl to satisfy this. This explains why you don't see it during tests. Maybe that dependency gets removed from the classpath when you deploy to tomcat? @vam-google You're more knowledgeable than I am about classpaths, do you think we're on the right track? |
Hi, @pongad I checked my dependency tree and boringssl is being picked up. But how can I make sure that the jar is picked up during runtime while deploying to tomcat if that is the case ? One solution is to drop in jar to tomcat libs which is not a feasible solutions for production deployments. Please share your thoughts. Thank you |
Hi @sanumandla. It is really hard to tell for sure what is happening, but here are some suggestions: Try to add google-cloud-java root pom as BOM (bill of materials) in your pom: <dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.23.0-alpha</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> Check in runtime the actual jars added to your classpath (after it went through all the custom classloaders, used by tomcat). For example, if the used classloaders are URLClassLoaders, you can use the following servlet code to output runtime information about your environment (or modify the code accordingly, if the classloader is of different type): @WebServlet(value = "/info")
public class GaeInfoServlet extends HttpServlet {
private static final long serialVersionUID = -3598229312089602597L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setContentType("text");
PrintWriter out = resp.getWriter();
ClassLoader cl = getClass().getClassLoader();
out.append("CLASS LOADER:\n\n");
out.append("Name: ").append(cl != null ? cl.getClass().getName() : null).append('\n');
if (cl instanceof URLClassLoader) {
URLClassLoader urlCl = (URLClassLoader) cl;
out.append("Urls: ").append('\n');
for (URL url : urlCl.getURLs()) {
out.append(url.toString()).append('\n');
}
}
out.append("\nENVIRONMENT VARIABLES:\n\n");
Map<String, String> envVars = System.getenv();
for (Map.Entry<String, String> entry : envVars.entrySet()) {
out.append(entry.getKey()).append("=").append(entry.getValue()).append('\n');
}
out.append("\n\nSYSTEM PROPERTIES:\n\n");
System.getProperties().list(out);
out.close();
}
} This should allow you to check which I don't know many details about tcnative library, but it seems suspicious: netty-tcnative is a tomcat library fork, that we have dependency on, and at the same time, since you are running your app in tomcat, maybe tomcat itself automatically provides a version of that library for you "for free", and there can be a conflict of that sort (this is all just guesses and speculations, but I would not be surprised if the actual situation is similar to that). |
You may want to check the |
grpc/grpc-java#3025 is the canonical issue for this. |
I'll close this as duplicate. Please reopen if required. |
Hi,
I have been experiencing an issue which is blocking me from writing logs to Stackdriver. I see an exception saying "SEVERE: RuntimeException while executing runnable com.reltio.gcp.google.common.util.concurrent.Futures$6@7a04e1cd with executor MoreExecutors.directExecutor()
java.lang.RuntimeException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED"
The issue happens only when we deploy a war file to tomcat. We can resolve this issue by adding ALPN jar to tomcat bootstrap file but it's not a feasible solution for us. Other approach is to add the following dependency which seemed to work until few days back but for some reason started failing.
I am using google-cloud-logging v1.2.0. I tried using the latest version (1.6.0) but see "Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured."
Attached are the screenshots with stacktace.
This seems to be client library related issues. Any suggestions are highly appreciated.
Thanks
The text was updated successfully, but these errors were encountered: