Wednesday, August 7, 2019

Testlink installation On Linux

TestLink is a web application.It provides a private website to an individual or a set of requested users belonging to the same company/project. TestLink can be run at the server side.
TestLink is a PHP based application and supports all OS platforms such as Windows, Linux of different versions, MAC, etc.

System requirements:

Browser
TestLink supports all famous browsers such as Chrome, IE, Mozilla, and Safari.

PHP 
The web server should support PHP. It can be installed as CGI or any other integration technology. It is recommended to use 5.3.8 PHP version.

Mandatory PHP Extensions
Extensions for RDBMS are mysqli, pgsql, oci8, sqlsrv. Mbstring is required for Unicode – UTF-8 support.

Web Server
TestLink supports Apache 2.2.2.1 and Later Versions. Currently installed version is Apache/2.4.39.

Database server
MySQL 10.4.6-MariaDB

Operating systems
Linux x86-64 bit.

Download Required Softwares:

Go to site and Click Win/Mac/Linux

https://bitnami.com/stack/testlink


It displays Download links for testlink stack and click Download for Linux 64-bit


Testlink file downloaded like this with version "bitnami-testlink-1.9.19-6-linux-x64-installer.run"

Give executable permission 

chmod 755 bitnami-testlink-1.9.19-6-linux-x64-installer.run


Installation:

Run software like below


It will pop up with GUI installation


Click OK


Click Next


Click Next


Check installation location and Click Next


Provide Requested details and Click Next


Select Apache port (in my case already 80 in use) and Click Next


Select Apache SSL port (in my case already 443 in use) and Click Next


Select Mysql port (in my case already 3306 in use) and Click Next


Select radio button if you want mail support otherwise deselect and Click Next


Provide mail id , password and Click Next


Untick radio button and Click Next


Click Next to Install Testlink


It will take 10-15 min  to installation


Click Finish. It Displays Testlink stack, we can manage mysql and Apache from console.


Now Testlink installation Completed Successfully. Page looks like below.

Testlink url in our case;

localhot:81/testlink



Wednesday, July 24, 2019

Agilefant installation On Linux

System requirements:

Browser
Agilefant is developed and tested using Firefox, Chrome, Opera and Safari also work well. Microsoft Internet Explorer has many serious problems with Agilefant.

Java
Need 7 (1.7) or later.

J2EE-server
Tomcat 7 or later recommended.

Database server
MySQL 5 (with InnoDB engine) is required. Agilefant is developed and tested on MySQL 5.5.

Operating systems
Linux x86-64 bit.

Download Required Softwares:

Java - jdk-8u161-linux-x64.tar.gz
Tomcat - apache-tomcat-8.0.48.tar.gz
Mysql - mysql  Ver 15.1 Distrib 10.4.6-MariaDB, for Linux (x86_64) using readline 5.1
Agilefant - https://sourceforge.net/projects/agilefant/files/latest/download (Latest Version)

Install Java and Tomcat:

[apache@oracle Apache]$ gtar -xzf jdk-8u161-linux-x64.tar.gz

Edit .bash_profile and add below lines

export JAVA_HOME=/u01/Apache/jdk1.8.0_161
export JRE_HOME=/u01/Apache/jdk1.8.0_161/jre
export PATH=$PATH:/u01/Apache/jdk1.8.0_161/bin:/u01/Apache/jdk1.8.0_161/jre/bin

Untar Tomcat

[apache@oracle Apache]$ gtar -xzf apache-tomcat-8.0.48.tar.gz

Start tomcat and verify services


Create the database for the Agilefant instance in MySQL

[root@oracle ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2418
Server version: 10.4.6-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| bugs               |
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.000 sec)

MariaDB [(none)]> create database agilefant;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| agilefant          |
| bugs               |
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
5 rows in set (0.000 sec)

MariaDB [(none)]> grant all on agilefant.* to agilefant@localhost identified by '<password>';
Query OK, 0 rows affected (0.210 sec)

MariaDB [(none)]> exit;
Bye

Deploy Agilefant in Tomcat:

Deploy agilefant.war by either copying it to [Tomcat path]/webapps/ or use Tomcat Manager

