Saturday, October 24, 2015

"Some Settings are managed by your System Administrator" Windows Proxy or LAN Setting Issue

Not able to disable or change Windows Proxy Setting. A yellow bar is showing in internet options window with  message Some Settings are managed by your System Administrator

Solution : 
Please open registry with regedit.exe command & go to below location

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\
CurrentVersion\Internet Settings

There is a setting "ProxySettingsPerUser"

And it was set to 0 (Disabled). Change the value to 1 & the issue will resolved. The yellow warning bar disappeared and you can adjust the proxy setting and make it stick. 

Friday, July 24, 2015

Google.com Not Working - Redirects to IPV6 address in Squid (Centos)

Sometime I noticed that google is not working in my network. After checking logs it was noticed that squid is forwarding the requests to IPV6 address of google

1437666658.051  60298 172.XXX.XXX.XX TCP_MISS/503 0 CONNECT clients4.google.com:443 - DIRECT/2a00:1450:4001:805::1003
1437666660.121  60292 172.XXX.XXX.XX TCP_MISS/503 0 CONNECT clients2.google.com:443 - DIRECT/2a00:1450:4001:805::1004

To fix this issue first disable IPV6 from your linux machine with below commands

In /etc/sysctl.conf change/create entries:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

In /etc/sysconfig/network change/create entries:

NETWORKING_IPV6=no
IPV6INIT=no

service ip6tables stop
chkconfig ip6tables off

& finally run this command
echo "install ipv6 /bin/true" > /etc/modprobe.d/ipv6_disabled.conf


Restart you PC & add below rules in squid.conf file. Restart squid & your issue will resolved
tcp_outgoing_address <Your Server IP> all
dns_v4_first on

Friday, July 17, 2015

[Solved] VMWare Workstation 10 stopped working after upgrading to Centos 6.6

After upgrading to Centos 6.6 My Vmware-workstation stopped working & showing below error while running any virtual machine

Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.

On terminal vmware status showing below errors & modules not loaded

[root@bhagwat vmware-root]# /etc/init.d/vmware start
Starting VMware services:
   Virtual machine monitor                                 [FAILED]
   Virtual machine communication interface                 [  OK  ]
   VM communication interface socket family                [  OK  ]
   Blocking file system                                    [  OK  ]
   Virtual ethernet                                        [  OK  ]
   VMware Authentication Daemon                            [  OK  ]

[root@bhagwat vmware-root]# /etc/init.d/vmware status
Module vmmon not loaded
Module vmnet not loaded

Solution 
Solution is very simple just run below commands

/etc/init.d/vmware stop

rm /lib/modules/$(uname -r)/misc/vmmon.ko

vmware-modconfig --console --build-mod vmmon /usr/bin/gcc /lib/modules/$(uname -r)/build/include/

sudo depmod -a

/etc/init.d/vmware start

& Done..... Your issue is resolved.

Saturday, July 11, 2015

"SOLVED" How to fix Error "No module named yum"

Many time after upgrading your OS or any package you are getting this error while running any command with yum
############################
[root@bhagwat ~]# yum clean all
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Jan 21 2015, 16:18:50)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]
#############################
This is related with python version of your system. You may have many versions of python installed in your PC & only one of them has the yum library installed.

SOLUTION - 
Run the below command - It will show the current python path (In my case it is working with python 2.7)
[root@bhagwat yum.repos.d]# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 24 Jan 13 15:55 /usr/bin/python -> /usr/local/bin/python2.7

Check the python version available at your /usr/bin
[root@bhagwat]# /usr/bin/python
python       python2      python2.6    python2.6.6  python-pip

For each of your python version run below command

/usr/bin/python2.x
You'll get a python prompt. Run:

>>> import yum

Do this for every python binary until you find one that doesn't raise an ImportError at this step.
[root@bhagwat yum.repos.d]# /usr/bin/python2.6
Python 2.6.6 (r266:84292, Jan 22 2014, 09:37:14)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>>

Now, run as root:

ln -s /usr/bin/python2.6 /usr/bin/python

