Tuesday, October 29, 2013

EM CLI, diving in and beyond!


Doing more in less time… Isn’t that what we all strive to do?
With this in mind, I put together two screen watches on Oracle Enterprise Manager 12c command line interface, or EM CLI as it is also known.
There is a wealth of information on any topic that you choose to read about, from manual pages to coding documents…might I even say blog posts? In our busy lives it is so nice to just sit back with a short video, watch and learn enough to dive in.
Doing more in less time, is the essence of EM CLI. It enables you to script fundamental and complex administrative tasks in an elegant way, thanks to the Jython scripting language. Repetitive tasks can be scripted and reused again and again. Sure, a Graphical User Interface provides a more intuitive step by step approach to tasks, and it provides a way of quickly becoming familiar with a product and its many features, and it is definitely the way to go when viewing performance data and historical trending…but for repetitive and complex tasks, scripting is the way to go!
Lets us take the everyday task of creating an administrator.
Using EM CLI in interactive mode the command could look like this..
emcli>create_user(name='jan.doe', type='EXTERNAL_USER')
This command creates an administrator called jan.doe which is an externally authenticated user, possibly LDAP or SSO, defined by the EXTERNAL_USER tag. The create_user procedure takes many arguments; see the documentation for more information.
Now, where EM CLI really shines and shows power is in creating multiple users. Regardless of the number, tens or thousands, the effort is the same. With the use of a standard programming construct, a loop, you can place your create_user() procedure within it. Using a loop allows you to iterate through a previously created list, creating new users until the list is complete.
Using EM CLI in Script mode, your Jython loop would look something like this…
for user in list_of_users:
      create_user(name=user, expire=’true’, password=’welcome123’) 
This Jython code snippet iterates through a previously defined list of names, list_of_users, and iterates through the list, taking each name, user in this case, and creates an administrator sets the password to welcome123, but forces the user to reset it when they first login.
This is only one of over four hundred procedures created to expose Oracle Enterprise Manager 12c functionality in a powerful and programmatic way.
It is a few months since we released EM CLI with scripting option. We are seeing many users adapt to this fun and powerful way of using Oracle Enterprise Manager 12c.
What are the first steps?
Watch these screen watches, and dive in.
The first screen watch steps you through where and how to download and install and how to run your first few commands.

The Second screen watch steps you through a few scripts.
Next time, I am going to show you the basic building blocks to writing a Jython script to perform Oracle Enterprise Manager 12c administrative tasks.
Join this growing group of EM CLI users…. Dive in!

Network Ports Used in Oracle Enterprise Manager 12c

By Courtney Llamas



When planning and configuring your Oracle Enterprise Manager 12c implementation, you will have many infrastructure considerations. One of the most often discussed pieces is the network ports that are used and how to configure load balancers, firewalls and ACLs for communication.

This blog post will help identify the typical default port and range for each component, how to identify it and how to modify the port usage.

To modify most ports during installation, select the Advanced Installation and set the appropriate ports on the Port Configuration Details screen.



Once the system is installed, you can use the following EMCTL or OMSVFY commands to validate components and port assignment:
$emctl status oms -details
$omsvfy show opmn
$omsvfy show ports

To verify if a port is free, run the following command:

On Unix:
$netstat -an | grep
On Microsoft Windows:
>netstat -an|findstr

For more information on OMSVFY (part of the EMDIAG toolkit) see MOS Note 421053.1: EMDIAG Troubleshooting Kits Master Index

External Ports

These ports will be used in every Enterprise Manager 12c installation and will require firewall and/or ACL modifications if your network is restricted.  These are also the components that will be added to your load balancer configuration.

