ebs Application Listener
FNSFS:
[appltest@vs155 ~]$ lsnrctl status APPS_TEST
LSNRCTL for Linux: Version 10.1.0.5.0 - Production on 24-JUN-2015 19:51:02
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=vs155)(Port=1636))
STATUS of the LISTENER
------------------------
Alias APPS_TEST
Version TNSLSNR for Linux: Version 10.1.0.5.0 - Production
Start Date 13-MAY-2015 21:44:02
Uptime 41 days 22 hr. 7 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/TEST/inst/apps/TEST_vs155/ora/10.1.2/network/admin/listener.ora
Listener Log File /u01/TEST/inst/apps/TEST_vs155/logs/ora/10.1.2/network/apps_test.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vs155.hand-china.com)(PORT=1636)))
Services Summary...
Service "FNDFS" has 1 instance(s).
Instance "FNDFS", status UNKNOWN, has 1 handler(s) for this service...
Service "FNDSM" has 1 instance(s).
Instance "FNDSM", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[appltest@vs155 ~]$ cd $ADMIN_SCRIPTS_HOME
[appltest@vs155 scripts]$ adalnctl.sh status
adalnctl.sh version 120.3
Checking status for listener process APPS_TEST.
LSNRCTL for Linux: Version 10.1.0.5.0 - Production on 24-JUN-2015 19:51:51
Uptime 41 days 22 hr. 7 min. 49 sec
adalnctl.sh: exiting with status 0
adalnctl.sh: check the logfile /u01/TEST/inst/apps/TEST_vs155/logs/appl/admin/log/adalnctl.txt for more information ...
同資料庫一樣,這個監聽可以使用tnsping來ping通,可以通過檢視tnsnames.ora檔案,來獲得對外提供的服務名。
The Basics About Report Review Agent (FNDFS) on 11i (Doc ID 111383.1)
FNDFSor the Report Review Agent (RRA)is the default text viewer within Oracle Applications, which allows users to view report output and log files. Report Review Agent is also referred to by the executable FNDFS. The default viewer must be configured correctly before external editors or browsers are used for viewing requests.
Since requests are run on the concurrent processing server on the database tier,the reports must be brought to the client for viewing. Oracle Application supplies a default text viewer called Report Review Agent. This is done by creating a database alias called FNDFS_ (and a "fake" SID called FNDFS), which,
when called using the connect string found in the tnsnames.ora, launches the FNDFS executable.
With multiple $APPL_TOPs on a single Concurrent Processing Server, you can choose to have one or more Report Review Agent services. If you choose to use a singleRRA, then only one FNDFS executable is utilized; if you choose to use multiple RRA services, then the profile option RRA: Service Prefix must be set to the
service name used for that product group.
II. How does Report Review Agent work?
A user runs a request from the FNDRSRUN form. For example, the user runs the Active Users report. The concurrent manager processes the request and produces output. The user makes a request to view the report. The system profile option RRA: Enabled has been checked to make sure the value is set to Yes. The file name and node name of the host is selected from the database. FNDFS_ (or whatever value is stored in the RRA: Service Prefix) is then added to what was returned for the node name.
For example, if ORACLE is returned for the value of the node name, the result would be FNDFS_ORACLE.
If there is a value for the RRA: Service Prefix, for example, AOLCOMMON and the node name is ORACLE, the result would be AOLCOMMON_ORACLE. (Only the name of the entry is changed, not the SID or other parts of the tnsnames.ora and listener.ora.)
SQL*Net then tries to make a connection. It looks for an entry in the tnsnames.ora file for FNDFS. If the connection is made, the listener.ora file is used to
resolve the FNDFS_oracle SID found in the tnsnames.ora file. The PROGRAM, with the path to the FNDFS executable, is then launched. FNDFS runs and returns the selected file. The default viewer is then launched and the report is passed to be viewed by the user.
Basic function of FNDFS======================1) The user selects ‘Request Output’, ‘Request Log’, or ‘Manager Log’
2) The file name and nodename are selected from the database Reports:
Outfile:
SELECT outfile_name, outfile_node_name FROM fnd_concurrent_requests WHERE request_id = :id;
Logfiles:
SELECT logfile_name, logfile_node_name FROM fnd_concurrent_requests WHERE request_id = :id;
Manager logs:
SELECT logfile_name, node_name FROM fnd_concurrent_processes WHERE concurrent_process_id = :process_id;
3) The client takes the nodename that was returned and adds FNDFS_ to the beginning of it. For example, if xprod_ser1 was returned as the node name, the client would construct the string: FNDFS_xprod_ser1
4) The client takes this string and attempts to use it as a SQL*Net connect descriptor. SQL*Net will attempt to resolve this descriptor into a host and SID using a local tnsnames.ora file or Oracle Names.
5) If successfully resolved, a connection is made to the given host. The listener on this host receives the connection request, and resolves the SID using its listener.ora file. If it finds a PROGRAM parameter listed for this SID, it will launch this program. (which should be $FND_TOP/bin/FNDFS)
6) The FNDFS executable runs. The client sends RPC commands to it to return the requested file.
Common error :
An error occurred while attempting to establish an application file server connection with the node There may be a network connection
problem or the listener on node may not be running.
-This can indicate a multitude of problems, and unfortunately, it does not display anymore helpful messages.
-This most commonly indicates a problem with the local tnsnames.ora file or the listener.ora file on the server. Check that the customer added an FNDFS entry to the tnsnames.ora file.
-Check that the hostname and port are correct. Make sure that the entry is named FNDFS_hostname. Also, if the customer has edited the file himself, he may have inadvertently corrupted the file. SQL*Net is very picky about the syntax of this file.
-An extra space or carriage return could cause RRA to fail. The only supported method of editing this file is to use Network Manager. Have the customer backup the old file, then create a new one with Network Manager if you suspect that this file may be bad.
-Once you are sure the tnsnames.ora file is correct, you should be able to use TNSPing to ping the listener. (Be sure to ping the FNDFS alias) It should return an OK result.
-Errors here may indicate that the listener is not properly set up.
-Make sure that you are using the exact name of the server (check this with: uname -n) If you have the wrong name in the tnsnames file entry, the tnsping will work, but RRA will not. For example, suppose the server’s real name is XPROD_SER1, and you
create a tnsnames entry called: FNDFS_DBSERV because you have a DNS alias for this server. You can ping the server normally, because DNS will resolve this name for you. You can run TNSPing with FNDFS_DBSERV and it will resolve this connect string and it will ping the server and return an OK result. This would lead you to believe that everything is OK on the client side. However, RRA still does not work. This is because RRA is using the real server name, and it is trying to resolve the connect string NDFS_XPROD_SER1, and this entry does not exist. A client-side trace would discover this error.
FNDSM is the Service manager(服務管理器). FNDSM is executable & core component in GSM ( Generic Service Management Framework通用服務管理架構 ). You start FNDSM services via APPS listener on all Nodes in Application Tier.為什麼能夠通過APPS Listener啟動應用層的SM(服務管理器)呢?——因為在監聽的配置檔案中有如下代碼:
[appl02@vs009 admin]$ echo $TNS_ADMIN
/u01/VIS02/inst/apps/VIS02_vs009/ora/10.1.2/network/admin
[appl02@vs009 admin]$ls
listener.ora tnsnames.ora
[appl02@vs009 admin]$ cat listener.ora
# $Header: admk80ln_ux.sql 120.9 2007/03/09 04:31:05 sbandla ship $
# LISTENER.ORA For Oracle Applications
# This file is automatically generated
APPS_VIS02 =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= vs009)(Port= 1628))
)
SID_LIST_APPS_VIS02 =
(SID_LIST =
( SID_DESC = ( SID_NAME = FNDSM )
( ORACLE_HOME = /u01/VIS02/apps/tech_st/10.1.2 )
( PROGRAM = /u01/VIS02/apps/apps_st/appl/fnd/12.0.0/bin/FNDSM)
( envs='MYAPPSORA=/u01/VIS02/apps/apps_st/appl/APPSVIS02_vs009.env,PATH=/usr/bin:/usr/ccs/bin:/bin,FNDSM_SCRIPT=/u01/VIS02/inst/apps/VIS02_vs009/admin/scripts/gsmstart.sh' )
)
( SID_DESC = ( SID_NAME = FNDFS )
( PROGRAM = /u01/VIS02/apps/apps_st/appl/fnd/12.0.0/bin/FNDFS )
( envs='EPC_DISABLED=TRUE,NLS_LANG=American_America.AL32UTF8,LD_LIBRARY_PATH=/u01/VIS02/apps/tech_st/10.1.2/lib32:/u01/VIS02/apps/tech_st/10.1.2/lib:/usr/X11R6/lib:/usr/openwin/lib:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/server:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/native_threads:/u01/VIS02/apps/apps_st/appl/sht/12.0.0/lib,SHLIB_PATH=/u01/VIS02/apps/tech_st/10.1.2/lib32:/u01/VIS02/apps/tech_st/10.1.2/lib:/usr/X11R6/lib:/usr/openwin/lib:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/server:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/native_threads:/u01/VIS02/apps/apps_st/appl/sht/12.0.0/lib,LIBPATH=/u01/VIS02/apps/tech_st/10.1.2/lib32:/u01/VIS02/apps/tech_st/10.1.2/lib:/usr/X11R6/lib:/usr/openwin/lib:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/server:/u01/VIS02/apps/tech_st/10.1.2/jdk/jre/lib/i386/native_threads:/u01/VIS02/apps/apps_st/appl/sht/12.0.0/lib,APPLFSTT=VIS02_BALANCE;VIS02_FO;VIS02,APPLFSWD=/u01/VIS02/inst/apps/VIS02_vs009/appl/admin;/u01/VIS02/inst/apps/VIS02_vs009/appltmp;/u01/VIS02/apps/apps_st/comn/webapps/oacore/html/oam/nonUix/launchMode/restricted' )
STARTUP_WAIT_TIME_APPS_VIS02 = 0
CONNECT_TIMEOUT_APPS_VIS02 = 10
TRACE_LEVEL_APPS_VIS02 = OFF
LOG_DIRECTORY_APPS_VIS02 = /u01/VIS02/inst/apps/VIS02_vs009/logs/ora/10.1.2/network
LOG_FILE_APPS_VIS02 = APPS_VIS02
TRACE_DIRECTORY_APPS_VIS02 = /u01/VIS02/inst/apps/VIS02_vs009/logs/ora/10.1.2/network
TRACE_FILE_APPS_VIS02 = APPS_VIS02
ADMIN_RESTRICTIONS_APPS_VIS02 = ON
IFILE = /u01/VIS02/inst/apps/VIS02_vs009/ora/10.1.2/network/admin/VIS02_vs009_listener_ifile.ora
SUBSCRIBE_FOR_NODE_DOWN_EVENT_APPS_VIS02 = OFF
這個檔案也就說明了,監聽程式裡,配置了SM(服務管理器)的程式路徑,環境變量,PATH等運作所需要的所有資訊。
Service Managers are spawned(被産生) on the middle-tier nodes of a GSM enabled system in order to act as an agent of the ICM(SM在系統中被産生,作為一個ICM(内部并發管理器)的代理程式). When the ICM sees that it needs An SM to perform some function, such as start a concurrent manager process, on a middle-tier node, it will make remote procedure control calls to the Apps listener on that node to start the Service manager(當ICM發現有需要運作的請求,ICM就會通過一個遠端調用,調用APPS Listener去啟動SM). Once the Service Manager has been started and initialized, the ICM communicates directly to the SM through RPC, giving it information to manage the services on that node(一旦SM啟動了,ICM通過RPC直接和SM交流,提供給SM資訊,去管理這個SM).
-The Service manager is spawned from the APPS TNS Listener
- The APPS TNS Listener must be started on every middle-tier node in the system, and started by the user that starts ICM(e.g. applmgr)
-TNS Listener spawns Service Manager to run as agent of ICM for the local node
-The Service Manager is started by ICM on demand(一旦需要) when needed. If no management actions are needed on a node, a Service Manager will not be started by ICM until necessary. When ICM exits its Service Managers exit as well.
-The Service Manager environment is set by APPSORA.env as defined in listener.ora
-The listener.ora and tnsnames.ora files must be configured properly for the listener to be able to spawn the Service Manager and for the ICM to be able to check the status of the Service Manager.
補充下ICM和SM在作業系統上的程序關系:
oracle 官方文檔中,有如下描述:
When the ICM is initiated on UNIX, the $FND_TOP/bin/startmgr program is invoked.
This calls $FND_TOP/bin/batchmgr, which then:
1. Starts a shell process.
2. Starts the ICM process using the command FNDLIBR, with startup parameters FND, CPMGR, and FNDCPMBR.
3. Creates log files (std.mgr and wnnn.mgr) in $APPLCSF/$APPLLOG.
通過如下程序檢視,目測28146就是這個shell程序,然後他啟動了ICM,也就是28151程序。當然這個時候如果不需要并發管理器,ICM就不會去啟動FNDSM程序,如果收到了應用listener的請求,說是有并發請求需要某個特定的并發管理器去跑,這樣就會請求啟動FNDSM(注意這個是os直接啟動,父程序号是1),然後由FNDSM去啟動ICM管理的其他并發管理器。
[appl04@test248 log]$ ps -fu appl04
UID PID PPID C STIME TTY TIME CMD
appl04 28146 1 0 Jun12 ? 00:00:00 sh
appl04 28151 28146 0 Jun12 ? 00:01:10 FNDLIBR
appl04 28247 27701 0 Jun12 ? 00:29:24 /u01/VIS04/app/fs1/EBSapps/comn/uti
appl04 28289 1 0 Jun12 ? 00:00:01 FNDSM
appl04 28345 28289 0 Jun12 ? 00:00:01 RCVOLTM apps/ZG3533039134971EFCEB43
appl04 28348 28289 0 Jun12 ? 00:00:00 POXCON apps/ZG6F2F844025759208B82DF
appl04 28349 28289 0 Jun12 ? 00:00:00 INCTM apps/ZGE1BE696768335F9D33CF9F
appl04 28360 28289 0 Jun12 ? 00:00:41 /u01/VIS04/app/fs1/EBSapps/comn/uti
appl04 28361 28289 0 Jun12 ? 00:00:09 FNDCRM apps/ZG27D5BF7068DA4A156F2F2
appl04 28362 28289 0 Jun12 ? 00:00:06 FNDSCH
appl04 28363 28289 0 Jun12 ? 00:00:01 FNDLIBR
appl04 28364 28289 0 Jun12 ? 00:00:00 FNDLIBR
appl04 28365 28289 0 Jun12 ? 00:00:00 FNDLIBR
appl04 28368 28289 0 Jun12 ? 00:00:00 INVLIBR
appl04 28370 28289 0 Jun12 ? 00:00:02 FNDLIBR