& Done....Your Issue is resolved

In case you are getting error "ln: creating symbolic link `/usr/bin/python': File exists"
Just run the below command
[root@bhagwat bin]# mv /usr/bin/python /usr/bin/python-origin
-----------------------------
[root@bhagwat bin]# ln -s /usr/bin/python2.6 /usr/bin/python

Monday, March 30, 2015

Fixed "nf_conntrack: table full, dropping packet" Error in Centos


Getting frequent errors with my Linux machine related with nf_conntrack: table full.
Logs showed in tail -f /var/log/messages

Mar 30 10:48:06 bhagwatpc kernel: nf_conntrack: table full, dropping packet.
Mar 30 10:48:09 bhagwatpc kernel: nf_conntrack: table full, dropping packet.
Mar 30 10:48:10 imclproxy kernel: nf_conntrack: table full, dropping packet.






To fix the error please follow the below steps in Centos 6

To print current limit type:
# sysctl net.nf_conntrack_max
Output:65536

To increase this limit to e.g. 100000, type:
# sysctl -w net.nf_conntrack_max=100000

To make this settings permanent add the following line to /etc/sysctl.conf file:
net.nf_conntrack_max = 100000

The following will tell you how many sessions are open right now:
# wc -l /proc/net/nf_conntrack


Thats it. Thanks

Thursday, January 22, 2015

How to Get CPU & RAM info in Linux


For CPU

1. cat /proc/cpuinfo for complete details
2. To get no. of processors/cores run below command

cat /proc/cpuinfo | grep processor | wc -l




For RAM
1. cat /proc/meminfo (for complete details)
2. free -m (currently installed & used RAM)

To find RAM slots & installed memory type below command

dmidecode | grep -A 8 'Memory'

you will see below outout. There are 2 slots available & RAM installed at both slots. Please check No. of devices & Memory Device for more info

[root@bhagwat ~]# dmidecode | grep -A 8 'Memory'
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 16 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x0040, DMI type 4, 42 bytes
Processor Information
    Socket Designation: SOCKET 1155
--
        MTRR (Memory type range registers)
        PGE (Page global enable)
        MCA (Machine check architecture)
        CMOV (Conditional move instruction supported)
        PAT (Page attribute table)
        PSE-36 (36-bit page size extension)
        CLFSH (CLFLUSH instruction supported)
        DS (Debug store)
        ACPI (ACPI supported)
--
Memory Device
    Array Handle: 0x003F
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: None
    Locator: ChannelA-DIMM0
--
Memory Device Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x0007FFFFFFF
    Range Size: 2 GB
    Physical Device Handle: 0x0041
    Memory Array Mapped Address Handle: 0x0045
    Partition Row Position: Unknown
    Interleave Position: 1
    Interleaved Data Depth: 1

Handle 0x0043, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x003F
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: None
    Locator: ChannelB-DIMM0
--
Memory Device Mapped Address
    Starting Address: 0x00080000000
    Ending Address: 0x000FFFFFFFF
    Range Size: 2 GB
    Physical Device Handle: 0x0043
    Memory Array Mapped Address Handle: 0x0045
    Partition Row Position: Unknown
    Interleave Position: 2
    Interleaved Data Depth: 1

Handle 0x0045, DMI type 19, 31 bytes
Memory Array Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x000FFFFFFFF
    Range Size: 4 GB
    Physical Array Handle: 0x003F
    Partition Width: 2

Handle 0x0047, DMI type 131, 64 bytes
OEM-specific Type

Note
You can also run dmidecode -t 17 for type of RAM (DDR2/DDR3) & manufacturer.

Thursday, January 1, 2015

Edit Hosts File in Windows 8 or 8.1 With Single Command

There are so many posts on internet to edit hosts file in Windows 8,1 but none of the method worked for me.

I found a very easy way to edit the hosts file

Please run Command Prompt with Administrator privileged & run following command

attrib -r %WINDIR%\system32\drivers\etc\hosts

& that's it. Open the hosts file with your desired editor & change the file

Enjoy.....:)

Please share your comments if it's worked for you