Copy agilefant.war to webapps and restart tomcat services
./shutdown.sh
./startup.sh

Will get error in catalina.out file
SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8080]]
 org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]]

Edit [Tomcat path]/webapps/agilefant/WEB-INF/agilefant.conf

change password to the password created previously

password = "agilefant" to password = "<created password>"

Test that the Agilefant works at address localhost:8080/agilefant

Default username is 'admin' and password is 'secret'.



Thursday, July 4, 2019

Install Bugzilla Bug Tracking System On RHEL 7


Bugzilla is an open-source tool used to track bugs and issues of a project or a software. It is widely used as a bug-reporting tool for all types of testing functions.

Prerequisites:


Before installing the Bugzilla first we have to ensure that all packages are up to date

#yum update –y

#yum install epel-release yum-utils –y

Install LAMP Stack:

[root@hrms ~]# yum install httpd mariadb mariadb-server httpd-devel mod_ssl mod_ssl mod_perl mod_perl-devel mariadb-devel php-mysql gcc gcc-c++ graphviz graphviz-devel patchutils gd gd-devel wget perl* -y

Install  1175 Packages (+68 Dependent packages)

Almost 1300 packages will be installed

Start the Apache and MariaDB services and enable them to start on boot

sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Database Configuration:

[root@hrms lib]# mysql --version
mysql  Ver 15.1 Distrib 10.4.6-MariaDB, for Linux (x86_64) using readline 5.1

[bugz@hrms ~]$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Database and User Creation:

[root@hrms ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 18
Server version: 10.4.6-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE bugs;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> CREATE USER 'bugs'@'localhost' IDENTIFIED BY '<password>';
Query OK, 0 rows affected (0.076 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY '<password>' WITH GRANT OPTION;
Query OK, 0 rows affected (0.027 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit;
Bye

Change Configuration:

Edit /etc/my.cnf and add below configurations

[mysqld]
# Allow packets up to 16M
max_allowed_packet=16M

# Allow small words in full-text indexes
ft_min_word_len=2

sudo systemctl restart mariadb

Install Bugzilla:

Download the latest version of the Bugzilla with the wget :

wget http://ftp.mozilla.org/pub/webtools/bugzilla-5.0.6.tar.gz

Once the download is complete, extract the downloaded archive with the gtar command:

gtar -xvzf bugzilla-5.0.6.tar.gz

Move the extracted directory into the Apache web root directory:

sudo mv bugzilla-5.0.6 /var/www/html/bugzilla

Set proper permissions on the bugzilla directory:

sudo chown -R apache:apache /var/www/html/bugzilla

You will also need to install all necessary Perl modules in your system.

Change into the bugzilla directory:

cd /var/www/html/bugzilla/

Install all the required Perl modules with the following command:

sudo /usr/bin/perl install-module.pl --all

Once installation is complete, you need to run checksetup.pl perl script. It will create localconfig file.

You will need to edit localconfig file:

vi /var/www/html/bugzilla/localconfig

Change the file as shown below:

$db_host = 'localhost';
$db_name = '<your dbname>';
$db_user = '<dbuser>';
$db_pass = '<dbpassword>';
$db_port = 3306

Save and close the file when you are finished.

Re-Run the checksetup.pl perl script to install Bugzilla:

cd /var/www/html/bugzilla/
sudo ./checksetup.pl

[bugz@hrms bugzilla]$ sudo ./checksetup.pl
* This is Bugzilla 5.0.6 on perl 5.16.3
* Running on Linux 4.1.12-124.28.5.el7uek.x86_64 #2 SMP Thu Jun 20 12:00:04 PDT 2019

Checking perl modules...
Checking for               CGI.pm (v3.51)     ok: found v3.63
Checking for           Digest-SHA (any)       ok: found v5.85
Checking for             TimeDate (v2.23)     ok: found v2.24
Checking for             DateTime (v0.75)     ok: found v1.04
Checking for    DateTime-TimeZone (v1.64)     ok: found v1.70
Checking for                  DBI (v1.614)    ok: found v1.642
Checking for     Template-Toolkit (v2.24)     ok: found v2.24
Checking for         Email-Sender (v1.300011) ok: found v1.300031
Checking for           Email-MIME (v1.904)    ok: found v1.926
Checking for                  URI (v1.55)     ok: found v1.60
Checking for       List-MoreUtils (v0.32)     ok: found v0.33
Checking for    Math-Random-ISAAC (v1.0.1)    ok: found v1.004
Checking for              JSON-XS (v2.01)     ok: found v3.01

Checking available perl DBD modules...
Checking for               DBD-Pg (v2.7.0)    ok: found v2.19.3
Checking for            DBD-mysql (v4.001)    ok: found v4.050
Checking for           DBD-SQLite (v1.29)     ok: found v1.39
Checking for           DBD-Oracle (v1.19)     not found

The following Perl modules are optional:
Checking for                   GD (v1.20)     ok: found v2.49
Checking for                Chart (v2.4.1)    ok: found v2.4.10
Checking for          Template-GD (any)       ok: found v1.56
Checking for           GDTextUtil (any)       ok: found v0.86
Checking for              GDGraph (any)       ok: found v1.44
Checking for           MIME-tools (v5.406)    ok: found v5.505
Checking for          libwww-perl (any)       ok: found v6.05
Checking for             XML-Twig (any)       ok: found v3.44
Checking for          PatchReader (v0.9.6)    ok: found v0.9.6
Checking for            perl-ldap (any)       ok: found v0.56
Checking for          Authen-SASL (any)       ok: found v2.15
Checking for         Net-SMTP-SSL (v1.01)     ok: found v1.01
Checking for           RadiusPerl (any)       ok: found v0.26
Checking for            SOAP-Lite (v0.712)    ok: found v1.10
Checking for          XMLRPC-Lite (v0.712)    ok: found v0.717
Checking for             JSON-RPC (any)       ok: found v1.03
Checking for           Test-Taint (v1.06)     ok: found v1.06
Checking for          HTML-Parser (v3.67)     ok: found v3.71
Checking for        HTML-Scrubber (any)       ok: found v0.15
Checking for               Encode (v2.21)     ok: found v2.51
Checking for        Encode-Detect (any)       ok: found v1.01
Checking for          Email-Reply (any)       ok: found v1.203
Checking for HTML-FormatText-WithLinks (v0.13)     ok: found v0.14
Checking for          TheSchwartz (v1.07)     ok: found v1.12
Checking for       Daemon-Generic (any)       ok: found v0.85
Checking for             mod_perl (v1.999022) ok: found v2.000010
Checking for     Apache-SizeLimit (v0.96)     ok: found v0.97
Checking for        File-MimeInfo (any)       ok: found v0.21
Checking for           IO-stringy (any)       ok: found v2.110
Checking for      Cache-Memcached (any)       ok: found v1.30
Checking for  File-Copy-Recursive (any)       ok: found v0.38
Checking for           File-Which (any)       ok: found v1.09
Checking for              mod_env (any)       ok
Checking for          mod_expires (any)       ok
Checking for          mod_headers (any)       ok
Checking for          mod_rewrite (any)       ok
Checking for          mod_version (any)       ok
Reading ./localconfig...
Checking for            DBD-mysql (v4.001)    ok: found v4.050
Checking for                MySQL (v5.0.15)   ok: found v10.4.6-MariaDB

Adding new table bz_schema...
Initializing bz_schema...
Creating tables...
Converting attach_data maximum size to 100G...
Setting up choices for standard drop-down fields:
   priority bug_status rep_platform resolution bug_severity op_sys
Creating ./data directory...
Creating ./data/assets directory...
Creating ./data/attachments directory...
Creating ./data/db directory...
Creating ./data/extensions directory...
Creating ./data/mining directory...
Creating ./data/webdot directory...
Creating ./graphs directory...
Creating ./skins/custom directory...
Creating ./data/extensions/additional...
Creating ./data/mailer.testfile...
Creating ./Bugzilla/.htaccess...
Creating ./data/.htaccess...
Creating ./data/assets/.htaccess...
Creating ./data/attachments/.htaccess...
Creating ./data/webdot/.htaccess...
Creating ./graphs/.htaccess...
Creating ./lib/.htaccess...
Creating ./template/.htaccess...
Creating contrib/.htaccess...
Creating t/.htaccess...
Creating xt/.htaccess...
Precompiling templates...done.
Fixing file permissions...
Initializing "Dependency Tree Changes" email_setting ...
Initializing "Product/Component Changes" email_setting ...
Marking closed bug statuses as such...
Creating default classification 'Unclassified'...
Setting up foreign keys...
Setting up the default status workflow...
Creating default groups...
Setting up user preferences...

Looks like we don't have an administrator set up yet. Either this is
your first time using Bugzilla, or your administrator's privileges
might have accidentally been deleted.

Enter the e-mail address of the administrator: <yourmail>
Enter the real name of the administrator: <Name>
Enter a password for the administrator account:
Please retype the password to verify:
<Your mail> is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.

At the end of the script it will ask administrator setup, provide administrator mailid and password.

Comment out a line in the .htaccess file that the Bugzilla installation script created:

[bugz@hrms bugzilla]$ sudo sed -i 's/^Options -Indexes$/#Options -Indexes/g' ./.htaccess
[sudo] password for bugz:

Configure Apache For Bugzilla:

Edit Apache configuration file

sudo vi //etc/httpd/conf/httpd.conf

Add the following lines:

<VirtualHost *:80>
DocumentRoot /var/www/html/bugzilla/
</VirtualHost>
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
</Directory>

Save the file and restart httpd service for the changes to take effect:

sudo systemctl restart httpd

Allow HTTP traffic on port 80 in firewalld,  if only firewall enabled in server. You can do this by running the following commands:

sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --reload

Acess Bugzilla console:

http://<your-server-ip>


WARNING: Oracle executable binary mismatch detected.

Issue:
======
 Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Mon May 13 14:25:57 2019
WARNING: Oracle executable binary mismatch detected.
 Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages

Solution:
=========
Whenever the binary is linked or changed, you need to make sure that all instances are shutdown.
So in this case, the following action plan would fix this problem:

Shutdown the instance(Database and Applications)
Ensure that all related processes have been killed
Restart the instance (Database and Applications)

Unlock and reset AVSYS password in AVDF

[root@avs00155d0b2304 ~]# su - dvaccountmgr
Last login: Tue May 21 12:52:37 IST 2019
-bash-4.1$ sqlplus /

SQL*Plus: Release 12.1.0.2.0 Production on Tue May 21 15:14:15 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Tue May 21 2019 12:52:37 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
Advanced Analytics, Oracle Database Vault and Real Application Testing options

SQL> alter user avsys account unlock;

User altered.

SQL> alter user avsys identified by <password>;

User altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
Advanced Analytics, Oracle Database Vault and Real Application Testing options
-bash-4.1$ logout

Login with avsys user.

[root@avs00155d0b2304 ~]# su - oracle
Last login: Tue May 21 15:10:02 IST 2019 on pts/0
The Oracle base has been set to /var/lib/oracle
[oracle@avs00155d0b2304 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Tue May 21 15:15:23 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
Advanced Analytics, Oracle Database Vault and Real Application Testing options

SQL> conn avsys/<password>
Connected.

Tuesday, April 23, 2019

How to change the hostname on HP-UX

Method 1: (With Reboot)

login as root and run set_parms <hostname>

The set_parms program supposed to update ALL necessary files in server.

Take reboot for new hostname.

Method 2 : (Without Reboot)

#hostname "newname"
#uname -S "newname"
#hostanme

Above commands will change hostname Without rebooting server, but once the machine is reboot old hostname will be there.

Method 3: (Without Reboot)

#hostname "newname"
#uname -S "newname"
#update /etc/hosts and /etc/rc.config.d/netconf

Above commands will change hostname Without rebooting server, also once the machine is reboot new hostname will be there.

How to recreate Em DB console in Oracle 10gR2

Source environment and run below emca command

bash-5.0$ emca -config dbcontrol db -repos recreate

STARTED EMCA at Apr 22, 2019 11:13:17 AM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.  All rights reserved.

Enter the following information:
Database SID: <sid> Ex: orcl
Listener port number: <Port> Ex: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/OraHome_1

Local hostname ................ <hostname>
Listener port number ................ 1521
Database SID ................ <sid>
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 22, 2019 11:13:37 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/OraHome_1/cfgtoollogs/emca/<sid>/emca_2019-04-22_11-13-17-AM.log.
Apr 22, 2019 11:13:38 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 22, 2019 11:13:38 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Apr 22, 2019 11:14:05 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Apr 22, 2019 11:14:05 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Apr 22, 2019 11:15:29 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Apr 22, 2019 11:15:32 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Apr 22, 2019 11:16:12 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Apr 22, 2019 11:16:12 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Apr 22, 2019 11:17:51 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Apr 22, 2019 11:17:51 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://<hostname>:5502/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 22, 2019 11:17:51 AM

Tuesday, April 16, 2019

EM 12c/EM 13c monitoring credentials for the database in Enterprise Manager password has expired/account locked

Issue:

ORA-28001: the password has expired The Connect Descriptor was (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521))(CONNECT_DATA = (SID = <sid>)))

The error message shown above indicates that the agent is unable to monitor this database because the agent cannot logon. 
To correct this, the Monitor Password needs to match the corresponding database password for dbsnmp. 
To change both the dbsnmp database password and the Monitor Password, click the Change dbsnmp Password button. 
This operation will also unlock the dbsnmp user.












Cause:

The dbsnmp password has expired" or "ORA-28000: the account is locked"

Solution:

Method 1 -

SQL> select username, account_status from dba_users where username=’DBSNMP’;

USERNAME   ACCOUNT_STATUS
__________________________

DBSNMP       EXPIRED

SQL> alter user dbsnmp identified by <password> account unlock;

User altered.

update dbsnmp password in OEM grid control.

Method 2 -

1. Login grid control with sysman
2. Click Setup -> Manage Cloud Control -> Agents
3. Click Server name
4. Goto Monitoring -> Click Database Instance name
5. Click configure and Provide sys password
6. Change password














7. Click test connection
8. Message displays “The connection test was successful”
9. Click next
10.Submit

Enterprise Manager Database Control Configuration/Certificate issue after upgrading 10.2.0.1 to 10.2.0.5

Issue:
bash-5.0$ emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https:/hostname:1158/em/console/aboutApplication
ps: cmd is not a valid field name
Starting Oracle Enterprise Manager 10g Database Control ............................................................ failed.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/OraHome_1/<hostname_sid>/sysman/log
bash-5.0$ ./emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://hostname:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.

Checking the ORACLE_HOME\<hostname>_<SID>\sysman\log\emagent.trc, below errors can see also:

2019-04-12 10:49:29 Thread-5 ERROR http: 16: Unable to initialize ssl connection with server, aborting connection attempt
2019-04-12 10:49:29 Thread-5 ERROR command: nmejcn: failed http connection to https://hostname:1158/em/upload/: retStatus=-1
2019-04-12 10:49:30 Thread-24 ERROR upload: Error in uploadXMLFiles.  Trying again in 103.00 seconds.
2019-04-12 10:49:34 Thread-25 ERROR upload: Error in uploadXMLFiles.  Trying again in 123.00 seconds.
2019-04-12 10:49:39 Thread-28 ERROR upload: Error in uploadXMLFiles.  Trying again in 147.00 seconds.
2019-04-12 10:49:45 Thread-5 ERROR ssl: Open wallet failed, ret = 28750
2019-04-12 10:49:45 Thread-5 ERROR ssl: nmehlenv_openWallet failed

(or)

2019-04-12 12:14:18 Thread-128 ERROR ssl: nzos_Handshake failed, ret=28862
2019-04-12 12:14:18 Thread-128 ERROR http: 15: Error initializing SSL connection for incoming request, aborting request. ret=-1


Cause:
In Enterprise Manager (EM) Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol will expire on 31-Dec-2010 00:00:00. The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010.Existing Database Control configurations are not impacted by this issue.

Solution:

1. Stop database,listener and em services.
2. Download and apply patch
bash-5.0$ /u01/app/oracle/OraHome_1/OPatch/opatch apply
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/OraHome_1
Central Inventory : /u01/app/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.5.0
OUI location      : /u01/app/oracle/OraHome_1/oui
Log file location : /u01/app/oracle/OraHome_1/cfgtoollogs/opatch/opatch2019-04-12_11-34-01AM.log

Patch history file: /u01/app/oracle/OraHome_1/cfgtoollogs/opatch/opatch_history.txt

ApplySession applying interim patch '8350262' to OH '/u01/app/oracle/OraHome_1'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8350262' for restore. This might take a while...
Backing up files affected by the patch '8350262' for rollback. This might take a while...

Patching component oracle.sysman.agent.core, 10.2.0.5.0a...
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/RootCert.class"
Updating jar file "/u01/app/oracle/OraHome_1/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_java.jar/oracle/sysman/eml/sec/util/SecConstants.class"
ApplySession adding interim patch '8350262' to inventory

Verifying the update...
Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

OPatch succeeded.
bash-5.0$ /u01/app/oracle/OraHome_1/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/OraHome_1
Central Inventory : /u01/app/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.4.9
OUI version       : 10.2.0.5.0
OUI location      : /u01/app/oracle/OraHome_1/oui
Log file location : /u01/app/oracle/OraHome_1/cfgtoollogs/opatch/opatch2019-04-12_11-34-25AM.log

Patch history file: /u01/app/oracle/OraHome_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/app/oracle/OraHome_1/cfgtoollogs/opatch/lsinv/lsinventory2019-04-12_11-34-25AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 4                            10.2.0.5.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  8350262      : applied on Fri Apr 12 11:34:11 IST 2019
Unique Patch ID:  13011832
   Created on 13 Sep 2010, 14:09:12 hrs GMT
   Bugs fixed:
     8350262

--------------------------------------------------------------------------------

OPatch succeeded.

3. Start database and listener services.
4. Re-secure Database Control with the following command:
   <ORACLE_HOME>/bin/emctl secure dbconsole -reset
You will be prompted twice to confirm that the Root key must be overwritten. In both cases, enter upper-case "Y" as the response. Any other response (including lower-case "y") will cause the command to terminate without completing. If this happens, the command can be re-invoked.

bash-5.0$ emctl secure dbconsole -reset
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
http://hostname:1158/em/console/aboutApplication
Enter Enterprise Manager Root Password :
DBCONSOLE already stopped...   Done.
Agent is already stopped...   Done.
Securing dbconsole...   Started.
Checking Repository...   Done.
Checking Em Key...   Done.
Checking Repository for an existing Enterprise Manager Root Key...
WARNING! An Enterprise Manager Root Key already exists in
the Repository. This operation will replace your Enterprise
Manager Root Key.
All existing Agents that use HTTPS will need to be
reconfigured if you proceed. Do you wish to continue and
overwrite your Root Key
(Y/N) ?
Y
Are you sure ? Reset of the Enterprise Manager Root Key
will mean that you will need to reconfigure each Agent
that is associated with this OMS before they will be
able to upload any data to it. Monitoring of Targets
associated with these Agents will be unavailable until
after they are reconfigured.
(Y/N) ?
Y
Generating Enterprise Manager Root Key (this takes a minute)...   Done.
Fetching Root Certificate from the Repository...   Done.
Updating HTTPS port in emoms.properties file...   Done.
Generating Java Keystore...   Done.
Securing OMS ...   Done.
Generating Oracle Wallet Password for Agent....   Done.
Generating wallet for Agent ...    Done.
Copying the wallet for agent use...    Done.
Storing agent key in repository...   Done.
Storing agent key for agent ...   Done.
Configuring Agent...
Configuring Agent for HTTPS in DBCONSOLE mode...   Done.
EMD_URL set in /u01/app/oracle/OraHome_1/<hostname_sid>/sysman/config/emd.properties
   Done.
Configuring Key store..   Done.
Securing dbconsole...   Sucessful.

5. Re-start Database Control with the following command:

   <ORACLE_HOME>/bin/emctl start dbconsole
bash-5.0$ emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://hostname>:1158/em/console/aboutApplication
ps: cmd is not a valid field name
Starting Oracle Enterprise Manager 10g Database Control .................... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/OraHome_1/<hostname_sid>/sysman/log

6. Verify Database Control status with the following command:

bash-5.0$ emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
https://hostname:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/OraHome_1/<hostname_sid>/sysman/log