Glassfish login results in 'HTTP Status 500 - Internal Server Error' and some glassfish errors on server.log

412 views
Skip to first unread message

Adilia Alves

unread,
Nov 5, 2019, 6:08:23 AM11/5/19
to Dataverse Users Community
I am trying to install dataverse in my institution.
I am getting some errors when I start domain and I do not know how to solve them.

When I do

/usr/local/glassfish4/bin/$ ./asadmin start-domain
I get the message 'command start-domain executed successfully' but when I try to login on URL

dados.ipb.pt:4848,  I get 'HTTP Status 500 - Internal Server Error'

[2019-11-05T10:27:02.590+0000] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=49 _ThreadName=deployment-jar-scanner] [timeMillis: 1572949622590] [levelValue: 1000] [[
  Exception while visiting module-info.class of size 506
java.lang.IllegalArgumentException
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:358)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:344)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:303)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
]]

[2019-11-05T10:27:02.984+0000] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=49 _ThreadName=deployment-jar-scanner] [timeMillis: 1572949622984] [levelValue: 1000] [[
  Exception while visiting META-INF/versions/9/org/junit/platform/commons/util/ModuleUtils.class of size 10770
java.lang.IllegalArgumentException
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:358)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:344)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:303)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
]]

[2019-11-05T10:27:02.985+0000] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=49 _ThreadName=deployment-jar-scanner] [timeMillis: 1572949622985] [levelValue: 1000] [[
  Exception while visiting META-INF/versions/9/org/junit/platform/commons/util/ModuleUtils$ModuleReferenceScanner.class of size 5187
java.lang.IllegalArgumentException
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:358)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:344)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:303)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
]]

[2019-11-05T10:27:04.115+0000] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=49 _ThreadName=deployment-jar-scanner] [timeMillis: 1572949624115] [levelValue: 1000] [[
  Exception while visiting module-info.class of size 192
java.lang.IllegalArgumentException
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153)
        at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424)
        at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:358)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
        at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
        at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:344)
        at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:303)
        at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
]]

[2019-11-05T10:27:10.454+0000] [glassfish 4.1] [SEVERE] [NCLS-SECURITY-05054] [javax.enterprise.system.security.ssl] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1572949612514] [timeMillis: 1572949630454] [levelValue: 1000] [[
  The SSL certificate has expired: [
[
  Version: V3
  Subject: CN=Deutsche Telekom Root CA 2, OU=T-TeleSec Trust Center, O=Deutsche Telekom AG, C=DE
  Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

  Key:  Sun RSA public key, 2048 bits
  modulus: 21592488834472721835828923313267221681805681560816613665117041067418990628699422224541254881572840018756975149874502129398529690135936622683711503874225941028227513056091445982024526423239271903233756224518597826922911539049531994350382435126606426875761918197347607336633222436005626297159414389201765113308100318618288288291485154604265616398148296650155165318384289355945126554105645039541404960531031242256759730414072461724450991364449022227333471969448508379191402045485854015177532248310281723157915707656855986344971996618557740103577115665148480410347160129515545343296359775806391716937455257572333597903487
  public exponent: 65537
  Validity: [From: Fri Jul 09 13:11:00 WEST 1999,
               To: Wed Jul 10 00:59:00 WEST 2019]
  Issuer: CN=Deutsche Telekom Root CA 2, OU=T-TeleSec Trust Center, O=Deutsche Telekom AG, C=DE
  SerialNumber: [    26]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:5
]

[2]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
  Key_CertSign
  Crl_Sign
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 31 C3 79 1B BA F5 53 D7   17 E0 89 7A 2D 17 6C 0A  1.y...S....z-.l.
0010: B3 2B 9D 33                                        .+.3
]
]

]
  Algorithm: [SHA1withRSA]
  Signature:
0000: 94 64 59 AD 39 64 E7 29   EB 13 FE 5A C3 8B 13 57  .dY.9d.)...Z...W
0010: C8 04 24 F0 74 77 C0 60   E3 67 FB E9 89 A6 83 BF  ..$.tw.`.g......
0020: 96 82 7C 6E D4 C3 3D EF   9E 80 6E BB 29 B4 98 7A  ...n..=...n.)..z
0030: B1 3B 54 EB 39 17 47 7E   1A 8E 0B FC 1F 31 59 31  .;T.9.G......1Y1
0040: 04 B2 CE 17 F3 2C C7 62   36 55 E2 22 D8 89 55 B4  .....,.b6U."..U.
0050: 98 48 AA 64 FA D6 1C 36   D8 44 78 5A 5A 23 3A 57  .H.d...6.DxZZ#:W
0060: 97 F5 7A 30 4F AE 9F 6A   4C 4B 2B 8E A0 03 E3 3E  ..z0O..jLK+....>
0070: E0 A9 D4 D2 7B D2 B3 A8   E2 72 3C AD 9E FF 80 59  .........r<....Y
0080: E4 9B 45 B4 F6 3B B0 CD   39 19 98 32 E5 EA 21 61  ..E..;..9..2..!a
0090: 90 E4 31 21 8E 34 B1 F7   2F 35 4A 85 10 DA E7 8A  ..1!.4../5J.....
00A0: 37 21 BE 59 63 E0 F2 85   88 31 53 D4 54 14 85 70  7!.Yc....1S.T..p
00B0: 79 F4 2E 06 77 27 75 2F   1F B8 8A F9 FE C5 BA D8  y...w'u/........
00C0: 36 E4 83 EC E7 65 B7 BF   63 5A F3 46 AF 81 94 37  6....e..cZ.F...7
00D0: D4 41 8C D6 23 D6 1E CF   F5 68 1B 44 63 A2 5A BA  .A..#....h.Dc.Z.
00E0: A7 35 59 A1 E5 70 05 9B   0E 23 57 99 94 0A 6D BA  .5Y..p...#W...m.
00F0: 39 63 28 86 92 F3 18 84   D8 FB D1 CF 05 56 64 57  9c(..........VdW

]]]

[2019-11-05T10:27:10.460+0000] [glassfish 4.1] [SEVERE] [NCLS-SECURITY-05054] [javax.enterprise.system.security.ssl] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1572949612514] [timeMillis: 1572949630460] [levelValue: 1000] [[
  The SSL certificate has expired: [
[
  Version: V3
  Subject: CN=Class 2 Primary CA, O=Certplus, C=FR
  Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

  Key:  Sun RSA public key, 2048 bits
  modulus: 27812167065015388823464546085051838038637984524955446961713677446129738317206823109084046347331445589553661044970567054378890434198997684264035427965612348371450712507326051325897699623193542549935623373656021173400812096660408265660428190707740194627521887231277265714580183676839834206986781235312765075220315950810958811507502280227588815441578477215291988534906157760976397769689888907215150855840434702583111602520999318134940603246969350823443276228221841309609603461799754824116277675568900353181300725440703667660602245837574324610290490844383628811548288261887809415643569655985365531456192407526391687177813
  public exponent: 65537
  Validity: [From: Wed Jul 07 18:05:00 WEST 1999,
               To: Sun Jul 07 00:59:59 WEST 2019]
  Issuer: CN=Class 2 Primary CA, O=Certplus, C=FR
  SerialNumber: [    85bd4bf3 d8dae369 f694d75f c3a54423]

Certificate Extensions: 5
[1]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:10
]

[2]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
  [DistributionPoint:
     [URIName: http://www.certplus.com/CRL/class2.crl]
]]

[3]: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
  Key_CertSign
  Crl_Sign
]

[4]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
NetscapeCertType [
   SSL CA
   S/MIME CA
]

[5]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: E3 73 2D DF CB 0E 28 0C   DE DD B3 A4 CA 79 B8 8E  .s-...(......y..
0010: BB E8 30 89                                        ..0.
]
]

]
  Algorithm: [SHA1withRSA]
  Signature:
0000: A7 54 CF 88 44 19 CB DF   D4 7F 00 DF 56 33 62 B5  .T..D.......V3b.
0010: F7 51 01 90 EB C3 3F D1   88 44 E9 24 5D EF E7 14  .Q....?..D.$]...
0020: BD 20 B7 9A 3C 00 FE 6D   9F DB 90 DC D7 F4 62 D6  . ..<..m......b.
0030: 8B 70 5D E7 E5 04 48 A9   68 7C C9 F1 42 F3 6C 7F  .p]...H.h...B.l.
0040: C5 7A 7C 1D 51 88 BA D2   0A 3E 27 5D DE 2D 51 4E  .z..Q....>'].-QN
0050: D3 13 64 69 E4 2E E3 D3   E7 9B 09 99 A6 E0 95 9B  ..di............
0060: CE 1A D7 7F BE 3C CE 52   B3 11 15 C1 0F 17 CD 03  .....<.R........
0070: BB 9C 25 15 BA A2 76 89   FC 06 F1 18 D0 93 4B 0E  ..%...v.......K.
0080: 7C 82 B7 A5 F4 F6 5F FE   ED 40 A6 9D 84 74 39 B9  ......_..@...t9.
0090: DC 1E 85 16 DA 29 1B 86   23 00 C9 BB 89 7E 6E 80  .....)..#.....n.
00A0: 88 1E 2F 14 B4 03 24 A8   32 6F 03 9A 47 2C 30 BE  ../...$.2o..G,0.
00B0: 56 C6 A7 42 02 70 1B EA   40 D8 BA 05 03 70 07 A4  V..B.p..@....p..
00C0: 96 FF FD 48 33 0A E1 DC   A5 81 90 9B 4D DD 7D E7  ...H3.......M...
00D0: E7 B2 CD 5C C8 6A 95 F8   A5 F6 8D C4 5D 78 08 BE  ...\.j......]x..
00E0: 7B 06 D6 49 CF 19 36 50   23 2E 08 E6 9E 05 4D 47  ...I..6P#.....MG
00F0: 18 D5 16 E9 B1 D6 B6 10   D5 BB 97 BF A2 8E B4 54  ...............T

]]]

[2019-11-05T10:27:14.945+0000] [glassfish 4.1] [SEVERE] [] [global] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1572949612514] [timeMillis: 1572949634945] [levelValue: 1000] [[
  Class [ javax/cache/configuration/Configuration ] not found. Error while loading [ class org.apache.cxf.jaxrs.client.cache.CacheControlFeature ]]]

[2019-11-05T10:27:22.137+0000] [glassfish 4.1] [SEVERE] [NCLS-SECURITY-05054] [javax.enterprise.system.security.ssl] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1572949612514] [timeMillis: 1572949642137] [levelValue: 1000] [[
  The SSL certificate has expired: [
[
  Version: V3
  Subject: CN=Class 2 Primary CA, O=Certplus, C=FR
  Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

  Key:  Sun RSA public key, 2048 bits
  modulus: 27812167065015388823464546085051838038637984524955446961713677446129738317206823109084046347331445589553661044970567054378890434198997684264035427965612348371450712507326051325897699623193542549935623373656021173400812096660408265660428190707740194627521887231277265714580183676839834206986781235312765075220315950810958811507502280227588815441578477215291988534906157760976397769689888907215150855840434702583111602520999318134940603246969350823443276228221841309609603461799754824116277675568900353181300725440703667660602245837574324610290490844383628811548288261887809415643569655985365531456192407526391687177813
  public exponent: 65537
  Validity: [From: Wed Jul 07 18:05:00 WEST 1999,
               To: Sun Jul 07 00:59:59 WEST 2019]
  Issuer: CN=Class 2 Primary CA, O=Certplus, C=FR
  SerialNumber: [    85bd4bf3 d8dae369 f694d75f c3a54423]

Certificate Extensions: 5
[1]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:10
]


[2019-11-05T10:28:21.596+0000] [glassfish 4.1] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=45 _ThreadName=admin-listener(5)] [timeMillis: 1572949701596] [levelValue: 1000] [[
  javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
restRequest: endpoint=https://localhost:4848/management/domain/anonymous-user-enabled
attrs={}
method=GET]]

Philip Durbin

unread,
Nov 5, 2019, 9:20:54 AM11/5/19
to dataverse...@googlegroups.com
Hi Adilia,

I'm probably the worst person to try to help because I almost never use the Glassfish web admin interface and manage everything using `asadmin` or by editing domain.xml but I did just try going to http://localhost:4848 on my laptop and it "just worked" (screenshot attached). So I can't reproduce the problem. :(

I would say you should go ahead and create an issue at https://github.com/IQSS/dataverse/issues

How did you install Dataverse? By hand? Using dataverse-ansible? Some other way?

Thanks,

Phil


--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/84d81675-67d1-4104-89d8-323548b81a7f%40googlegroups.com.


--
Screen Shot 2019-11-05 at 9.16.41 AM.png

James Myers

unread,
Nov 5, 2019, 9:50:10 AM11/5/19
to dataverse...@googlegroups.com

FWIW – I think the initial errors like  ‘Exception while visiting module-info.class’ are normal/harmless. My guess is that the problem with expired certificates/certificate validation farther down is the real problem.

-- Jim

Adilia Alves

unread,
Nov 6, 2019, 12:49:33 PM11/6/19
to dataverse...@googlegroups.com
Hello Philip.
Thank you for your help.
I installed Dataverse using the tutorial shown on URL http://guides.dataverse.org/en/latest/installation/prerequisites.html

Thank you.

Adilia Alves

unread,
Nov 6, 2019, 12:53:35 PM11/6/19
to dataverse...@googlegroups.com
Hello James.
I saw up to 200 certificates on cacerts.jks file when I use the following command
keytool -list -v -keystore /usr/local/glassfish4/glassfish/domains/domain1/config/cacerts.jks
I removed all of them. Tomorrow I will install a SSL cert on glassfish, then I will tell you if I solve my problem.
Thank you very much for your precious help.

Adília Alves

Philip Durbin

unread,
Nov 6, 2019, 1:42:36 PM11/6/19
to dataverse...@googlegroups.com
Thanks. I very rarely follow those manual installation steps myself now that Don Sizemore and created the "dataverse-ansible" project.

Fairly recently I added a quickstart: https://github.com/IQSS/dataverse-ansible#quickstart

Also, we use dataverse-ansible to install Dataverse as part of our new automated testing system (also created by Don Sizemore) at https://jenkins.dataverse.org

I'm not saying that there's anything wrong with the manual way. It should work just fine. But you might want to try dataverse-ansible on a test server to see if you like it and if it solves your problem.

Thanks,

Phil

Adilia Alves

unread,
Nov 7, 2019, 6:38:13 AM11/7/19
to dataverse...@googlegroups.com
Thank you Philip for your precious help.

I will try dataverse-ansible on a test server but I need to correct the version I just installed.
Keep looking for a solution.
Thank You.
Adília

Philip Durbin

unread,
Nov 7, 2019, 7:05:14 AM11/7/19
to dataverse...@googlegroups.com
Every once in a while, pretty rarely actually, Glassfish running on my laptop gets in such an odd state that I stop it, install a fresh copy (by unzipping Glassfish), and then install Dataverse. Is this a possibility for you? A bunch of sysadmins hang out in http://chat.dataverse.org and might be able to offer additional advice in real time if you'd like to join in. Here's a list of who's who in that chat room: https://docs.google.com/spreadsheets/d/16h3jv24usMGq18495C-JA-yNcQCKiKDa65MTraNDd7k/edit?usp=sharing

Adilia Alves

unread,
Nov 7, 2019, 11:14:06 AM11/7/19
to dataverse...@googlegroups.com
Hello Philip.

Finally I solved the problems previously reported. It was a SSL certification problem.

I report here my solution. It can help someone else.
I removed all SSL certificates.
with the command:
keytool -delete -alias keyAlias -keystore /usr/local/glassfish4/glassfish/domains/domain1/config/cacerts.jks -storepass password

I generated a new certificate using keytool procedure:

keytool -genkey -alias keyAlias  -keyalg RSA -keypass changeit -storepass changeit -keystore keystore.jks
A prompt appeared that asked for your name, organization and other information.

Than I exported the generated certificate to the server.cer file, using the following commands:

keytool -export -alias keyAlias -storepass changeit -file server.cer -keystore keystore.jks

keytool -import -v -trustcacerts -alias keyAlias -file server.cer -keystore cacerts.jks -keypass changeit

asadmin enable-secure-admin --adminalias=keyAlias --instancealias keyAlias
and finally

asadmin restart-domain domain1

Thank you for your precious help.






Philip Durbin

unread,
Nov 7, 2019, 11:47:27 AM11/7/19
to dataverse...@googlegroups.com
I'm so glad you figured it out! Dealing with certificates in Glassfish is kind of a nightmare. Good job! :)

Reply all
Reply to author
Forward
0 new messages