|
From: Andreas K. <ako...@we...> - 2005-09-30 13:23:05
|
Hi! Im not very experienced with using Java on Linux, so I'd like to hear about your recommendation which Java-JDK I should install for compiling and using php-java-bridge on Linux (2.4). Which one do you think will work best / most stable / fastest on Linux? And which one is most tested with php-java-bridge? Is php-java-bridge still beta-software, or can you recommend its use in production enviroments? Thanks! best regards Andreas |
|
From: Andreas K. <ako...@we...> - 2005-09-30 14:13:12
|
Hi Peter Peter Niederlag schrieb: >I would think this mostly depends on the distribution you are using. The >following information is based on experience with debian-distribution. > > We are using Gentoo here, there is support for sun, ibm, bea, compaq, blackdawn... http://www.gentoo.org/doc/en/java.xml >The blackdown packages have proven to work really reliable here. > >http://www.blackdown.org/java-linux/java2-status/index.html > > Hm, I tried IBM-JDK, since it was used in the example, and I could make the jdk work, but make of php-java-bridge failed: gcc -shared .libs/natcJavaBridge.o -lrt -march=pentium3 -Wl,-soname -Wl,libnatcJavaBridge.so -o .libs/libnatcJavaBridge.so ar cru .libs/libnatcJavaBridge.a natcJavaBridge.o ranlib .libs/libnatcJavaBridge.a creating libnatcJavaBridge.la (cd .libs && rm -f libnatcJavaBridge.la && ln -s ../libnatcJavaBridge.la libnatcJavaBridge.la) if gcc -DHAVE_CONFIG_H -I. -I. -I. -DEXTENSION_DIR="\"/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050617\"" -I/opt/ibm-jdk-bin-1.4.2/include -D_REENTRANT -O2 -march=pentium3 -fomit-frame-pointer -MT RunJavaBridge.o -MD -MP -MF ".deps/RunJavaBridge.Tpo" -c -o RunJavaBridge.o RunJavaBridge.c; \ then mv -f ".deps/RunJavaBridge.Tpo" ".deps/RunJavaBridge.Po"; else rm -f ".deps/RunJavaBridge.Tpo"; exit 1; fi /bin/sh ./libtool --tag=CC --mode=link gcc -O2 -march=pentium3 -fomit-frame-pointer -o RunJavaBridge RunJavaBridge.o -lrt gcc -O2 -march=pentium3 -fomit-frame-pointer -o RunJavaBridge RunJavaBridge.o -lrt /opt/ibm-jdk-bin-1.4.2/bin/javac php/java/bridge/*.java make[1]: *** [JavaBridge.jar] Killed make[1]: Leaving directory `/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/server' make: *** [/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/modules/libnatcJavaBridge.la] Error 2 Hm, and I have no idea what to do. Do you think it's a problem with the JDK, or a specific version? I installed ibm-jdk-bin-1.4.2 (but without any X components...) >It has been running rock-stable here. Jost and his team(?) are really >doing a tremendous job imho. Personally I have used it in development >only yet. > > It really looks very promising - but first of all I have to make it work here. btw.: which "running-mode" do you recommend? We use an Apache with mod_php here - should I run php-java-bridge as service, in the webserver/php? What is the most stable version here? best regards Andreas |
|
From: Peter N. <pe...@ni...> - 2005-09-30 14:28:45
|
Hi Andreas,
Andreas Korthaus schrieb:
> Hi Peter
>
> Peter Niederlag schrieb:
[...]
> Hm, I tried IBM-JDK, since it was used in the example, and I could make
> the jdk work, but make of php-java-bridge failed:
[...]
> make[1]: *** [JavaBridge.jar] Killed
> make[1]: Leaving directory
> `/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/server'
> make: ***
> [/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/modules/libnatcJavaBridge.la]
> Error 2
>
> Hm, and I have no idea what to do. Do you think it's a problem with the
> JDK, or a specific version? I installed ibm-jdk-bin-1.4.2 (but without
> any X components...)
no idea, maybe it#s just compilation of tomcat-servlet failing? That
tripped me already sometimes. ;) (@Jost, wouldn't it make sense to
disable that by default?)
This is my configure without servlet compilation:
---------snipp------------
#! /bin/sh
#
# Created by configure
#'--prefix=/usr/local/php5' \
'./configure' \
'--disable-servlet' \
'--with-java=/usr/lib/j2se/1.4' \
"$@"
>> It has been running rock-stable here. Jost and his team(?) are really
>> doing a tremendous job imho. Personally I have used it in development
>> only yet.
>>
>>
>
> It really looks very promising - but first of all I have to make it work
> here.
>
> btw.: which "running-mode" do you recommend? We use an Apache with
> mod_php here - should I run php-java-bridge as service, in the
> webserver/php?
>
> What is the most stable version here?
I rely on documentation and use a standalone JVM which is connected via
sockets ("Mode 3" iirc)
Have fun,
Peter
--
Peter Niederlag * Neuer Sandberg 9 * 31535 Neustadt *
Fon 05036/924100 * Fax 05036/924105
http://www.niekom.de * TYPO3 und EDV Dienstleistungen *
http://www.clown-goli.de * Clown-Comedy-Jonglage-Animation *
|
|
From: Andreas K. <ako...@we...> - 2005-09-30 15:00:42
|
>>Hm, I tried IBM-JDK, since it was used in the example, and I could make
>>the jdk work, but make of php-java-bridge failed:
>>
>>
>[...]
>
>
>>make[1]: *** [JavaBridge.jar] Killed
>>make[1]: Leaving directory
>>`/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/server'
>>make: ***
>>[/var/tmp/portage/php-java-bridge-2.0.7/work/php-java-bridge-2.0.7/modules/libnatcJavaBridge.la]
>>Error 2
>>
>>
OK, also sun and blackdown fail with the same error:
cc -shared .libs/natcJavaBridge.o -lrt -march=pentium3 -Wl,-soname
-Wl,libnatcJavaBridge.so -o .libs/libnatcJavaBridge.so
ar cru .libs/libnatcJavaBridge.a natcJavaBridge.o
ranlib .libs/libnatcJavaBridge.a
creating libnatcJavaBridge.la
(cd .libs && rm -f libnatcJavaBridge.la && ln -s ../libnatcJavaBridge.la
libnatcJavaBridge.la)
if gcc -DHAVE_CONFIG_H -I. -I. -I.
-DEXTENSION_DIR="\"/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050617\""
-I/opt/sun-jdk-1.4.2.08/include -I/opt/sun-jdk-1.4.2.08/include/linux
-D_REENTRANT -O2 -march=pentium3 -fomit-frame-pointer -MT
RunJavaBridge.o -MD -MP -MF ".deps/RunJavaBridge.Tpo" -c -o
RunJavaBridge.o RunJavaBridge.c; \
then mv -f ".deps/RunJavaBridge.Tpo" ".deps/RunJavaBridge.Po"; else rm
-f ".deps/RunJavaBridge.Tpo"; exit 1; fi
/bin/sh ./libtool --tag=CC --mode=link gcc -O2 -march=pentium3
-fomit-frame-pointer -o RunJavaBridge RunJavaBridge.o -lrt
gcc -O2 -march=pentium3 -fomit-frame-pointer -o RunJavaBridge
RunJavaBridge.o -lrt
/opt/sun-jdk-1.4.2.08/bin/javac php/java/bridge/*.java
make[1]: *** [JavaBridge.jar] Killed
make[1]: Leaving directory
`/var/tmp/portage/php-java-bridge-2.0.8/work/php-java-bridge-2.0.8/server'
make: ***
[/var/tmp/portage/php-java-bridge-2.0.8/work/php-java-bridge-2.0.8/modules/libnatcJavaBridge.la]
Error 2
gcc -shared .libs/natcJavaBridge.o -lrt -march=pentium3 -Wl,-soname
-Wl,libnatcJavaBridge.so -o .libs/libnatcJavaBridge.so
ar cru .libs/libnatcJavaBridge.a natcJavaBridge.o
ranlib .libs/libnatcJavaBridge.a
creating libnatcJavaBridge.la
(cd .libs && rm -f libnatcJavaBridge.la && ln -s ../libnatcJavaBridge.la
libnatcJavaBridge.la)
if gcc -DHAVE_CONFIG_H -I. -I. -I.
-DEXTENSION_DIR="\"/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050617\""
-I/opt/blackdown-jdk-1.4.2.02/include
-I/opt/blackdown-jdk-1.4.2.02/include/linux -D_REENTRANT -O2
-march=pentium3 -fomit-frame-pointer -MT RunJavaBridge.o -MD -MP -MF
".deps/RunJavaBridge.Tpo" -c -o RunJavaBridge.o RunJavaBridge.c; \
then mv -f ".deps/RunJavaBridge.Tpo" ".deps/RunJavaBridge.Po"; else rm
-f ".deps/RunJavaBridge.Tpo"; exit 1; fi
/bin/sh ./libtool --tag=CC --mode=link gcc -O2 -march=pentium3
-fomit-frame-pointer -o RunJavaBridge RunJavaBridge.o -lrt
gcc -O2 -march=pentium3 -fomit-frame-pointer -o RunJavaBridge
RunJavaBridge.o -lrt
/opt/blackdown-jdk-1.4.2.02/bin/javac php/java/bridge/*.java
make[1]: *** [JavaBridge.jar] Killed
make[1]: Leaving directory
`/var/tmp/portage/php-java-bridge-2.0.8/work/php-java-bridge-2.0.8/server'
make: ***
[/var/tmp/portage/php-java-bridge-2.0.8/work/php-java-bridge-2.0.8/modules/libnatcJavaBridge.la]
Error 2
>no idea, maybe it#s just compilation of tomcat-servlet failing?
>
I have disabled servlets (no use for it now)
>That
>tripped me already sometimes. ;) (@Jost, wouldn't it make sense to
>disable that by default?)
>
>This is my configure without servlet compilation:
>
>---------snipp------------
>
>#! /bin/sh
>#
># Created by configure
>
>#'--prefix=/usr/local/php5' \
>
>'./configure' \
>'--disable-servlet' \
>'--with-java=/usr/lib/j2se/1.4' \
>"$@"
>
>
I'm doing the same. I'm using PHP 5.1RC1 - could that be an issue?
>I rely on documentation and use a standalone JVM which is connected via
>sockets ("Mode 3" iirc)
>
>
OK, that's what I wanted to use too.
When I get it installed some day ;-)
regards
Andreas
|
|
From: Jost B. <jos...@ya...> - 2005-09-30 15:48:12
|
Hi, > >>make[1]: *** [JavaBridge.jar] Killed cool :) -- are there any resource limits on your system so that large applications get killed? ___________________________________________________________ Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx |
|
From: Andreas K. <ako...@we...> - 2005-09-30 15:59:09
|
Jost Boekemeier wrote: >>>>make[1]: *** [JavaBridge.jar] Killed >>>> >>>> > >cool :) -- are there any resource limits on your >system so that large applications get killed? > > Hm, don't know, have nothing set by myself. Using Gentoo with kernel 2.4.31 and grsecurity patch. I tried as said sun, blackdawn and ibm jdks with the same error, and I tried PHP 5.1RC1, 5.0.5 and 4.3.11, allways with the same error. Gentoo compiles every software (except jdk bins...) itself, and I have never had an error like that. The system has 256 MB RAM. best regards Andreas |
|
From: Jost B. <jos...@ya...> - 2005-09-30 16:07:45
|
Hi Andreas, > 2.4.31 and grsecurity patch. > Gentoo compiles every software (except jdk bins...) there's a known problem with older kernels and older libc versions; due to the transition from Linux threads to NPTL some software doesn't work anymore. On RHEL/Fedora for example it is possible to use export LD_ASSUME_KERNEL=2.4.21 to work around this problem. I think your OS vendor should provide a similar workaround. Anyway, a strace `which javac` test.java 2>strace.log should give some insight. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
|
From: Andreas K. <ako...@we...> - 2005-10-01 06:51:24
|
Jost Boekemeier wrote: >>2.4.31 and grsecurity patch. OK, grsec/PAX was the problem. I found a lot of PAX and grsec messages in my syslog, e.g.: Sep 30 21:19:23 rainbow PAX: From xxx.xxx.xxx.xxx: execution attempt in: /opt/ibm-jdk-bin-1.4.2/jre/bin/libjitc.so, 27f2d000-27f3c000 0024e000 Sep 30 21:19:23 rainbow PAX: terminating task: /opt/ibm-jdk-bin-1.4.2/bin/javac(javac):13640, uid/euid: 1000/1000, PC: 27f3a0d0, SP: 5ffa9ccc Sep 30 21:19:23 rainbow grsec: From xxx.xxx.xxx.xxx: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /opt/ibm-jdk-bin-1.4.2/bin/javac[javac:13640] uid/euid:1000/1000 gid/egid:407/407, parent /bin/bash[bash:13217] uid/euid:1000/1000 gid/egid:407/407 That's where I found the solution: http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#paxjava chpax -pemrxs /opt/*-jdk-*/{jre,}/bin/* So it works now. I'm using ibm-jdk for now. Should php-java-bridge work with PHP 5.1 (RC1)? It seems to work, or are there any known/expected problems? best regards and thanks a lot! Andreas |
|
From: Andreas K. <ako...@we...> - 2005-10-02 20:45:42
|
Jost Boekemeier wrote: >>2.4.31 and grsecurity patch. Ok, that seems to be the reason. I remember to have read something like that before... Sep 30 21:19:23 rainbow grsec: From x.x.x.x: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /opt/ibm-jdk-bin-1.4.2/bin/ javac[javac:13640] uid/euid:1000/1000 gid/egid:407/407, parent /bin/bash[bash:13 217] uid/euid:1000/1000 gid/egid:407/407 (END) it's a PAX restriction. So I'll look for a solution and try again. But could <ou tell me with which PHp version php-java-bridge should work? PHP5? even PHP 5.1?` Best regards Andreas |
|
From: Jost B. <jos...@ya...> - 2005-10-03 15:20:59
|
Hi Andreas, > But could <ou tell me with which PHp version > php-java-bridge should > work? PHP5? even PHP 5.1?` the documentation says "4.3.2 or above, this includes 5.x or 6.x, of course. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
|
From: Andreas K. <ako...@we...> - 2005-10-13 02:14:41
|
Jost Boekemeier schrieb:
>Anyway, a strace `which javac` test.java 2>strace.log
>should give some insight.
>
>
Seems I can't ececut anything from java.
if I type:
/opt/ibm-jdk-bin-1.4.2/bin/javac
I only get
"Killed"
on commandline.
When I use strace, the end is:
open("/opt/ibm-jdk-bin-1.4.2/jre/bin/libjitc.so", O_RDONLY) = 20
read(20, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300}\1"...,
512) = 512
fstat64(20, {st_mode=S_IFREG|0755, st_size=2492116, ...}) = 0
mmap2(NULL, 3870384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 20, 0) = 0x2f510000
mmap2(0x2f75f000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
20, 0x24e) = 0x2f75f000
mmap2(0x2f76e000, 1388208, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2f76e000
close(20) = 0
mprotect(0x2f510000, 2420736, PROT_READ|PROT_WRITE) = 0
mprotect(0x2f510000, 2420736, PROT_READ|PROT_EXEC) = 0
open("/etc/mtab", O_RDONLY) = 20
fstat64(20, {st_mode=S_IFREG|0644, st_size=105, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2e6cf000
read(20, "/dev/hda3 / ext3 rw,noatime 0 0\n"..., 4096) = 105
close(20) = 0
munmap(0x2e6cf000, 4096) = 0
open("/proc/stat", O_RDONLY) = 20
fstat64(20, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2e6cf000
read(20, "cpu 8076674 231275 3399085 7254"..., 4096) = 713
read(20, "", 4096) = 0
close(20) = 0
munmap(0x2e6cf000, 4096) = 0
uname({sys="Linux", node="rainbow", ...}) = 0
+++ killed by SIGKILL +++
My kernel-version is 2.4.31, with grsecurity patches (PAX...), perhaps
it has something to do with that?
I have never used Java on Linux, so perhaps I'm missing something.
It's strange, I can execute "java", but "javac" gets killed somehow.
regards
Andreas
|