Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004828 [Resin] minor always 10-27-11 12:01 12-08-11 14:58
Reporter rickHigh View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0004828: Issues building Resin 4.0.23 on Suse (with workarounds)
Description AMI: sles-11-sp1-v1.00.x86_64 (ami-e4a3578d)
Suse version 11 enterprise.


# wget http://www.caucho.com/download/resin-pro-4.0.23.tar.gz [^]
# tar xvf resin-pro-4.0.23.tar.gz
# ./configure --enable-64bit


checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/resin-pro-4.0.23':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

Don't think this will work, but give it a shot....
# sudo yum groupinstall "Development Tools"

ip-10-245-135-51:~/resin-pro-4.0.23 # sudo yum groupinstall "Development Tools"
sudo: yum: command not found
ip-10-245-135-51:~/resin-pro-4.0.23 # yum groupinstall "Development Tools"
If 'yum' is not a typo you can run the following command to lookup the package that contains the binary:
    command-not-found yum
-bash: yum: command not found

So no yum for Suse. They do use RPMs.

This seems to be the equiv for Suse 10.3 and forward:

# zypper install rpmdevtools gcc gcc-c++ make

This gets me to

checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking for JAVA_HOME...
configure: error: Can't find valid JAVA_HOME

Java does not seem to be on the system. But it should be because the Amazon tools come preinstalled and it needs them. Not sure why no Java.


# zypper install java-1.6.0-openjdk-devel.x86_64
Loading repository data...
Reading installed packages...
'java-1.6.0-openjdk-devel.x86_64' not found.
Resolving package dependencies...

Nothing to do.


Names are different on Suse.

Not sure how to install Java on Suse yet...
The instructions here don't work.
http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html [^]

Additional Information
Attached Files

- Relationships

- Notes
(0005589)
rickHigh
10-27-11 12:20

The instructions for installing Java on Suse with zypper are... well... not so great...


# zypper search | grep java | grep devel
  | java-1_4_2-ibm-devel | IBM(R) Developer Kit for Linux, Java(TM) 2 Technology Edition | package
  | java-1_5_0-gcj-compat-devel | JPackage development scripts for GCJ | package
i | java-1_6_0-ibm-devel | Java(TM) 6 SDK, Standard Edition | package

For now I am using the Java IBM JDK...
# zypper install java-1_6_0-ibm-devel

I think to use the Sun or Oracle 1.6 JDK, I need to setup a new remote repo, not sure which one or where. Might need to know at some point.

http://lilypond.org/blog/janneke/openSUSE-HOWTO [^]


Now to setup IBM
#export JAVA_HOME=/usr/lib64/jvm/jre-1.6.0-ibm
# ./configure --enable-64bit

Now I get the JNI error..

checking if Java is 64-bit... yes
checking if /bin/cp accepts -u... yes
configure: error:

    *** Can't find JNI directory in JAVA_HOME=/usr/lib64/jvm/jre-1.6.0-ibm
    *** JNI is expected in /usr/lib64/jvm/jre-1.6.0-ibm/include/linux
  


IBM installed many packages not just JDK it install JRE. I had it pointed to JRE.

# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-ibm
# ./configure --enable-64bit

Now it works...

Resin Configuration summary:

  RESIN_HOME : /usr/local/resin
      root : /var/www
      conf : /etc/resin
      log : /var/log/resin
      plugins : common resin_os resin resinssl
      init : /etc/init.d/resin
  JAVA_HOME: /usr/lib64/jvm/java-1.6.0-ibm

    + 64-bit JNI in -I/usr/lib64/jvm/java-1.6.0-ibm/include
    + JNI CFLAGS: -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -pthread -fPIC -fno-omit-frame-pointer -O2 -m64 -DHAS_SOCK_TIMEOUT -DHAS_JVMTI
    + epoll() for keepalives
    + not using OpenSSL
 
(0005590)
rickHigh
10-27-11 13:18

Seems we don't work with IBM JDK out of the box for 1.6. We might work if they compile with OpenSSL. Seems we depend on a sun specific file for JSSE.


TE thread start failed for thread 000000000216EE00
sun.security.x509.CertAndKeyGen
[11-10-27 20:12:44.795] {main} java.lang.NoClassDefFoundError: sun.security.x509.CertAndKeyGen
                                   at com.caucho.vfs.SelfSignedCert.create(SelfSignedCert.java:109)
                                   at com.caucho.vfs.JsseSSLFactory.createSelfSignedCert(JsseSSLFactory.java:420)
                                   at com.caucho.vfs.JsseSSLFactory.createAnonymousFactory(JsseSSLFactory.java:376)
                                   at com.caucho.vfs.JsseSSLFactory.create(JsseSSLFactory.java:287)
                                   at com.caucho.network.listen.TcpSocketLinkListener.bind(TcpSocketLinkListener.java:1025)
                                   at com.caucho.cloud.network.NetworkListenSystem.start(NetworkListenSystem.java:218)
                                   at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:515)
                                   at com.caucho.env.service.ResinSystem.start(ResinSystem.java:483)
                                   at com.caucho.server.resin.Resin.start(Resin.java:1033)
                                   at com.caucho.server.resin.Resin.initMain(Resin.java:1169)
                                   at com.caucho.server.resin.Resin.main(Resin.java:1471)
                               Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen
                                   at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)
                                   at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
                                   at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
                                   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
                                   at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
                                   ... 11 more
 