Default Port
Range
Component
Usage
Modify
4889
4889 – 4898
Enterprise Manager OHS Upload HTTP
Agent Communication to OMS (unsecure). Used in load balancer.
To modify after install follow notes 1381030.1 and 1385776.1. Requires changes on all Agents.
1159
1159, 4899 – 4908
Enterprise Manager OHS Upload HTTP SSL
Agent Communication to OMS (secure). Used in load balancer.
To modify after install follow notes 1381030.1 and 1385776.1. Requires changes on all Agents.
7788
7788 – 7798
Enterprise Manager OHS Central Console HTTP (Apache/UI)
Web browser connecting to Cloud Control Console (unsecure). Used in load balancer and for EM CLI.
To modify after install follow notes 1381030.1.
7799
7799 - 7809
Enterprise Manager OHS Central Console HTTP SSL (Apache/UI)
Web browser connecting to Cloud Control Console (secure). Used in load balancer and for EM CLI.
To modify after install follow note 1381030.1.
7101
7101 - 7200
EM Domain WebLogic Admin Server HTTP SSL Port
Cloud Control Admin Server.
To modify after install follow note 1109638.1.
3872
3872, 1830 – 1849
Cloud Control Agent
Only the OMS will connect to this port, to either report changes in the monitoring, submit jobs, or to request real-time statistics.
Port can be provided during Agent install.
If the agent port needs to be changed at a later date this can be done with the following command on the agent:
emctl setproperty agent -name EMD_URL -value https://hostname.domain:port/emd/main/

This will allow the agent to run on the new port, however the target does not get renamed so continues to show the original port.
1521*
Depends on Listener Configuration
Database Targets -  SQL*Net Listener
For Repository database, only the OMS will connect to store management data from
the agents. For all monitored target databases OMS will retrieve information requested by browser clients.
To modify this port for the repository database:
Change the listener.ora file for the EM repository. Restart the listener. Then for every OMS machine using that repository run the following:
emctl stop oms
emctl config oms -store_repos_details -repos_conndesc -repos_user sysman
emctl start oms
emctl config emrep -agent -conn_desc  

To modify this port for monitored targets, change the listener configuration on the target, then update Monitoring Configuration in EM.
7101
7101 - 7200
FMW Targets – Admin Console
Outgoing from OMS, used for managing FMW targets.
To modify after install follow note 1109638.1.
NA
NA
ICMP
Outgoing from OMS to host servers if the Agent is unreachable. Validates if server is up or down.
NA

Internal Ports

These ports are required for internal Enterprise Manager communication and typically do not require additional firewall/ACL configuration.
Default Port
Range
Component
Usage
Modify
7201
7201 – 7300
EM Domain WebLogic Managed Server HTTP Port
Used for Fusion Middleware communication.
Configured during installation
7301
7301 – 7400
EM Domain WebLogic Managed Server HTTP SSL Port
Used for Fusion Middleware communication.
Configured during installation
7401
7401 – 7500
Node Manager HTTP SSL Port
Used for Fusion Middleware communication.
Configured during installation
6702
6100 - 6199
Oracle Notification Server (OPMN) Local
Ports used by OPMN  can be verified from /gc_inst/WebTierIH1
/config /OPMN/opmn/opmn.xml:



Modify the opmn.xml to use free ports as below:
1. Stop OMS
2. Take a backup of the existing opmn.xml and ports.prop in the / gc_inst/WebTierIH1/ config /OPMN/opmn directory.
3. Edit the opmn.xml file, under the element, modify the local / remote port, as necessary to the free port available and save the file.
4. Edit the ports.prop file and modify the remote / local port parameters as necessary and save the file.
5. Start the OMS
6703
6200 - 6201
Oracle Notification Server (OPMN) Remote
Ports used by OPMN  can be verified from /gc_inst/WebTierIH1
/config/OPMN/opmn/opmn.xml:



Modify the opmn.xml to use free ports as below:
1. Stop OMS
2. Take a backup of the existing opmn.xml and ports.prop in the /gc_inst/WebTierIH1/ config/OPMN/opmn directory.
3. Edit the opmn.xml file, under the element, modify the local / remote port, as necessary to the free port available and save the file.
4. Edit the ports.prop file and modify the remote / local port parameters as necessary and save the file.
5. Start the OMS

Optional

These ports required only if certain components are to be used and firewall/ACL changes may be needed.

