我试图在本地liferay 6.2 tomcat 7.0.62上设置java log4j sentry并且仍然不允许错误405。
这是来自liferay服务器的日志
09:39:39.383 [raven-pool-1-thread-4] WARN : Lockdown started for 327680ms.
09:39:39.383 [raven-pool-1-thread-1] WARN : An exception due to the connection occurred, a lockdown will be initiated.
com.getsentry.raven.connection.ConnectionException: <html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.10.2</center>
</body>
</html>
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:156)
at com.getsentry.raven.connection.AbstractConnection.send(AbstractConnection.java:86)
at com.getsentry.raven.connection.AsyncConnection$EventSubmitter.run(AsyncConnection.java:180)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://sentry.company.cz/api/5/store/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at com.getsentry.raven.connection.HttpConnection.doSend(HttpConnection.java:148)
... 5 more
这是我的log4j.properties
log4j.rootLogger=INFO, Console, SentryAppender
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{HH:mm:ss.SSS} [%t] %-5p: %m%n
log4j.appender.SentryAppender=com.getsentry.raven.log4j.SentryAppender
log4j.appender.SentryAppender.dsn=http://private:public@sentry.company.cz/5
log4j.appender.SentryAppender.tags=tag1:value1,tag2:value2
我已连接到VPN,我重新安装了证书,但没有结果。部署到liferay服务器时失败。有谁知道该怎么办?提前致谢
答案 0 :(得分:0)
问题在于我必须使用https而不是http。我花了太多时间才弄清楚
编辑:
在liferay服务器日志中,仍有例外,它无法找到主机,但在哨兵网络应用程序中,它会正确记录所有错误。