Hi Rajan,
My guess is that this is a bug or mis-config in your Java environment.
The voms-proxy-init bash shell script builds its java classpath
dynamically using this "build-classpath" utility, and it's obviously
doing it badly.
This is done for portability reasons. It's meant to be a "good thing",
but it's obviously flaky in your case.
I don't know much about build-classpath, but you can test it standalone
with (say) two random jars like this:
# build-classpath canl-java bcprov
It will build for you a classpath to those two jars (java library
files), e.g. "/usr/share/java/canl-java/canl.jar:/usr/share/java/bcprov.jar"
If this does not work on your system, that is the start of your
problem. Tracing Java environment problems is a serious undertaking.
I would advise to start by setting the system back to scratch, if you
have been "mucking about" with the Java installed on it. Java becomes
messy if you start tweaking by hand - very messy.
So I'll tell you about my environment, and you can compare...
[root@r26-n20 ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@r26-n20 ~]# java -version
java version "1.7.0_161"
OpenJDK Runtime Environment (rhel-2.6.12.0.el7_4-x86_64 u161-b00)
OpenJDK 64-Bit Server VM (build 24.161-b00, mixed mode)
[root@r26-n20 ~]# rpm -qa | grep -i java
javapackages-tools-3.4.1-11.el7.noarch
java-1.7.0-openjdk-headless-1.7.0.161-2.6.12.0.el7_4.x86_64
voms-clients-java-3.0.7-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
canl-java-2.1.2-1.el7.noarch
tzdata-java-2018c-1.el7.noarch
java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el7_4.x86_64
voms-api-java-3.1.0-1.el7.noarch
[root@r26-n20 ~]# rpm -qa | grep ^voms
voms-2.0.14-1.el7.x86_64
voms-devel-2.0.14-1.el7.x86_64
voms-clients-java-3.0.7-1.el7.noarch
voms-clients-cpp-2.0.14-1.el7.x86_64
voms-api-java-3.1.0-1.el7.noarch
Cheers,
Ste
On 20/02/18 15:03, Rajan Atthi wrote:
>
> Hi Stephen,
>
> Was wondering if you could help further.
>
> When I do an 'ls' on those jar files you mentioned they appear.
>
> When I also run the full " java -XX:+UseSerialGC -Xmx16m -cp
>
> /usr/share/java/voms-clients-java/voms-clients.jar:/usr/share/java/voms-api-java/voms-api-java.jar:/usr/share/java/canl-java/canl.jar:/usr/share/java/bcpkix.jar:/usr/share/java/bcprov.jar:/usr/share/java/commons-cli.jar:/usr/share/java/commons-io.jar
>
> org.italiangrid.voms.clients.VomsProxyInit"
>
> it works and I am prompted to enter GRID pass phrase and it works.
>
> When I run voms-proxy-init it still shows the same error. Doing some
> more digging around and I get this output
>
> Not sure if this helps much but, if you know what its going on/can
> help please let me know.
>
> Thanks
>
> Rajan
>
> -----Original Message-----
> From: Testbed Support for GridPP member institutes
> [mailto:[log in to unmask]] On Behalf Of Rajan Atthi
> Sent: 7 February, 2018 4:15 PM
> To: [log in to unmask]
> Subject: Re: SL7 UI Machine
>
> Hi Ste,
>
> Thanks for this information I am currently working on this with
> Catalin here at RAL and will let you know how I get on.
>
> Thanks again
>
> Rajan
>
> -----Original Message-----
>
> From: Testbed Support for GridPP member institutes
> [mailto:[log in to unmask]] On Behalf Of Stephen Jones
>
> Sent: 5 February, 2018 3:18 PM
>
> To: [log in to unmask] <mailto:[log in to unmask]>
>
> Subject: Re: SL7 UI Machine
>
> Hi Rajan,
>
> I don't know how much you know about Java, so I'll tell you this
>
> about"Error: Could not find or load main class error:"
>
> It occurs in the following circumstances ... The voms-proxy-init
> command on a Centos7 machine is a Java program (the voms-proxy-init is
> actually only a sh script, see below.)
>
> That error comes from the java command when it fails to find the main
> class of the application (every java app has a main, like C, but you
> often need to specify it explicitly. Don't blame me for that!)
>
> Anyway, the system is saying that the classpath (-cp) where it looks
> for its classes does not contain that main class (which BTW is called
>
> org.italiangrid.voms.clients.VomsProxyInit)
>
> There are many reasons why a specific classpath might not contain the
> main. It could be a release bug, an installation fault or a missing
> dependency etc.
>
> I'd have to duplicate your set-up for find out. But here are some tips
> that might lead you to the answer. Here is the actual java command as
> it gets run on my Centos7/UMD4 build (it works, for me, on a
> worker-node, BTW).
>
> java -XX:+UseSerialGC -Xmx16m -cp
>
> /usr/share/java/voms-clients-java/voms-clients.jar:/usr/share/java/voms-api-java/voms-api-java.jar:/usr/share/java/canl-java/canl.jar:/usr/share/java/bcpkix.jar:/usr/share/java/bcprov.jar:/usr/share/java/commons-cli.jar:/usr/share/java/commons-io.jar
>
> org.italiangrid.voms.clients.VomsProxyInit
>
> The first options are just technical and relate to the Virtual Machine.
>
> Looking at everything to the right of the -cp flag, but before the
> main class definition (org.italiangrid.voms.clients.VomsProxyInit)...
>
> All those "jar" files have to be present; if not, that's your problem.
>
> If they are, then it's something even more fishy.
>
> # ls -lrt /usr/share/java/voms-clients-java/voms-clients.jar
>
> /usr/share/java/voms-api-java/voms-api-java.jar
>
> /usr/share/java/canl-java/canl.jar /usr/share/java/bcpkix.jar
> /usr/share/java/bcprov.jar /usr/share/java/commons-cli.jar
> /usr/share/java/commons-io.jar
>
> -rw-r--r-- 1 root root 4043246 Feb 20 2014 /usr/share/java/bcprov.jar
>
> -rw-r--r-- 1 root root 687341 Mar 7 2014 /usr/share/java/bcpkix.jar
>
> -rw-r--r-- 1 root root 40849 Jun 9 2014 /usr/share/java/commons-cli.jar
>
> -rw-r--r-- 1 root root 184977 Jun 10 2014 /usr/share/java/commons-io.jar
>
> -rw-r--r-- 1 root root 305847 Feb 13 2016
> /usr/share/java/canl-java/canl.jar
>
> -rw-r--r-- 1 root root 151570 Feb 14 2016
> /usr/share/java/voms-api-java/voms-api-java.jar
>
> -rw-r--r-- 1 root root 85641 Sep 11 2016
> /usr/share/java/voms-clients-java/voms-clients.jar
>
> Cheers,
>
> Ste
>
> ---- voms-proxy-init is a sh script.
>
> cat /usr/bin/voms-proxy-init
>
> #!/bin/sh
>
> VOMS_CLIENTS_JAVA_OPTIONS=${VOMS_CLIENTS_JAVA_OPTIONS:-"-XX:+UseSerialGC
>
> -Xmx16m"}
>
> java $VOMS_CLIENTS_JAVA_OPTIONS -cp $(build-classpath
> voms-clients-java voms-api-java canl-java bcpkix bcprov commons-cli
> commons-io) org.italiangrid.voms.clients.VomsProxyInit "$@"
>
> On 05/02/18 10:49, Rajan Atthi wrote:
>
> >
>
> > Hi,
>
> >
>
> > I am working with the Tier-1 here at RAL for 3 months working on IPV6
>
> > deployment.
>
> >
>
> > I am trying to set up a SL7 Dual stack UI Machine and am encountering
>
> > some problems.
>
> >
>
> > I have installed the ui (for centos7) metapackages.:
>
> >
>
> > http://repository.egi.eu/sw/production/umd/4/centos7/x86_64/updates/ui
>
> > -4.0.3-1.el7.x86_64.rpm
>
> >
>
> > I have followed these instructions
>
> > athttp://repository.egi.eu/category/umd_releases/distribution/umd-4/
>
> >
>
> > When I do a voms-proxy-init it comes with the following message
>
> > "Error: Could not find or load main class error:"
>
> >
>
> > I have the certificate installed. When I do the same on an sl6 machine.
>
> >
>
> > This is the first thing I have tried and I am not sure if I need to
>
> > install other packages.
>
> >
>
> > Am I missing something or do I need to do anything else before this
>
> > can work.
>
> >
>
> > Thanks
>
> >
>
> > Rajan Atthi
>
> >
>
> --
>
> Steve Jones [log in to unmask] <mailto:[log in to unmask]>
>
> Grid System Administrator office: 220
>
> High Energy Physics Division tel (int): 43396
>
> Oliver Lodge Laboratory tel (ext): +44 (0)151 794 3396
>
> University of Liverpool http://www.liv.ac.uk/physics/hep/
>
--
Steve Jones [log in to unmask]
Grid System Administrator office: 220
High Energy Physics Division tel (int): 43396
Oliver Lodge Laboratory tel (ext): +44 (0)151 794 3396
University of Liverpool http://www.liv.ac.uk/physics/hep/
|