SPEC Community

Product Support => SPECvirt_sc2013 => Topic started by: bcarson on September 10, 2015, 02:51:05 PM

Title: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 10, 2015, 02:51:05 PM
I've downloaded glassfish-3.1.2.2.zip but when I uncompress the files it shows /glassfish3/glassfish/domains/domain1/ but the appvm_scripts seem to be looking for the domain spec2004-1?

Thanks,
-Bruce
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 10, 2015, 03:46:47 PM
Hey Bruce,

The spec2004-1 domain is not a part of the Glassfish distribution, but is a domain created for the benchmark. 

It is built as a part of the script buildappsrv.sh script that is kicked off by setup_files.sh.  If you don't have a spec2004-1 domain in place once the script completes then there is probably an error occurring somewhere that is preventing the domain from being properly built.  That script really just kicks off a series of other scripts.  So you might try running each script manually in the same sequence and see if there are errors occurring in any of the scripts.  If you see errors you could post that output here and we can take a look at it and maybe help identify the problem.

Andy
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 11, 2015, 11:49:42 AM
From buildappsrv.sh I've been executing the scripts one by one and I always seem to get to a point where it prompts for Enter admin password for user "admin">
When I cat the passwordfile it shows
AS_ADMIN_PASSWORD=javaperf
AS_ADMIN_PASSWORD=javaperf
AS_ADMIN_MASTERPASSWORD=javaperf
AS_ADMIN_ALIASPASSWORD=javaperf

but this password doesn't seem to work for admin. Is there a default admin password that will get me past this prompt or does this indicate another issue?

Thanks,
-Bruce
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 11, 2015, 12:19:29 PM
Hey Bruce,

The default password for the domain is changeit.  The need to run setup_files.sh interactively and change the password is covered in section 3.4 of the ExampleVM Setup Guide. 

The script that actually does the password change and should prompt you is appvm_scripts/files/Glassfish312_SPECjApp_BuildScripts/glassfish_createdomain.sh

Once the password is changed to javaperf, all the other scripts will pick up the passwords from the passwordfile you referenced.  You will see that file passed in as a parameter to all the glassfish commands being executed.

Andy
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 11, 2015, 05:18:22 PM
I'm refreshing all my AppServer files (Appvm_scripts, Glassfish3, SPECjAppServer2004) and starting clean. When I run ./setup_files.sh the first time I get:
[root@specvirt-app appvm_scripts]# ./setup_files.sh
/bin/java
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
SPECvirt_sc2013 v1.00, build: 79
./setup_files.sh: line 48: ./buildappsrv.sh: Permission denied
cp: cannot stat ‘/opt/glassfish3/glassfish/domains/spec2004-1/autodeploy/SPECjAppServer.ear’: No such file or directory
./setup_files.sh: line 52: SPECjAppServer.ear: command not found
sum: /opt/glassfish3/glassfish/domains/spec2004-1/autodeploy/SPECjAppServer.ear: No such file or directory
05188  1562
23127    53
31636    54
./setup_files.sh: line 61: cd: /opt/glassfish3/glassfish/domains/spec2004-1/config: No such file or directory
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 11, 2015, 06:31:12 PM
Bruce,

Is this the 1.00 version or did you grab the newer 1.01 version of the ExampleVM scripts that are available from this forum in the top sticky post?  Note that this is not referring to the version of the licensed SPECvirt_sc2013 kit itself which is still at 1.00, but instead the version of the ExampleVM scripts.

The permission denied on buildappsrv.sh is obviously the real issue for your last attempt.  The other errors from setup_files.sh are caused by the domain not being built.  If you still get the permission denied error, I would just run chmod 775 on all the script files in the Glassfish312_SPECjApp_BuildScripts directory to make sure they are all executable.  You seem to be running the scripts as root, so user permissions shouldn't be a problem.

