Java client for D4gl
Posted in 1999
A user running Informix's CJA applet/CJAC servlet (Apache JServ on Solaris, Netscape on Win95) got "ERROR: Too many open files" and "No end mark received" when launching the stores demo. Suggestions included checking ulimit and the user the httpd runs as. Ralf Mueller diagnosed it as the servlet's JVM running out of file descriptors (each spawned program needs at least three, plus sockets, logs, jars) and advised wrapping the JVM in a shell script that sets `ulimit -n 1024` and pointing httpd.conf's ServletBinary at it. No confirmation from the poster is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
Java client for d4gl Once cjac servlet is invoked by cja aplet, i am getting "Too many files open " error on java console. Is it because of insufficient kernel setting for handling open files. Can anyone reply to me. refards Anas Sent via Deja.com http://www.deja.com/ Before you buy.
On Thu, 09 Dec 1999 23:27:16 GMT, mohdanas@my-deja.com <mohdanas@my-deja.com> wrote: > >Once cjac servlet is invoked by cja aplet, i am getting "Too many files >open " error on java console. Is it because of insufficient kernel >setting for handling open files. Which systems (client, server)? Which build number (four digit number shown in about dialog of applet)? On client Java console or on server error log? How many clients are connected - only a single one? Ralf -- PS: this mail address will not bounce but is not replyable.
In article <slrn851p1k.d5d.ifxrlf@Ralf.bj-ig.de>, ifxrlf@bj-ig.de wrote: > On Thu, 09 Dec 1999 23:27:16 GMT, mohdanas@my-deja.com <mohdanas@my-deja.com> wrote: > > > >Once cjac servlet is invoked by cja aplet, i am getting "Too many files > >open " error on java console. Is it because of insufficient kernel > >setting for handling open files. > > Which systems (client, server)? Which build number (four digit number shown > in about dialog of applet)? On client Java console or on server error > log? How many clients are connected - only a single one? > > Ralf > > -- > PS: this mail address will not bounce but is not replyable. > I'm not so sure about weather it is happening on client or server side. client is Netscape browser, webserver is solaris with apache jserv. all tests(swing,servlet) are working fine. please find part of java console and jserv.log on webserver message as below. Time: 00,944,858,785,503 5,503 Debug: APLTSTR(Thread-9): Initializing Swing. 5,513 Debug: APLTSTR(Thread-9): done. 5,553 Debug: APLTDBG(Thread-9): Applet: Java Version:1.1.5, SwingVersion:1.1 5,563 Debug: APLTDBG(Thread-9): Applet: CodeBase:http://informix/clijava/ 5,563 Debug: APLTDBG(Thread-9): Applet: DocBase:http://informix/clijava/stores/index.html 5,603 Debug: APLTSTR(Thread-9): Applet: Addr:http://informix/servlets/cjac,appkey: stores 5,833 Debug: APLTSTR(Thread-9): Applet: properties loaded 6,224 Debug: HIOSPROF(Thread-9): get; start: recv 6,364 Debug: HIOSPROF(Thread-9): get; first line: recv 6,394 Debug: HIOSERR(Thread-9): ERROR: Too many open files 9,078 Debug: HIOSERR(Thread-9): Exception: No end mark received. 9,148 Debug: HIOSPROF(Thread-9): get; start: recv jserv.log on webserver is as below (This is the only message i have on jserv.log, and this portion get repeated whenever i try to run stores demo application) [10/12/1999 15:48:58:264 EST] Connection from localhost/127.0.0.1 [10/12/1999 15:48:58:265 EST] Initializing servlet request [10/12/1999 15:48:58:265 EST] Reading request data [10/12/1999 15:48:58:315 EST] Parsing cookies [10/12/1999 15:48:58:316 EST] Calling service() [10/12/1999 15:48:58:327 EST] Sending response headers. thannks Anas Sent via Deja.com http://www.deja.com/ Before you buy.
Hi, The problem seems to be with your applet. If your client is on Solaris, then, you can get the number of files that can be opened using the command "ulimit". Typically, every process has three file descriptors associated with it(standard input, standard output and standard error) Review your program logic to see if there are too many processes being spawned(or try increasing the ULIMIT parameter) If your client is on NT, then you can try increasing the "files" parameter in the config.nt file that is present in the system32 directory(this is what was used on DOS, I am not sure if it is the same on NT, but might be worth a try) cheers ps - This is an issue that seems to me to be somewhat unrelated to Informix. If you have further problems, it might make more sense to post it to the Java forums on Sun. In article <82rpcn$fvl$1@nnrp1.deja.com>, mohdanas@my-deja.com wrote: > In article <slrn851p1k.d5d.ifxrlf@Ralf.bj-ig.de>, > ifxrlf@bj-ig.de wrote: > > On Thu, 09 Dec 1999 23:27:16 GMT, mohdanas@my-deja.com > <mohdanas@my-deja.com> wrote: > > > > > >Once cjac servlet is invoked by cja aplet, i am getting "Too many > files > > >open " error on java console. Is it because of insufficient kernel > > >setting for handling open files. > > > > Which systems (client, server)? Which build number (four digit number > shown > > in about dialog of applet)? On client Java console or on server error > > log? How many clients are connected - only a single one? > > > > Ralf > > > > -- > > PS: this mail address will not bounce but is not replyable. > > > > I'm not so sure about weather it is happening on client or server side. > client is Netscape browser, webserver is solaris with apache jserv. > all tests(swing,servlet) are working fine. please find part of java > console and jserv.log on webserver message as below. > > Time: 00,944,858,785,503 > 5,503 Debug: APLTSTR(Thread-9): Initializing Swing. > 5,513 Debug: APLTSTR(Thread-9): done. > 5,553 Debug: APLTDBG(Thread-9): Applet: Java Version:1.1.5, > SwingVersion:1.1 > 5,563 Debug: APLTDBG(Thread-9): Applet: > CodeBase:http://informix/clijava/ > 5,563 Debug: APLTDBG(Thread-9): Applet: > DocBase:http://informix/clijava/stores/index.html > 5,603 Debug: APLTSTR(Thread-9): Applet: > Addr:http://informix/servlets/cjac,appkey: stores > 5,833 Debug: APLTSTR(Thread-9): Applet: properties loaded > 6,224 Debug: HIOSPROF(Thread-9): get; start: recv > 6,364 Debug: HIOSPROF(Thread-9): get; first line: recv > 6,394 Debug: HIOSERR(Thread-9): ERROR: Too many open files > 9,078 Debug: HIOSERR(Thread-9): Exception: No end mark received. > 9,148 Debug: HIOSPROF(Thread-9): get; start: recv > > jserv.log on webserver is as below (This is the only message i have on > jserv.log, and this portion get repeated whenever i try to run stores > demo application) > > [10/12/1999 15:48:58:264 EST] Connection from localhost/127.0.0.1 > [10/12/1999 15:48:58:265 EST] Initializing servlet request > [10/12/1999 15:48:58:265 EST] Reading request data > [10/12/1999 15:48:58:315 EST] Parsing cookies > [10/12/1999 15:48:58:316 EST] Calling service() > [10/12/1999 15:48:58:327 EST] Sending response headers. > > thannks > > Anas > > Sent via Deja.com http://www.deja.com/ > Before you buy. > Sent via Deja.com http://www.deja.com/ Before you buy.
Hi, thanks. ulimit shows "unlimited" Netscape is on win95. cja aplet & cjac servlet is provided by informix. But if you look at jserv.log entries (shown below). cjac servlet is being executed on webserver. anas In article <82s57i$o01$1@nnrp1.deja.com>, riyengar@my-deja.com wrote: > Hi, > > The problem seems to be with your applet. If your client is on Solaris, > then, you can get the number of files that can be opened using the > command "ulimit". Typically, every process has three file descriptors > associated with it(standard input, standard output and standard error) > Review your program logic to see if there are too many processes being > spawned(or try increasing the ULIMIT parameter) > > If your client is on NT, then you can try increasing the "files" > parameter in the config.nt file that is present in the system32 > directory(this is what was used on DOS, I am not sure if it is the same > on NT, but might be worth a try) > > cheers > > ps - This is an issue that seems to me to be somewhat unrelated to > Informix. If you have further problems, it might make more sense to post > it to the Java forums on Sun. > > In article <82rpcn$fvl$1@nnrp1.deja.com>, > mohdanas@my-deja.com wrote: > > In article <slrn851p1k.d5d.ifxrlf@Ralf.bj-ig.de>, > > ifxrlf@bj-ig.de wrote: > > > On Thu, 09 Dec 1999 23:27:16 GMT, mohdanas@my-deja.com > > <mohdanas@my-deja.com> wrote: > > > > > > > >Once cjac servlet is invoked by cja aplet, i am getting "Too many > > files > > > >open " error on java console. Is it because of insufficient kernel > > > >setting for handling open files. > > > > > > Which systems (client, server)? Which build number (four digit > number > > shown > > > in about dialog of applet)? On client Java console or on server > error > > > log? How many clients are connected - only a single one? > > > > > > Ralf > > > > > > -- > > > PS: this mail address will not bounce but is not replyable. > > > > > > > I'm not so sure about weather it is happening on client or server > side. > > client is Netscape browser, webserver is solaris with apache jserv. > > all tests(swing,servlet) are working fine. please find part of java > > console and jserv.log on webserver message as below. > > > > Time: 00,944,858,785,503 > > 5,503 Debug: APLTSTR(Thread-9): Initializing Swing. > > 5,513 Debug: APLTSTR(Thread-9): done. > > 5,553 Debug: APLTDBG(Thread-9): Applet: Java Version:1.1.5, > > SwingVersion:1.1 > > 5,563 Debug: APLTDBG(Thread-9): Applet: > > CodeBase:http://informix/clijava/ > > 5,563 Debug: APLTDBG(Thread-9): Applet: > > DocBase:http://informix/clijava/stores/index.html > > 5,603 Debug: APLTSTR(Thread-9): Applet: > > Addr:http://informix/servlets/cjac,appkey: stores > > 5,833 Debug: APLTSTR(Thread-9): Applet: properties loaded > > 6,224 Debug: HIOSPROF(Thread-9): get; start: recv > > 6,364 Debug: HIOSPROF(Thread-9): get; first line: recv > > 6,394 Debug: HIOSERR(Thread-9): ERROR: Too many open files > > 9,078 Debug: HIOSERR(Thread-9): Exception: No end mark received. > > 9,148 Debug: HIOSPROF(Thread-9): get; start: recv > > > > jserv.log on webserver is as below (This is the only message i have on > > jserv.log, and this portion get repeated whenever i try to run stores > > demo application) > > > > [10/12/1999 15:48:58:264 EST] Connection from localhost/127.0.0.1 > > [10/12/1999 15:48:58:265 EST] Initializing servlet request > > [10/12/1999 15:48:58:265 EST] Reading request data > > [10/12/1999 15:48:58:315 EST] Parsing cookies > > [10/12/1999 15:48:58:316 EST] Calling service() > > [10/12/1999 15:48:58:327 EST] Sending response headers. > > > > thannks > > > > Anas > > > > Sent via Deja.com http://www.deja.com/ > > Before you buy. > > > > Sent via Deja.com http://www.deja.com/ > Before you buy. > Sent via Deja.com http://www.deja.com/ Before you buy.
In article <82uek5$6d2$1@nnrp1.deja.com>, mohdanas@my-deja.com says... > 364 Debug: HIOSPROF(Thread-9): get; first line: recv > Well, this is the point in which the stuff starts happening on the server side. 1) can you run stores demo on the server, as FGLGUI=0 ? 2) is there a user specific limit on open files on Solaris? If yes, you would want to check this for user "nobody", or whatever user your httpd is running as. -- Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517 #----------------------------------------------------------------- globals "std_disclaimer.4gl" Ask yourself just one question: ' Qu' m's se puede hacer y aprender ? - Propellerhead ReBirth RB-338 manual
apache webserver is installed on solaris server. It starts as root(parent process), then spawns rest of the threads as user 'web'. Can any one tell me how i am getting "Too many files open " error. how can i increase file handling capabilities for "root or web users" on solaris (to run cjac servlet successfully). This cjac servlet is suppose to fire a remote shell on another hp-unix box. Thanks anas In article <MPG.12bdece683acd36698969d@news.xtra.co.nz>, afalout@ihug.co.nz wrote: > In article <82uek5$6d2$1@nnrp1.deja.com>, mohdanas@my-deja.com says... > > 364 Debug: HIOSPROF(Thread-9): get; first line: recv > > > > Well, this is the point in which the stuff starts happening on the server > side. > > 1) can you run stores demo on the server, as FGLGUI=0 ? > 2) is there a user specific limit on open files on Solaris? If yes, you > would want to check this for user "nobody", or whatever user your httpd > is running as. > > -- > Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517 > #----------------------------------------------------------------- > globals "std_disclaimer.4gl" > > Ask yourself just one question: ' Qu' m's se puede hacer y aprender ? > - Propellerhead ReBirth RB-338 manual > Sent via Deja.com http://www.deja.com/ Before you buy.
On Fri, 10 Dec 1999 20:55:53 GMT, mohdanas@my-deja.com <mohdanas@my-deja.com> wrote: > >Time: 00,944,858,785,503 >5,503 Debug: APLTSTR(Thread-9): Initializing Swing. > > [usual startup ...] > >6,394 Debug: HIOSERR(Thread-9): ERROR: Too many open files >9,078 Debug: HIOSERR(Thread-9): Exception: No end mark received. This error line has been generated by the servlet which seems to be unable to open enough file descriptors to start the desired program. You should allow your Java VM to open as many files as possible - every program started via the servlet needs at least three file descriptors plus the VM itself needs some descriptors for the socket connection to mod_jserv, log files, jar files described in the CLASSPATH ... Maybe you can start the VM via a shell script of your own. Then you should try to have something like that: -- myjava.sh -- #!/bin/sh ulimit -n >/tmp/numfiles ulimit -n 1024 /usr/lib/java/bin/java $* --------------- Now you change the SevletBinary line in httpd.conf to start myjava.sh instead of java itself and try again. Ralf -- PS: this mail address will not bounce but is not replyable.