(0005593)
rickHigh
10-27-11 13:43

Look up repos and packages here
http://software.opensuse.org/114/en [^]

Then you use this ar option to install the repo.

See

http://en.opensuse.org/SDB:Zypper_usage_11.3#Repository_management [^]
 
(0005594)
rickHigh
10-27-11 13:59

It did not work with the IBM JDK at all. I tried with just the IBM JDK. Then I tried with the IBM JDK with OpenSSL so it would not use the SUN JDK files. It did not work either way. For now, the IBM JDK is for sure not supported.

I only used it because the OpenJDK was not in the default repo.

# zypper remove java-1_6_0-ibm-devel

I added this repo that has a few things I want (including pico and open JDK).

# zypper ar http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/openSUSE:Tumbleweed.repo [^]

The ar command adds a repository.

You can find the repositories and packages here:
http://software.opensuse.org/114/en [^]

You have to navigate down to the repo file and then user zypper ar on the repo file.



# zypper install java-1_6_0-openjdk-devel
Loading repository data...
Reading installed packages...
'java-1_6_0-openjdk-devel' not found.
Resolving package dependencies...

Nothing to do.
You have mail in /var/mail/root


Thought that would work... more searching... yields this:


# zypper ar http://download.opensuse.org/repositories/openSUSE:/11.4:/Update/standard/openSUSE:11.4:Update.repo [^]
Adding repository 'Official released updates for openSUSE 11.4 (standard)' [done]
Repository 'Official released updates for openSUSE 11.4 (standard)' successfully added
Enabled: Yes
Autorefresh: No
URI: http://download.opensuse.org/repositories/openSUSE:/11.4:/Update/standard/ [^]


Then this:

# zypper install java-1_6_0-openjdk-devel

So now open jdk is installed. I am going to rebuild Resin with it. And reinstall.
 
(0005595)
rickHigh
10-27-11 14:08

To use OpenSSL on SUSE.

# zypper install libopenssl-devel


Then setup JAVA_HOME to point to openjdk

# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-openjdk


Then rebuild Resin to use openssl
# ./configure --enable-64bit --enable-ssl
# make
# make install

Configure fails with

checking if /usr/lib64/jvm/java-1.6.0-openjdk/bin/java is Java 1.6... Error occurred during initialization of VM
Could not reserve enough space for object heap
no
configure: error: Java 1.6 required. /usr/lib64/jvm/java-1.6.0-openjdk/bin/java returned: Could not create the Java virtual machine.

Seems java cannot be started

# java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
 
(0005596)
rickHigh
10-27-11 14:16

The last bit might be a SUSE problem.

http://stackoverflow.com/questions/1058471/java-refuses-to-start-could-not-reserve-enough-space-for-object-heap [^]
 
(0005597)
rickHigh
10-27-11 14:58

In a devop rage, blew away micro instance and created a large instance.

Install the repo:

# zypper ar http://download.opensuse.org/repositories/openSUSE:/11.4:/Update/standard/openSUSE:11.4:Update.repo [^]

Install Java:

# zypper install java-1_6_0-openjdk-devel

Install OpenSSL:

# zypper install libopenssl-devel

Install C compiler and make tools
# zypper install rpmdevtools gcc gcc-c++ make

Setup JAVA_HOME:

# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0-openjdk


Build Resin:

Get Resin:
# wget http://www.caucho.com/download/resin-pro-4.0.23.tar.gz [^] [^]
# tar xvf resin-pro-4.0.23.tar.gz
# cd resin-pro-4.0.23

Build Resin
# ./configure --enable-64bit --enable-ssl
# make
# make install

Configure Resin
Change HTTP and HTTPS ports to 80 and 443.
Add <jvm-arg>-d64</jvm-arg>
# emacs /etc/resin/resin.xml


Start Resin:
# /etc/init.d/resin start

Check log for errors:

# cat /var/log/resin/jvm-default.log

You should see:

[11-10-27 21:52:17.768] {main} http listening to *:80
[11-10-27 21:52:18.399] {main} https listening to *:443
[11-10-27 21:52:18.400] {main}
[11-10-27 21:52:18.400] {main} Resin[id=default] started in 4233ms
 

- Issue History
Date Modified Username Field Change
10-27-11 12:01 rickHigh New Issue
10-27-11 12:20 rickHigh Note Added: 0005589
10-27-11 13:18 rickHigh Note Added: 0005590
10-27-11 13:43 rickHigh Note Added: 0005593
10-27-11 13:59 rickHigh Note Added: 0005594
10-27-11 14:08 rickHigh Note Added: 0005595
10-27-11 14:16 rickHigh Note Added: 0005596
10-27-11 14:58 rickHigh Note Added: 0005597
12-08-11 14:58 ferg Assigned To  => ferg
12-08-11 14:58 ferg Status new => closed
12-08-11 14:58 ferg Resolution open => fixed
12-08-11 14:58 ferg Fixed in Version  => 4.0.24


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
41 total queries executed.
32 unique queries executed.
Powered by Mantis Bugtracker