Forum OpenACS Q&A: webmail troubles

Collapse
Posted by loris bason on
Hi,
In order to reate a virtual user I added the line

+webmail-:postgres:1010:1012:/home/nsadmin/qmail/alias:-::

to /var/qmail/users/assign
However when I run /var/qmail/bin/qmail-newu:

qmail-newu: fatal: bad format in users/assign

another problem:

when I try to send a message, after I have created an account in
webmail, the following error message appears:

DATABASE ERROR

invalid command name "ns_java"

I hope someone can help me

Collapse
Posted by Dan Wickstrom on
You need a dot by itself on the last line of your or your users/assign file.

Webmail depends on the aolserver module nsjava which is available here.

Collapse
Posted by loris bason on
Dan,
thank you for your prompt replay. The dot on the new line works.
regardind the second question....
I did it!
I have installed the java library libnsjava.so
and added to the configuration file the following lines:

ns_section "ns/server/${servername}/module/nsjava"

      ns_param  EnableJava      "on"  ;# Set to on to enable nsjava.

      ns_param  VerboseJvm    "off"  ;# Same as command line -debug.

      ns_param  LogLevel            "Notice"

      ns_param  DestroyJvm      "off"  ;# Destroy jvm on shutdown.

      ns_param  DisableJITCompiler  "off"

      ns_param ClassPath "/usr/local/jdk1.2.2/lib/classes.zip:/home/oacs/www/webmail/java:/home/aolserver/bin/nsjava.jar"

ns_section "ns/server/${servername}/modules"

        ns_param  nsjava=  "libnsjava.so"

but something is probably wrong because in the server.log:

Notice: modload: loading '/home/aolserver/bin/libnsjava.so'
Notice: ModuleInit: Java Module NOT enabled

Collapse
Posted by Dan Wickstrom on
In the following line:
ns_param      nsjava=       libnsjava.so
remove the '='.
Collapse
Posted by loris bason on
yes, that's right

unfortunately another error message follows

[-jvm-] Error: StartJvm: CreateJavaVM failed

I'm using jdk1.2.2 and  Linux 2.2.14-15mdk

Collapse
Posted by Dan Wickstrom on
Who is the vendor for the jdk that you are using? I never had much luck with the 1.2.2 jdk's on linux, but of course it has been about six months since I tried using one, so the situation may have changed. See the testing summary that I have posted on the nsjava homepage for an idea of which jdk's work.

Were there any other error messages in the log prior to the one that you posted?

Collapse
Posted by loris bason on
The vendor is Sun (Classic VM (build 1.2.2-L, green threads, nojit)).

I will download the blackdown jdk1.1.8 this nigth in order to try again tomorrow

No, the error I post you is the only one

Collapse
Posted by Dan Wickstrom on
Green threads are definitely a problem.  Make sure you get a jvm that uses native threads.
Collapse
Posted by loris bason on
Dan,
I have downloaded and used the blackdown jdk118_v3-glibc-2.1.3.
The result is.... segmentation violation

the log gives the following lines:

[-main-] Notice: ModuleInit: starting -jvm- thread
Full thread dump:

SIGSEGV  11*  segmentation violation
        stackbase=0, stackpointer=BF5FFB00



    "SIGQUIT handler" (TID:0x406c02a0, sys_thread_t:0x813f4c8,        state:R, thread_t: t@4101, sp:0x0 threadID:0x39b7, stack_ba
    "Finalizer thread" (TID:0x406c0088, sys_thread_t:0x813f3a0, state:CW, thread_t: t@3076, sp:0x0 threadID:0x39b6, stack_base:0xbf3ffcf0, stack_size:0x200000) prio=0
    "main" (TID:0x406c00b0, sys_thread_t:0x813e870, state:R, thread_t: t@2051, sp:0x0 threadID:0x39b5, stack_base:0x0, stack_size:0x200000) prio=0 *current thread*
Monitor Cache Dump:
Registered Monitor Dump:
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
        Waiting to be notified:
            "Finalizer thread" (0x813f3a0)
    Monitor registry: owner "main" (0x813e870, 1 entry)

I have not found the libjvm.so and libhpi.so libraries in jdk118. Is it normal ?

Collapse
Posted by Dan Wickstrom on
Can you run it in gdb and post the backtrace after it crashes, and could you also post the output from running configure?

libjvm.so and libhpi.so are specific to 1.2 jdk's.

Collapse
Posted by loris bason on
Hi Dan,
I hope you had a merry Christmas.

I give you the information you asked me:

(gdb) backtrace
#0  0x400282c4 in pthread_setconcurrency () from /lib/libpthread.so.0
#1  0x400281b0 in pthread_setconcurrency () from /lib/libpthread.so.0
#2  0x40028459 in pthread_create () from /lib/libpthread.so.0
#3  0x80d2bd6 in NsThreadCreate (thrPtr=0x8107278) at pthread.cpp:677
#4  0x80cfbb3 in Ns_ThreadCreate2 (proc=0x401e3f5c, arg=0x0, stackSize=65536, flags=0,
    resultPtr=0x40290b44) at thread.c:123
#5  0x80cfb2d in Ns_ThreadCreate (proc=0x401e3f5c, arg=0x0, stackSize=0,
    resultPtr=0x40290b44) at thread.c:82
#6  0x401e3a2d in ?? () from /home/aolserver/bin/libnsjava.so
#7  0x806eefc in Ns_ModuleLoad (server=0x80fabf0 "oacspg", module=0x80fb4a8 "nsjava",
    file=0x80fb4b8 "libnsjava.so", init=0x80d7041 "Ns_ModuleInit") at modload.c:174
