breaking into the unknown…

browser not laoding any wab page

Leave a comment

Recently, I get into strange problem, none of the browser I have on my ubuntu system: – firefox, chrome, internet explorer loading any of the web page, not even get loaded. I tried to ping google from terminal but still no result. This problem generally occur if your internet conection is down. But my internet is up as I can see the connection icon up there on Right hand side of my system, Infact I can login to skype and chat with my friends. So, No doubt the problem is not with the Internet connection. Then what the hell going on here…..???

I uninstalled and installed back firefox, but issue remain same. Looking back, I realised that, everything is working when I left the office in night, so it must have to do something with VPN connection I was using last night, may be it is the culprit. Finally, I got the solution by googling for hours

SOLUTION: delete etc/resolv.conf file and create it back. restarting the browser will solve the problem

You better backup the file before deleting it as you may need to see  it back if someone has made some custom change to this and want you to restore the things back.

arun@arun-yadav:~$ sudo su – # you need to be root user to edit file in etc
[sudo] password for arun: #your password
root@arun-yadav:~# cd /etc/ # moved to etc folder
root@arun-yadav:/etc# cat resolv.conf # let us see the content of this file
root@arun-yadav:/etc# rm resolv.conf # delete the file
root@arun-yadav:/etc# touch resolv.conf # create the file again
root@arun-yadav:/etc# cat resolv.conf # try to see the content after running the browser, it is empty.

Recently, I am on a system with Ubuntu 15.1 . Here resolv.conf is not a normal file but a symlink file pointing to /run/resolvconf/resolv.conf , so unlike older version, here after deleting the /etc/resolv.conf file we need to recreate as symlink pointing to /run/resolvconf/resolv.conf .

root@arun-yadav:/etc# ln -s  /run/resolvconf/resolv.conf resolv.conf

If the problem still exist, check the content of /etc/hosts file. In my case, it look as below.

# BEGIN hosts added by Network Connect
# END hosts added by Network Connect       localhost       rorexpert

You can see at top that, added by Network connect. It get deleted automatically when you logout of VPN, since you didn’t logged out and shut down the system or the VPN crashed, the above line failed to delete. So delete them, so that it look as below       localhost       rorexpert

Now restart the network with below command.

sudo /etc/init.d/networking restart

close the browser and start it again. It will work now .


PROBLEM : Internet up skype working but browser not laoding any wab page
The content of resolv.conf file is getting added by juniper, which provide VPN(virtual private network) for the financial website Iam working on. When I started juniper and again see the file, I see the both entry again.
root@arun-yadav:/etc# cat resolv.conf

Now, I logout of the juniper and try to see this file again

root@arun-yadav:/etc# cat resolv.conf #it print nothing

I read about resolv.conf file here and try to make some sense of the problem with which I was pulling my hair.I do not know exactly, but can make out below explanation:

when you request a page say,Then name server (often known as DNS) on your system will resolve to its IP address. generally, if nothing specified in resolv.conf file, the nameserver will be assumed to be that of localhost running at port 53. But, if you define it in resolv.conf file,it will be regarded as nameserver for your system, Infact If you give multiple nameserver in resolv.conf file, they will be tried in that order i,e If first nameserver not able to resolve the url into IP, the next nameserver in the list will try. So, you should mention the most reliable nameserver at top.

Below, is my system nameserver before loging in to juniper VPN and after login to it

arun@arun-yadav:~/Projects/third-pillar$ nslookup localhost # not logedin to VPN, so my DNS is at my localhost port 53 i,e

Non-authoritative answer:
Name:    localhost

arun@arun-yadav:~/Projects/third-pillar$ nslookup localhost # loged in to VPN and so DNS get changed

Non-authoritative answer:
Name:    localhost

Now above we have seen that, when we start juniper it introduce a nameserver in resolv.conf file and when we logout of it, the entry also get removed. But, last night I switched off the system without loging out of juniper, so the entry get remained there. Now, in morning, when I start to access any web page, it is trying to use DNS of juniper, which will obviously not work as Iam not connected to it, Nor I can connect as juniper url will itself not get resolved. It resulted in deadlock which get removed only by deleting the etc/resolv.conf file and recreating it.

Anyway….Thank God it get sorted out🙂

Author: arunyadav4u

over 7 years experience in web development with Ruby on Rails.Involved in all stage of development lifecycle : requirement gathering, planing, coding, deployment & Knowledge transfer. I can adept to any situation, mixup very easily with people & can be a great friend.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s