Monday, 13 April 2015

Cent OS 6.5 issue" -bash: /usr/bin/nslookup: No such file or directory"

Today I installed Cent OS 6.5 with minimal packages so that installation will get complete very soon.
After completion of installation of os I need to check some DNS base issue on that.
To troubleshoot that issue I need to run command "nslookp" command
But when I tried to run nslookup command it was not working


[root@Test1 ~]# nslookup google.com
-bash: nslookup: command not found
[root@Test1 ~]# /usr/bin/nslookup google.com
-bash: /usr/bin/nslookup: No such file or directory
[root@Test1 ~]#

So I got confused what to for this basic command, which rpm I should install so that nslookup command will work

Then I configure yum repository and installed bind-utils rpm.

[root@Test1 ~]# yum install bind-utils

After installation nslookup command worked.

[root@vcs1 rhel6_x86_64]# rpm -qi bind-utils
Name        : bind-utils                   Relocations: (not relocatable)
Version     : 9.8.2                             Vendor: CentOS
Release     : 0.17.rc1.el6_4.6              Build Date: Tue 27 Aug 2013 09:25:53 PM IST
Install Date: Mon 13 Apr 2015 06:24:31 PM IST      Build Host: c6b9.bsys.dev.centos.org
Group       : Applications/System           Source RPM: bind-9.8.2-0.17.rc1.el6_4.6.src.rpm
Size        : 448511                           License: ISC
Signature   : RSA/SHA1, Tue 27 Aug 2013 11:26:23 PM IST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.isc.org/products/BIND/
Summary     : Utilities for querying DNS name servers
Description :
Bind-utils contains a collection of utilities for querying DNS (Domain
Name System) name servers to find out information about Internet
hosts. These tools will provide you with the IP addresses for given
host names, as well as other information about registered domains and
network addresses.

You should install bind-utils if you need to get information from DNS name
servers.


I hope if you face same issue on CentOS this post will helpful to you resolve the issue.



Saturday, 28 March 2015

Weblogic application error "The server has not found anything matching the Request-URI"

When  I tried to access one of my application which is deployed on weblogic.
Everything working fine network connection and speed as well. Application access without any kind of error.

But day after tomorrow when I tried to access that application unable to access, I started to check basic requirement to access that application. No issue found everything working fine except that application, even I deleted cache and cookies of browser and finally restarted my computer. But still no solution. It gives me continuosly same error which is:

"
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address."

 Image of error that is captured below:

To resolve this issue I contact my  team members related to that application, DB admiin replied only they have reset password of DB account. Not sure that was changed on weblogic console's connection pool configuration or not. After reseting DB user accounts password I make activate changes on weblogic console.

Then I tried to access that application, It worked !!!!
There are so many reason related to this error, But I have posted here the solution that worked for me.
If you are facing some related issue hope will resolve your issue as well.




Friday, 12 July 2013

Cisco vpn client issue Reason 442: Failed to Enable Virtual Adapter on Windows 7

If you have installed Cisco VPN client in windows 7, an you are facing Cisco VPN Client error message "Reason 442: Failed to enable Virtual Adapter". Then this post will help out to troubleshoot that issue.




To get rid out of this error message follow below given steps.

1. Click the start button and type "services.msc' and Enter as shown:




2. Find “Cisco Systems, Inc. VPN Service" and stop it.
3. Now find "Internet Connection Sharing (ICS) Service" stop and make it disabled.
4. Now start "Cisco Systems, Inc. VPN Service"


Now check again Cisco VPN client.
It works for me and will work for you too.


Cisco vpn client issue Reason 442: Failed to Enable Virtual Adapter on Windows 8 32/64 bit



On windows 8 (32 or 64 bit version) Cisco Systems VPN Client Version 5.0.07.0440 installation is successful. I didn't find any error during cisco vpn client installation.

But After Importing vpn profile when I tried to connect, It ask me for username and password (Authentication started). After filling those credentials I got message "Securing communications channel" at the bottom of the Cisco VPN Client application. I thought that it is working, but after some time got windows pop up message according to that message "Reason 442: Failed To Enable Virtual Adaptor"

I tried to login 3-4 times but get same error, even I restarted my computer but issue not resolved.
After applying below given steps I am able to get connect Cisco VPN Client.


 To resolve this issue I followed below given steps:

1. Press Win [Windows key] + R on your keyboard, type “regedit.exe” (without the quotes) and hit “OK”:










Note: Before making any changes in registry please take backup of Registry.

2.Browse to the Registry Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA
3. From the window on the right, select and right-click on DisplayName and choose Modify from the menu. Alternatively, double-click on DisplayName:



4. If you are running Windows 8 32bit (x86) operating systems, change the value data from @oem8.inf,%CVirtA_Desc%;Cisco Systems VPN Adapter to Cisco Systems VPN Adapter.
And If you are running  Windows 8 64bit (x64) operating systems, change the value data from @oem8.inf,%CVirtA_Desc%;Cisco Systems VPN Adapter for 64-bit Windows to Cisco Systems VPN Adapter for 64-bit Windows (shown below):


 After editing the Value data, click on OK and close the Registry Editor.
Try to get connect Cisco VPN Client and connect to your VPN network. it worked for me after authentication.Restart not required after changing Registry.

Monday, 24 June 2013

Installation of Apache Tomcat on Linux



