java - Tomcat 8.0.33 因 Spring 安全而崩溃

标签 java spring tomcat spring-security

每次在 JVM 上发生负载时,我都会遇到 tomcat 崩溃的问题, 我最初收到的错误日志低于它,它工作正常。当增加一些用户访问服务器时,服务器每次都会崩溃。 我的 java 版本是 8.0_222 请帮我解决这个问题

提前致谢。

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f5e79885cb8, pid=3364, tid=0x00007f5df6fef700
#
# JRE version: OpenJDK Runtime Environment (8.0_222-b10) (build 1.8.0_222-b10)
# Java VM: OpenJDK 64-Bit Server VM (25.222-b10 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [core.so+0x7cb8]  socket_send+0x98
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/apache-tomcat-8.0.33/bin/hs_err_pid3364.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Sep 23, 2019 11:55:39 -0700 [5979 1] com.newrelic INFO: New Relic Agent: Loading configuration file "/opt/apache-tomcat-8.0.33/newrelic/./newrelic.yml"
Sep 23, 2019 11:55:40 -0700 [5979 1] com.newrelic INFO: New Relic Agent: Writing to log file: /opt/apache-tomcat-8.0.33/newrelic/logs/newrelic_agent.log
[GC (Allocation Failure) [ParNew: 545344K->35317K(613440K), 0.0337966 secs] 545344K->35317K(5174784K), 0.0338674 secs] [Times: user=0.12 sys=0.01, real=0.04 secs] 
[GC (CMS Initial Mark) [1 CMS-initial-mark: 0K(4561344K)] 35327K(5174784K), 0.0046687 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[CMS-concurrent-mark-start]
[CMS-concurrent-mark: 0.001/0.001 secs] [Times: user=0.01 sys=0.00, real=0.00 secs] 
[CMS-concurrent-preclean-start]
[CMS-concurrent-preclean: 0.005/0.005 secs] [Times: user=0.03 sys=0.00, real=0.01 secs] 
[CMS-concurrent-abortable-preclean-start]
23-Sep-2019 11:55:44.925 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keepAlivetimeout' to '60000' did not find a matching property.
23-Sep-2019 11:55:44.940 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keepAlivetimeout' to '60000' did not find a matching property.
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.33
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Mar 18 2016 20:31:49 UTC
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.33.0
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-957.27.2.el7.x86_64
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
23-Sep-2019 11:55:45.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/jre
23-Sep-2019 11:55:45.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_222-b10
23-Sep-2019 11:55:45.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
23-Sep-2019 11:55:45.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/apache-tomcat-8.0.33
23-Sep-2019 11:55:45.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/apache-tomcat-8.0.33

最佳答案

这是 native 代码中的段错误,正如第一行所说,这是一个 fatal error 。由于它是 native 代码,因此您没有太多选择。我在那里看到了 com.newrelic可能在这里是相关的,因为代理可以做一些棘手的事情。

通常建议是“使用最新版本”,但您已经在使用 build 1.8.0_222-b10,升级到较新的主要版本可能会导致更多问题。正如 Andreas 所说,您仍然可以看到升级 Tomcat 是否有帮助。

如果您可以在不启用 New Relic 代理的情况下运行它,您至少可以查看它是否以某种方式相关,并将其作为潜在问题源从列表中删除。

关于java - Tomcat 8.0.33 因 Spring 安全而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58110825/

相关文章:

jsp - 如何在服务器发送响应之前使用 servlet 过滤器拦截页面请求,将 jsessionid 附加到响应 URL

tomcat - 删除tomcat 8中的示例文件夹

java - 在 for 语句中打印解决方案时出现未知错误

java - 如何在Java中模拟一个站点?

java - 回收站 View : No adapter attached; skipping layout in Activity

java - 如何在 Spring Boot 中将区域设置从 http 请求传递到 websocket?

java - Tomcat 环境变量 - 是否可以使它们永久存在?或者在重新部署时不会丢失?

java - 将 2 个 txt 文件中的一些元素添加到第三个文件中

java - 没有名为 authenticationManager 的 bean

java - 如何使用 Spring Data JPA 删除子记录