Andy


Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 14, 2015, 01:07:20 PM
This is from automation 1.0.1 ---
I added execute permissions to /opt/SPECjAppServer2004/bin/buildappsrv.sh (previously I had added execute to /opt/appvm_scripts/files/Glassfish312_SPECjApp_BuildScripts/buildappsrv.sh which apparently wasn't the correct one). Everything seems to have installed correctly as I can now hit all these test URLs from the DBServer:
curl http://specdelivery:8000/SPECjAppServer/app?action=atomicityTests PASSED
curl http://specemulator:8080/Emulator/EmulatorServlet?cmd=switchlog 200 OK
curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog 200 OK

However I do see this at the end of the execution output:
cp: cannot stat ‘/opt/glassfish3/glassfish/domains/spec2004-1/autodeploy/SPECjAppServer.ear’: No such file or directory
./setup_files.sh: line 52: SPECjAppServer.ear: command not found

sum: /opt/glassfish3/glassfish/domains/spec2004-1/autodeploy/SPECjAppServer.ear: No such file or directory

I confirmed that there isn't a file SPECjAppServer.ear in the folder /spec2004-1/autodeploy/

Should I copy it from here /opt/SPECjAppServer2004/jars/SPECjAppServer.ear and rerun ./setup_files.sh ?
 
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 14, 2015, 01:17:02 PM
Update:

Now I see that SPECjAppServer.ear was installed here:
/opt/glassfish3/glassfish/domains/spec2004-1/applications/__internal/SPECjAppServer/SPECjAppServer.ear

Does that mean it was successful or does the original not found message indicate an actual problem?
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 14, 2015, 02:00:07 PM
Hey Bruce,

Glad to see that you now have a spec2004-1 domain.  That's good progress.  Did you end up running setup_files.sh or did you do the build steps manually?  If you did them manually, did you run through them all and were they all successful? 

You should see a SPECjAppServer.ear file under spec2004-1/autodeploy.  If it's not there then all the build steps may not have run completely.. 

If you suspect that it might be working, you can use the steps in section 6.1 of the ExampleVM Users Guide to test out the appserver using the atomicity tests.

Andy
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 14, 2015, 02:18:30 PM
For this new clean config I executed ./setup_files.sh

The result is that I can now hit all these test URLs from the DBServer:
curl http://specdelivery:8000/SPECjAppServer/app?action=atomicityTests PASSED
curl http://specemulator:8080/Emulator/EmulatorServlet?cmd=switchlog 200 OK
curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog 200 OK

What does the file SPECjAppServer.ear do? If the 3 checks above work how do I troubleshoot the missing SPECjAppServer.ear?
Should I copy SPECjAppServer.ear to the folder /autodeploy/ and rerun the ./setup_files.sh ?
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 14, 2015, 03:25:48 PM
You do not need to run setup_files.sh again. 

Good to hear that the atomicity tests passed as well as the switchlogs.  You should be ready to run if those tests pass.

If you want to make sure the working environment continues to work after a reboot then:

cd /opt/SPECjAppServer2004/bin
./appsrv-ctrl.sh stop
./tomcat-ctrl.sh stop
* reboot the VM *

Log back into the VM and:
cd /opt/SPECjAppServer2004/bin
./appsrv-ctrl.sh start
./tomcat-ctrl.sh start

then see if those atomicity tests are still working.

Andy
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 28, 2015, 01:25:26 PM
My 3 curl tests stopped working so I'm trying to stop and start AppSrv & Tomcat and I think my configuration of Tomcat is causing at least some of my AppServer issues.

When I attempt to start Tomcat (from /opt/SPECjAppServer2004/bin) I get Tomcat started:
[root@specvirt-app bin]# ./tomcat-ctrl.sh start
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-openjdk
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.

But when I attempt to stop Tomcat I get an error which makes me think the start isn’t really working either:
[root@specvirt-app bin]# ./tomcat-ctrl.sh stop
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-openjdk
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
/opt/tomcat/bin/catalina.sh: line 437: /usr/lib/jvm/java-openjdk/bin/java: No such file or directory

That path definitely doesn’t exist but not sure what it needs to be set to?
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 28, 2015, 03:15:51 PM
Hey Bruce,

It looks like the Tomcat script is looking for OpenJDK based on the path and the value of JRE_HOME that is displayed.  Based on your prior post I see that you have HotSpot installed.  You will need to modify the paths to correctly point to the location of bin/java for HotSpot.

Thanks,
Andy

Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 28, 2015, 05:03:41 PM
When I rebuilt the AppServer last week I installed the JDK using yum install (instead of my RPM which was a HotSpot) but obviously something is pathed incorrectly?
[root@specvirt-app bin]# java -version
java version "1.7.0_85"
OpenJDK Runtime Environment (rhel-2.6.1.2.el7_1-x86_64 u85-b01)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 28, 2015, 05:16:34 PM
Did you make sure to install the java-1.7.0-openjdk-devel package as well which gives you a JDK instead of just a JRE?  Check and see what is installed in the /usr/lib/jvm directory.
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on September 29, 2015, 12:51:22 PM
I was missing the java-1.7.0-openjdk-devel package! Thanks for that. However 2 of the 3 curl tests are still failing:

curl http://specdelivery:8000/SPECjAppServer/app?action=atomicityTests FAILED
curl http://specemulator:8080/Emulator/EmulatorServlet?cmd=switchlog 200 OK
curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog FAILED

These are the services that I have started on the AppServer according to nmap:
Starting Nmap 6.40 ( http://nmap.org ) at 2015-09-29 09:44 MST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000054s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 992 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
4848/tcp open  appserv-http
7676/tcp open  imqbrokerd
8000/tcp open  http-alt
8009/tcp open  ajp13
8080/tcp open  http-proxy
8181/tcp open  unknown
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.9
Network Distance: 0 hops

Are there any other required services I should be seeing here?
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: abond on September 29, 2015, 03:17:43 PM
To get an idea about what those various tests are telling you take a look at the SPECvirt_sc2013 Technical Support Document on the SPEC website.  The descriptions are in the Appserver/Dbserver section.

https://www.spec.org/virt_sc2013/docs/SPECvirt_TechnicalSupport.html#Appserver

It appears that your emulator is working which you just fixed, but your appserver is not working or available and neither is your database.  Did you start your glassfish domain?  Check whether your database is up and accepting connections and then whether the jdbc .jar file on the appserver is correctly referenced.

Andy
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on November 02, 2015, 06:28:54 PM
The database is accepting connections when I execute:
psql -h specdb -U spec -d postgres

However I still get failures when executing:
curl http://specdelivery:8000/SPECjAppServer/app?action=atomicityTests
curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog


But when I hit http://specdelivery:8000/ it returns
GlassFish Server 3.1.2
Your server is now running

Where do I verify my JDBC.jar configuration? And how else should I isolate my specdelivery failures?

Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: lroderic on November 03, 2015, 12:36:56 AM
On appserver, check that domain.xml contains the correct location of the JDBC jar file. The JDBC jar file can reside anywhere but is probably at /opt or /opt/glassfish3/glassfish/lib.

   grep postgresql- /opt/glassfish3/glassfish/domains/spec2004-1/config/domain.xml

Make sure these locations match. If they don't, copy the JDBC file to where the domain.xml expects to find it, restart jApp and tomcat, then retry the curl commands.

Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on November 03, 2015, 01:05:45 PM
The file postgresql-9.2-1004.jdbc4.jar is at the path you specified /opt/glassfish3/glassfish/lib however, I don't see any reference to it at /opt/glassfish3/glassfish/domains/spec2004-1/config/domain.xml
(see attached domain.xml)
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: lroderic on November 03, 2015, 01:12:21 PM
Please go onto the appserver:

  cp /opt/appvm_scripts/files/domain.xml /opt/glassfish3/glassfish/domains/spec2004-1/config

Then restart jApp and tomcat and retry the curl commands.
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on November 03, 2015, 01:35:36 PM
OK, I copied the file and edit to reflect my JDBC file:
<java-config classpath-prefix="/opt/postgresql-9.2-1004.jdbc4.jar" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">

Then I executed:
./appsrv-ctrl.sh stop
./tomcat-ctrl.sh stop
./appsrv-ctrl.sh start
./tomcat-ctrl.sh start

[root@specvirt-db ~]# curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>GlassFish v3 - Error report</title><style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}  B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - </h1><hr/><p><b>type</b> Status report</p><p><b>message</b></p><p><b>description</b>The requested resource () is not available.</p><hr/><h3>GlassFish Server Open Source Edition 3.1.2.2</h3></body></html>
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: lroderic on November 03, 2015, 01:50:27 PM
Do you see any errors in the GlassFish log?

  tail -200 /opt/glassfish3/glassfish/domains/spec2004-1/logs/server.log|more

Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: bcarson on November 03, 2015, 01:57:41 PM
Attached appserver log.
Title: Re: What is the supported version of GlassFish for SpecVIRT?
Post by: AnoopGupta on November 03, 2015, 02:29:15 PM
[1] The following working means the Glassfish server is running:
http://specdelivery:8000/

[2] The following returning 200 OK means the SPECjAppServer.ear deployed on the GlassFish:
curl http://specdelivery:8000/Supplier/DeliveryServlet?cmd=switchlog
Otherwise the application is not deployed. Check for any errors in the GlassFish server log. If you don't see any error, likely application was not deployed. Try deploying the ear again or reconfigure your glassfish domain using the example scripts.

[3] Once deployment works, then verify DB connectivity:
curl http://specdelivery:8000/SPECjAppServer/app?action=atomicityTests
If you get page not found, again it means deployment was not completely successful.
If deployment really went fine, then you will see 3 DB tests results as PASS/FAIL, where FAIL can mean:


In your appserver log I do not see any attempt to deploy the SPECjApPServer.ear. So, you are at [2] above.