#8  0x806f2cd in NsLoadModules () at modload.c:372
#9  0x8071763 in Ns_Main (argc=7, argv=0xbffff8c4, initProc=0x806e97c <ServerInit>)
    at nsmain.c:625
#10 0x806e96c

./configure --with-aolserver-src=/usr/local/src/aolserver3_2 --prefix=/home/aolserver
loading cache ./config.cache
checking prefix... /home/aolserver
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking looking for aolserver ns.h include file... /usr/local/src/aolserver3_2/include/ns.h
checking looking for aolserver nsd.h include file... /usr/local/src/aolserver3_2/nsd/nsd.h
checking for javac... (cached) /usr/local/jdk118_v3/bin/javac
checking checking for java... Java found at /usr/local/jdk118_v3
checking for zip or jar files to include on CLASSPATH... "/usr/local/jdk118_v3/lib/classes.zip"
checking for the java runtime... /usr/local/jdk118_v3/bin/java
checking for the java compiler... /usr/local/jdk118_v3/bin/javac
checking for the java header program... /usr/local/jdk118_v3/bin/javah
checking for the java archive program... /usr/local/jdk118_v3/bin/jar
checking for the java debugger program... /usr/local/jdk118_v3/bin/jdb
checking for jni.h include file... /usr/local/jdk118_v3/include/jni.h.
checking for jdk version... Looks like you are using a 1.1 JVM
checking for jni_md.h include file... /usr/local/jdk118_v3/include/linux/jni_md.h
checking the jdk arch lib directory... checking how to run the C preprocessor... (cached) gcc -E
checking for unistd.h... (cached) yes
checking for working const... (cached) yes
checking for ANSI C header files... (cached) yes
checking for size_t... (cached) yes
checking for ANSI C header files... (cached) yes
checking for strerror... (cached) yes
checking for strstr... (cached) yes
checking for strlen... (cached) yes
checking platform specific compile options... linux


        NSJAVABLEND version 0.0.9 configured successfully.

Using c-compiler:      gcc
JDK Version:          1.1
Install libnsjava.so:  /home/aolserver/bin
Aolserver Version:    3_0_PLUS
Aolserver include:    /usr/local/src/aolserver3_2/include
Aolserver nsd include: /usr/local/src/aolserver3_2/nsd
jdk include:          /usr/local/jdk118_v3/include
jdk platform include:  /usr/local/jdk118_v3/include/linux
libjava.so dir:        /usr/local/jdk118_v3/lib/i686/native_threads
java classpath:        "/usr/local/jdk118_v3/lib/classes.zip"

CFLAGS: ' -pipe -fPIC -Wall -Wno-unused -DHAVE_CMMSG=1 -DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1'

LIBS:  ' -ldl -lpthread -L/usr/local/jdk118_v3/lib/i686/native_threads -ljava'

creating ./config.status
creating Makefile.global                                        in main (argc=7, argv=0xbffff8c4) at main.c:64

Collapse
Posted by Dan Wickstrom on
The christmas break was nice.

You're posts come out ok, in the email alerts, but they're pretty much incomprehensible on the bboard.  When posting something like a log output, you can select html mode and enclose the log listing in <pre></pre> tags to maintain its formatting.

What version of linux are you using? Also, could you run the following and post the results:

1) nsd -V

2) gcc -v

3) java -version

Collapse
Posted by loris bason on
The Linux version is:
 2.2.14-15mdk 
aolservers version is:
AOLserver/3.2 (aolserver3_2)
   CVS Tag:         $Name: aolserver3_2 $
   Built:           Dec 27 2000 at 15:29:43
   Tcl version:     7.6
   Thread library:  pthread
   Platform:        linux    
gcc version:
 Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)  
java version
 "1.1.8" 
Collapse
Posted by Dan Wickstrom on
Ok, a few more questions.  What do you get for the following:

1) ldd libjava.so

2) ls -l `whereis libpthread`*

Collapse
Posted by loris bason on
 [root@fedora /lib]# ldd libjava.so 
libpthread.so.0 => /lib/libpthread.so.0 (0x40077000)
libm.so.6 => /lib/libm.so.6 (0x4008a000) 
libdl.so.2 => /lib/libdl.so.2 (0x400a8000)  
libc.so.6 => /lib/libc.so.6 (0x400ac000)  
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)  
ls -l `whereis libpthread`*
ls: libpthread:: File o directory inesistente
-rw-r--r--    1 root     root       837262 mag  5  2000 /usr/lib/libpthread.a
lrwxrwxrwx    1 root     root           25 apr 21  2000 /usr/lib/libpthread.so -> ../../lib/libpthread.so.0*  
So It cant't find the libpthread.so library. In /lib I found the libpthread-0.8.so library and I tried to make the symbolik link: /lib/libpthread.so -> /lib/libpthread-0.8.so, but it doesn't work
Collapse
Posted by Dan Wickstrom on
Last year, I did some development using mandrake 7.0, and I ran into a similar problem where I had an incompatiblity between the version of libpthreads installed with mandrake 7.0 versus the version of libpthreads that libjava.so was linked against.  I would be willing to bet that the libjava.so library was probably compiled on a redhat machine.  Anyway, I played around with it some, but I didn't ever find a good solution to fixing the problem. I eventually switched to redhat 6.2 for development, and the problem went away.  Before, you do anything else, you might want to try using blackdown's jdk118_v1 instead of v3.  It might be linked against an earlier version of libpthreads.