我在Eclipse控制台中看不到Glassfish的日志。
我尝试右键单击“服务器”->“ Glassfish”->“查看日志文件”中的GlassFish服务器,但该文件显示了以以下结尾的文件:
2018-09-04T18:36:51.945+0100|Severe: The SSL certificate has expired: [
[
Version: V3
Subject: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 135786214035069526348186531221551781468391756233528066061569654028671100866720352830303278016129003918213826297308054231261658522889438712013757624116391437358730449661353175673177742307421061340003741057138887918110217006515773038453829253517076741780039735595086881329494037450587568122088113584549069375417
public exponent: 65537
Validity: [From: Sat Aug 22 17:41:51 BST 1998,
To: Wed Aug 22 17:41:51 BST 2018]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 35def4cf]
Certificate Extensions: 7
[1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
Extension unknown: DER encoded OCTET string =
0000: 04 0D 30 0B 1B 05 56 33 2E 30 63 03 02 06 C0 ..0...V3.0c....
[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
]
]
[3]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
]
[4]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[CN=CRL1, OU=Equifax Secure Certificate Authority, O=Equifax, C=US]
这根本没有改变,无论我是停止,重新启动,还是在GF服务器上运行webapp等,以及是否实际查看文件(... \ glassfish5 \ glassfish \ domains \ domain1 \ logs \ server .log)我发现它显示的内容在5400行附近,server.log文件中实际上有8600行,因此server.log文件中实际上比最后一行多了3000行在eclipse中显示。例如,日志摘录中的时间戳为18:36,但当前时间为21:21,hte文件的当前尾部为:
[2018-09-04T21:02:45.234+0100] [glassfish 5.0] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=100 _ThreadName=Thread-23] [timeMillis: 1536091365234] [levelValue: 800] [[
Loading application [__admingui] at [/]]]
[2018-09-04T21:02:45.235+0100] [glassfish 5.0] [INFO] [NCLS-CORE-00022] [javax.enterprise.system.core] [tid: _ThreadID=100 _ThreadName=Thread-23] [timeMillis: 1536091365235] [levelValue: 800] [[
Loading application __admingui done in 2,175 ms]]
[2018-09-04T21:14:29.419+0100] [glassfish 5.0] [INFO] [] [] [tid: _ThreadID=30 _ThreadName=Thread-8] [timeMillis: 1536092069419] [levelValue: 800] [[
doGet - name=null]]
此外,当我在Notepad ++中打开server.log文件时,在修改文件时,疯狂地没有刷新。我必须从磁盘重新加载它才能查看文件中的更改。 因此,似乎可以实际监视此日志文件的唯一方法是使用cygwin的tail -f。
任何人都知道如何解决此问题,特别是如何在日食中实时查看glassfish的日志输出(包括SOP)?在Netbeans中工作正常。
非常感谢您的帮助。
编辑
我注意到,当我重新启动服务器时,在eclipse的控制台中,将重新读取server.log文件,但始终(似乎)直到同一点:有关SSL证书的严重警告到期的位出现:
2018-09-04T23:27:33.879+0100|Info: visiting unvisited references
2018-09-04T23:27:34.425+0100|Severe: The SSL certificate has expired: [
[
Version: V3
Subject: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 135786214035069526348186531221551781468391756233528066061569654028671100866720352830303278016129003918213826297308054231261658522889438712013757624116391437358730449661353175673177742307421061340003741057138887918110217006515773038453829253517076741780039735595086881329494037450587568122088113584549069375417
public exponent: 65537
Validity: [From: Sat Aug 22 17:41:51 BST 1998,
To: Wed Aug 22 17:41:51 BST 2018]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 35def4cf]
Certificate Extensions: 7
[1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
Extension unknown: DER encoded OCTET string =
0000: 04 0D 30 0B 1B 05 56 33 2E 30 63 03 02 06 C0 ..0...V3.0c....
[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
]
]
[3]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
]
[4]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[CN=CRL1, OU=Equifax Secure Certificate Authority, O=Equifax, C=US]
在这里,server.log停止。 eclipse的控制台中永远不会出现server.log文件中的更多内容。
答案 0 :(得分:3)
奇怪的是,它是在新安装的glassfish上安装的,最初不是问题,并且一切都按预期进行了记录。但是过一会儿,日志将变为空。
我终于发现,从glassfish中删除过期的证书会使日志记录恢复正常。
我做了什么:
cd domains/<domain>/config
keytool -v -list -keystore cacerts.jks
例如,您将看到您提到的等分设备将解析为以下别名:equifaxsecureca
keytool -delete -keystore cacerts.jks -alias equifaxsecureca -storePass changeit
从今天起,我必须同时删除equifaxsecureca
和gtecybertrustglobalca
keytool可以在您的jdk安装中找到。