Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003193 [Resin] block always 12-22-08 11:05 03-18-09 10:40
Reporter sibyj View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.0 Product Version 3.1.9
  Product Build
Summary 0003193: Can't compile JNI support with Resin 3.2.1
Description I'm trying to run Resin under as a non-root user but it complains that JNI support has not been compiled. I'm running Resin 3.2.1 on a 64 bit machine with 64bit jvm and Red Hat Enterprise Linux Server release 5.2

I get the following error on start:

Dec 22, 2008 2:03:56 PM com.caucho.boot.WatchdogProcess createProcess
WARNING: java.io.IOException: Can't use JNI to listen to port '0.0.0.0:80' because JNI support has not been compiled.
  On Unix, run ./configure; make; make install. On Windows, check for resin.dll.
java.io.IOException: Can't use JNI to listen to port '0.0.0.0:80' because JNI support has not been compiled.
  On Unix, run ./configure; make; make install. On Windows, check for resin.dll.
        at com.caucho.vfs.JniServerSocketImpl.create(JniServerSocketImpl.java:91)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.caucho.vfs.QJniServerSocket.createJNI(QJniServerSocket.java:135)
        at com.caucho.server.port.Port.bindForWatchdog(Port.java:1124)
        at com.caucho.boot.WatchdogProcess.createProcess(WatchdogProcess.java:550)
        at com.caucho.boot.WatchdogProcess.run(WatchdogProcess.java:102)
        at com.caucho.boot.WatchdogTask.run(WatchdogTask.java:115)
        at java.lang.Thread.run(Thread.java:619)

Steps To Reproduce
Additional Information It seems to find everything on configure:
> ./configure --enable-ssl --enable-64bit --enable-jni
checking if Java is 64-bit... yes
checking for JNI in /usr/java/include/linux ... found
Using JVMTI for class reloading
Using openssl include in ... /usr/include
Using openssl lib in ... /usr/lib64
Using openssl libraries in ... -lssl -lcrypto

Running make produces:
cd modules/c/src; make)
make[1]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src'
for dir in common resin_os resin resinssl resin_os; do (cd $dir; make); done
make[2]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src/common'
gcc -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI stream.c
stream.c: In function â??select_hostâ??:
stream.c:1292: warning: cast from pointer to integer of different size
gcc -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI config.c
gcc -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI memory.c
/usr/bin/ld -m elf_x86_64 -r -o common.o stream.o config.o memory.o
/usr/local/resin/libtool --silent --mode=compile gcc -o stream.lo -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI stream.c
stream.c: In function â??select_hostâ??:
stream.c:1292: warning: cast from pointer to integer of different size
/usr/local/resin/libtool --silent --mode=compile gcc -o config.lo -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI config.c
/usr/local/resin/libtool --silent --mode=compile gcc -o memory.lo -c -I/usr/include -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI memory.c
make[2]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src/common'
make[2]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin_os'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -m64 -fPIC -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -c -o jni_os.o jni_os.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -m64 -fPIC -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -c -o jni_socket.o jni_socket.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -m64 -fPIC -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -c -o memory.o memory.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -m64 -fPIC -D_FILE_OFFSET_BITS=64 -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -c -o std.o std.c
/usr/bin/ld -m elf_x86_64 -shared -fPIC -L/usr/lib64 -o libresin_os.so boot.o java.o jni_os.o jni_jvmti.o jni_jvmdi.o jni_socket.o memory.o std.o -lpthread -lc
make[2]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin_os'
make[2]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -c -o jni_vfs.o jni_vfs.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -c -o profile.o profile.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -c -o heap.o heap.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -c -o lru.o lru.c
lru.c: In function â??profile_hash_codeâ??:
lru.c:85: warning: cast from pointer to integer of different size
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -c -o symbol.o symbol.c
/usr/bin/ld -m elf_x86_64 -shared -fPIC -L/usr/lib64 -o libresin.so ../resin_os/std.o ../resin_os/memory.o ../resin_os/java.o jni_vfs.o profile.o heap.o lru.o symbol.o crc64.o -lpthread -lc
make[2]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin'
make[2]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src/resinssl'
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -I../resin -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -DSSL_ENGINE -c -o ssl.o ssl.c
gcc -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DB64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -fPIC -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DRESIN_HOME=\"/usr/local/resin\" -I/usr/include -I/usr/java/include -I/usr/java/include/linux -I../common -I../resin -DCPU=\"x86_64\" -DOS= -m64 -fPIC -D_FILE_OFFSET_BITS=64 -fpic -DSSL_ENGINE -c -o ../resin_os/java.o ../resin_os/java.c
/usr/bin/ld -m elf_x86_64 -shared -fPIC -L/usr/lib64 -o libresinssl.so ssl.o ../resin_os/memory.o ../resin_os/std.o ../resin_os/java.o -lpthread -lc -lssl -lcrypto
make[2]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src/resinssl'
make[2]: Entering directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin_os'
/usr/bin/ld -m elf_x86_64 -shared -fPIC -L/usr/lib64 -o libresin_os.so boot.o java.o jni_os.o jni_jvmti.o jni_jvmdi.o jni_socket.o memory.o std.o -lpthread -lc
make[2]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src/resin_os'
make[1]: Leaving directory `/usr/local/resin-pro-3.2.1/modules/c/src'

I'm passing the 64 bit flag to the jvm from resin.xml:
<jvm-arg>-d64</jvm-arg>


Attached Files

- Relationships

- Notes
(0003829)
emil
02-17-09 10:11

Please verify that you have run "make install". If the .so libraries are in $RESIN/libexec and it still gives the same message, try setting LD_LIBRARY_PATH explicitly to when starting Resin and make sure that your license is in $RESIN/licenses.
 
(0003887)
ferg
03-18-09 10:40

Cleaned up error messages for JNI loading and binding in 4.0.
 

- Issue History
Date Modified Username Field Change
12-22-08 11:05 sibyj New Issue
02-17-09 10:11 emil Note Added: 0003829
03-18-09 10:40 ferg Note Added: 0003887
03-18-09 10:40 ferg Assigned To  => ferg
03-18-09 10:40 ferg Status new => closed
03-18-09 10:40 ferg Resolution open => fixed
03-18-09 10:40 ferg Fixed in Version  => 4.0.0


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