[Troubleshooting] Too many open files


<2005/9/27 上午09時32分13秒 GMT+08:00> <Critical> <WebLogicServer> <BEA-000204>
<Failed to listen on port 7001, failure count: 2,204, failing for 31,398
seconds, java.net.SocketException: Too many open files>


大致上來說,這個問題有可能導因於OS的設定、應用程式在處理IO的時候,沒有正確關閉stream,以致於這些讀取檔案系統的stream一直處於開啟的狀態,最後就把系統所允許的file數給耗盡了。另外,如果在應用程式中開啟了一些socket,沒有正確關閉,也會發生相同的狀況 。這些關閉IO、socket的指令,一定要放在finally的區塊裡面,以確保即使發生exception,還是會被執行到。

We may increase the rlimit for a process by increasing the rlim_fd_max value (e.g. set rlim_fd_max = 4096) on /etc/system and enlarge the default open file number with ulimit -n 4096.
However, if we still find the open file limit for the java process that hosts WebLogic Server cannot excceed 1024,
please edit '${WL_HOME}/common/bin/commEnv.sh'.
COMMENT OUT the last line and add an ulimit statement (e.g. ulimit -n 8192)in the startup scripts.//resetFd

[Troubleshooting] Cannot Find WebappContextListener


Ans.此成因在於工程師可能採用workshop IDE tool來進行ap的開發,然後要部署到basic weblogic server此template,所以會有找不到此class的情形
此時,你只要把web.xml裡頭的此段拿掉即可,此為Workshop IDE Tool自行加上的







[Info] JDK vs. J2SDK


JDK 1.0 版於 1996 年初release,JDK 1.1 版於 1997 年初release,JDK 1.2 版於 1998 年底release。基於市場行銷的考量,Sun 在 JDK 1.2 版release後將 Java 改名為「Java 2」,將 JDK 改名為「Java 2 Software Development Kit(以下簡稱 J2SDK)」。

然而,雖然改了名字,但是其內在還是沒有變化,其仍舊包含了Java Development kit(JDK)、Java Runtime Environment(JRE),這兩者的差異是:JDK是for programmer所使用,JRE則是提供Java程式運行的環境。


[Info] 檢查有無安裝JVM


[Troubleshooing] BEA-101083

exception message
####<2005/9/12 下午07時52分46秒 GMT+08:00> <Error> <HTTP> <rx2620e1> <uat01>
<ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <BEA-101083> <Connection failure.

java.lang.Throwable: Error in poll for fd=328, revents=8

at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:128)

at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


reference link

Enhancement Request.
Running WLS 8.1 SP2 on HPUX11i.

Customer has requested an enhancement.
The customer wants to suppress (not print) the following error:

<May 25, 2004 10:05:11 PM GMT> <Error> <HTTP> <BEA-101083>

<Connection failure.java.net.SocketException: Error in poll for fd=81, revents=8

at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:128)

at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

This message unnecessarily fills up their log.

This exception can be thrown if their client / browser initiated multiple requests (sockets were opened) and the client connections were closed before WLS could process the requests (and could not write to the stream any more).

This is a harmless message (unnecessary message).


[troubleshooting] [EJB:010207]License validation not passed for 2.0

exception msg
Module Name: QueueTransportEJB, Error: Exception preparing module: EJBModule(QueueTransportEJB,status=NEW)
Unable to deploy EJB: /bea/weblogic81/server/lib/QueueTransportEJB.jar from QueueTransportEJB.jar:
java.lang.Exception: [EJB:010207]License validation not passed for 2.0.'

因為客戶的版本是express的版本(不含EJB Container),但是其在create domain的時候,使用sample此template(有EJB的code),改採server此temaplte來create即可

[How-To] memory allocation for WLS

關於memory allocation,你要加在此行(位於script file的下半部):
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -ms512m -mx512m -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server


[How-To] Capacity Estination



[info] Linux Tuning Parameters Tuning


Java2005專業技術大會 Slide


[troubleshooting] admin console密碼更改的問題

關於admin console的帳號密碼更改的問題,在admin console所變更的密碼,其不會同步更新到boot.properties這個file,所以,如果有變更密碼,就需要重新編輯此檔案(boot.properties)。

[troubleshooting] how to retrieve client's IP if WLS had plugin apache

For non-clustered servers that will receive proxied requests, this attribute may be set at the server level, on the Server -->Configuration-->General tab-->Advanced Options
把server instance的這個值enable起來,然後server要restart

reference: domain_cluster_config_general.html

[troubleshooting] Connection has already been created in this tx context for pool

They had two mysql database connections. The first one is used to read data, and the second one is used to write data into another database. And they also check "Emulate Two-Phase Commit for non-XA driver" this option, but it still does not work.

Exception in context_onAcquire
java.sql.SQLException: Connection has already been created in this tx context for pool named dbsvr1_mysql. Illegal attempt to create connection from another pool: wssvr1_wsclub

According to the exception message, it means you can't use more than one non-XA connection pool in distributed transaction.
If you want to implement one user control calling two DB controls, you will have one transaction using two connections at the same time.
Only an XA transaction with 2PC support can do the job. You need to use XA driver.

I searched for the doc MYSQL, and find MYSQL 5.1 will support XA. But unfortunately, now the latest version of MYSQL is 5.0.
I think there's no good method on weblogic side which can handle the two connection pools with two non-xa drivers condition.