Tomcat is a java development web server.
Prerequisites for tomcat:
1.  Java Development kit (JDK)
Installation of JDK On Linux:
First download jdk as a compressed file from internet. We have used jdk-1_5_0_03-linux-i586.bin file for installing jdk on fedora core 7.
Create a directory called java under / and download jdk-1_5_0_03-linux-i586.bin in it.
# mkdir  /java
# cd java
The downloaded file is a text file, so change it to executable using chmod.
# chmod +x jdk-1_5_0_03-linux-i586.bin
# ./ jdk-1_5_0_03-linux-i586.bin
This will execute the above file and ask for accepting license agreement. Enter “yes” to install the jdk. Hence a directory jdk1.5.0_03 will be created.
Now edit the file /etc/profile using vi editor to enter below lines.
export JAVA_HOME=/java/jdk1.5.0_03
******************************************************************************
Installing Tomcat
Create a directory “tomcat” under / and download the Jakarta-tomcat-4.1.12.tar.gz in it.
# mkdir  /tomcat
# cd  /tomcat
# wget http://archive .apache.org/dist/tomcat/tomcat-4/archive/v4.1.12/bin/jakarta-tomcat-4.1.12.tar.gz
# tar -xzvf  Jakarta-tomcat-4.1.12.tar.gz
This will create a directory jakarta-tomcat-4.1.12
# cd  Jakarta-tomcat-4.1.12
# cd bin
# ./startup.sh
This will start the tomcat (similarly use ./shutdown.sh to stop tomcat)
Test the tomcat by http://localhost:8080/ in the browser.
The tomcat web page will be displayed if tomcat is installed successfully.
******************************************************************************
Managing Tomcat using web admin tool
There is a directory “conf” in the /tomcat/jakarta-tomcat-4.1.12 folder which contains file called “tomcat-users.xml.
Edit this file to enter a new role by the name of “admin” and then adding a new user with admin role. This user will thus become the administrator of tomcat.
<role rolename=”admin” description=”tomcat administrator”/>
<user username=”test” password=”secure” roles=”admin”/>
Now open the tomcat webpage using http://localhost:8080 and then in the left side of the page navigate to “Tomcat Administration” and click it. This will ask for username & password. Enter the username as “test” and password “secure” to log on as administrator.
******************************************************************************

web filtering using squid proxy server



Squid proxy server is a web caching server for providing controlled internet access to users in an organization.
First Download & install squid
# yum install squid
Prerequisites for Installing SquidGuard
BerkeleyDB.4.6 or previous is required so download it.
(BerkeleyDB.4.7 poses compilation problems during installing of squidGuard)
#cd /Downloads
# tar –xzvf <db tar file>
# cd <db file name>
# cd build_unix
# ../dist/configure
# make
# make install
# echo /usr/local/BerkeleyDB.4.6/lib >> /etc/ld.so.conf
# ldconfig
Hence Berkeley Database if now installed.
Download squidGuard-1.4.tar.gz Untar the tar file
# tar -xzvf squidGuard-1.4.tar.gz
# cd squidGuard-1.4
# ./configure
# make
# make install
Hence squidGuard is now installed in /usr/local/squidGuard directory which contains db & log directories along with squidGuard.conf file.
Under /Downloads directory download blacklists .tar.gz file from squidGuard site and move it to the /usr/local/squidGuard/db directory and untar the blacklist.tar.gz file.
db directory is the database of the blacklists. The blacklists directory holds the various categories of blacklists like drugs, ads,audio-video etc
Edit the squidGuard.conf file to make following changes.
*****************************************************************************************
dest drugs
{ 
domainlist      /blacklists/drugs/domains
urllist          /blacklists/drugs/urls
}
acl {
      default {
                 pass !drugs  all
                 redirect http://192.168.10.222/cgi-bin/squidGuard-simple.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u


                  }
    }
**************************************************************************************
Save and exit the file.
The above redirector redirects the blocked sites to the blocked.html page in the /var/www/html directory which contains html code .
Verify the squidGuard working using the below command:
# squidGuard  -d
Above command checks the squidGuard.conf file and outputs the wether squidGuard is successfully working or not.
Squid is installed in /etc/squid directory. Edit the squid.conf file to  make following changes:
********************************************************************************************************
acl my_network src 192.168.10.0/24
http_access allow my_network
http_port 3128
#  url_rewrite_program
redirect_program   /usr/local/bin/squidGuard
 *******************************************************************************************************
Save and exit the file
Restart the squid
# service squid restart
Now on the client's computer open up the browser and in the connection  settings enter the proxy server's ip and port i.e 192.168.10.222 & 3128
Hence now the client can access the internet via squid only. Open up www.whatismyip.com on client's computer  which which will display the proxy server details.
SquidGuard CGI Scripts
Copy the squidGuard-simple.cgi file from the /Downloads/squidGuard-1.4/samples directory and place it in /var/www/cgi-bin
# chown -R squid:squid squidGuard-simple.cgi  (Change ownership permissions)
Check wether the squidGuard-simple.cgi script runs by entering the following url in the web browser:
Note: By deafult Apache does not allow cgi scripts to run. Hence uncomment the following from the httpd.conf file in /etc/httpd/conf/ directory.


#AddHandler cgi-script .cgi

to
 AddHandler cgi-script .cgi


The default squidGuard.cgi file in /samples directory of squidGuard does not seem to work when placed in /var/www/cgi-bin directory. So we use squidGuard-simple.cgi file in the same directory and copy it in cgi-bin directory of Apache.
Change the redirect rule in squiduard.conf file to give the full path name of the squidGuard-simple.cgi file.

*************************************************************************************

Note: Change the ownership of the db ,log directories and squidGuard.conf  to be of the user squid & group squid.
# chown  -R squid:squid db
# chown  -R squid:squid log
# chown  -R squid:squid  squidGuard.conf
Also the permissions of the squidGuard-simple.cgi file in /var/www/cgi-bin directory should be chmodded to 0755.
# chmod 0755 squidGuard-simple.cgi