Default Port
Range
Component
Usage
Modify
443

Secure web connection (https - 443) to updates.oracle.com support.oracle.com
ccr.oracle.com
login.oracle.com
aru-akam.oracle.com
Outgoing from OMS used for online communication with Oracle for OCM, MOS, Patching, Self-Updates, ASR
Proxy settings defined via the UI (Setup -> Proxy Settings)
Do not use the OMS parameters!  
51099

Application Dependency and Performance RMI Registry Port
ADP
Configured during installation
55003

Application Dependency and Performance Java Provider Port
ADP
Configured during installation
55000

Application Dependency and Performance Remote Service Controller Port
ADP
Configured during installation
4210

Listen
ADP
Configured during installation
4211

SSL Listen Port
ADP
Configured during installation
3800

JVM Managed Server Listen
JVM
Configured during installation
3801

JVM Managed Server SSL Listen
JVM
Configured during installation
9701
9701-49152
BI Publisher HTTP
BI Publisher
During install can modify with configureBIP script.  Post-install can be modified per Note 1524248.1
9702
9701-49152
BI Publisher HTTP SSL Port
BI Publisher
During install can modify with configureBIP script.  Post-install can be modified per Note 1524248.1

Monday, October 7, 2013

Joy of Giving Week: Being Celebrated By Akshaya Patra Foundation To Feed The Children

As part of its social commitments to the broader community, the Enterprise Manager Blog is proud to carry the following message from one of it's favourite charities, Akshaya Patra, which feeds hungry little school children in India.


The Joy of Giving week  is celebrated between 2nd and 8th October to mark the happiness behind giving a little of what you already have. There’s no joy in this world equivalent to that of sharing with someone who is really in need. Millions of people in the world, especially children in India need our help to make their life worthwhile.  Hence, it is important to emphasise the Joy of Donating for a cause like this.


The great poet, Kahlil Gibran once said, “I slept and I dreamed that life is all joy. I woke and I saw that life is all service. I served and I saw that service is joy.” Although this statement was made in the two centuries ago, it holds good even in today’s situation. The added advantage is that people in this century need not visit a certain place to donate. They can experience the joy of giving online! It takes just a click of the mouse to donate for children. Making donations for children is the ultimate way to experience the true joy of giving. Moreover, it takes a very small sum of monetary support to make a child’s life.

In order to donate for children in India, one has to understand the grave importance of donations for children. According to reliable sources, 400 million children live in India, which is the highest recorded child population in the world. Of these, more than 200 million are malnourished. About 50 per cent of the children in the age group of 6 to 18, an approximate total of 8.1 million children in India don’t attend school since they are subjected to child labour since they come from families below poverty line. They go to sleep on an empty stomach every night. These are the children who need our constant support to give them the liberty to dream and to make sure they never give up on those dreams. Just one donation from each of this country’s citizens who are earning enough for a living, will help each of these children go to school, where they deserve to be.
There are a large number of charities that dedicatedly work for the joy of children. But these charities also depend on contributions made by responsible citizens who are leading a comfortable life. Be it monetary or in kind, it’s when you give that you experience the true joy of giving. The main purpose of a donation for children is to strengthen their base at a young age so as to motivate them to build a future for themselves in this society. After all, the country’s future depends on their future.


Hence, the need of the hour is to create awareness about the importance of donations for children as much as possible and increase the number of individual and corporate donors to make sure that these children get good education and nutrition.


Step forward,  donate for children and experience the joy of giving.

Indian Rupee donations are via https://www.akshayapatra.org/onlinedonations = only 750 Rs to  feed one child a school lunch for the whole year.

Foreign Currency donations are via https://www.foodforeducation.org/donate = only 15 USD to feed one child a school lunch for the whole year.

Disclaimer

Opinions expressed in this blog are entirely the opinions of the writers of this blog, and do not reflect the position of Oracle corporation. No responsiblity will be taken for any resulting effects if any of the instructions or notes in the blog are followed. It is at the reader's own risk and liability.

Blog Archive