Network connection problem

Hello.

I am new to manjaro and I am using kde version. For a while it was ok. But suddenly (maybe after some updates) I have had network problems that I can't open any website from my browser but I can ping by ip address. I think there is a dns server problem. I tried to edit /etc/resolv.conf file and add dns server manually. It was an empty file and after writing that I want to save it (by an editor) I get this error "Error writing /etc/resolv.conf: no such file or directory". But when I run ls command in /etc folder I can see resolv.conf file. I don't know how to solve the problem.

I will appreciate a lot if anyone can help me.

Hi and Welcome,
Whilst I am no technician I can advise that you search in the forum for how to provide information so you can be helped effectively.
Post more detail and you will get better help.

Find the network connection icon in your panel, right click and select "Configure Network Connections", then go to the "IPv4" tab and set the DNS server there.

If you have multiple connections then pick the right one first.

As for the no such directory error, did you mistype the path?

Not sure what editor you're using, but if you weren't in / and you typed sudo nano etc/resolv.conf, that would explain it, as $PWD/etc presumably wouldn't exist.

Thanks, but I have already set the dns from "configure network connections" but it didn't help.
About the folder address yes I am typing correctly. I went to /etc folder and typed "sudo nano resolv.conf" and after writing into this file, I get "no such file or directory" error.

Thank you very much. Ok I will try to explain more.

Might be a silly question but did you try disconnecting and reconnecting?

If that doesn't do it then maybe try assigning your IP etc statically/manually. Don't forget to reconnect.

What DNS server are you trying to use?

Nano will create the file if it doesn't exist, but it will give that error if there's no directory to put it in. :confused:

Did you accidentally delete /etc first. :grin:

What does it say before you try to save?

Yes, I restarted Network Manager and also tried to assign up address manually and these didn't help. I tried these DNS servers: 1.1.1.1, 8.8.8.8, 8.8.4.4

No /etc isn't deleted. When I try to edit it with nano, it opens an empty file and after writing into it and trying to save it, I get the error saying "error writing ...".

I was only joking about deleting /etc :slight_smile:

Ok, so can you edit any other files? Can you use another editor?

Sounds like maybe a bad update. Did it get interrupted? Any errors? If it was just the networking I'd say try another kernel, if you do it might be a good idea to have a live USB just in case, at least if you've not rebooted since (sounds like maybe you have, but I don't know).

Maybe someone else can step in, it's late here and I'm tired.

Same problem here. I have two Manjaro KDE desktop. Network connection is not working.

  • Networkmanager is started
  • Network adaptor is installed.

Can anyone show me how to troubleshoot ?

Thanks

Thank you very much! And sorry for the late reply. Yes I can create and edit another file but not resolv.conf! Yes I can use other editor like vi. But for the file resolv.conf I can't still edit it and I get "no such file or directory" error when trying to write and save data.

I'm not sure but I think it's because of some updates.

I don't know exactly how to do this. But I think yes I had rebooted my system.

Thank you very much for taking your time. :smiley:

You're welcome :slight_smile: although I suspect you may need someone with more knowledge and experience.

/etc/resolv.conf is owned by the package filesystem, so maybe try reinstalling that.

If the update was interrupted then you may have corrupted something, you could try reinstalling the last update, and/or reverting it. To find out what got updated you can view /var/log/pacman.log.

The package files are in /var/cache/pacman/pkg, you can list all the packages for something with ls | grep something. You can install a local package with sudo pacman -U package, if you're not in the package directory then you'll need the absolute path. Probably teaching a grandmother to suck eggs atm, but just in case. :slight_smile:

Reinstalling all packages is probably overkill (or useless), but it is easier than reinstalling the update manually. Will take some time, I mention it in case you have trouble with reinstalling the update.

pacman -Qqn | sudo pacman -S -

List the installed kernels.
mhwd-kernel -li

List the available kernels.
mhwd-kernel -l

Install kernel 4.19
mhwd-kernel -i linux419

If none of that helps you may need a reinstall, unless someone more knowledgeable comes along with an answer. I don't know the cause so I'm not sure if a reinstall will be helpful, at least once you update.

For any further troubleshooting, the output of these commands may be useful inxi -Fxxxx --no-host, mhwd-kernel -li. Look through your logs to see if there are any errors relating to networking or the filesystem/storage etc. The post I linked to may help.

@ertan Read the link I posted above and start a thread of your own.

Thank you very much for your complete answer and information :grinning::pray:. I will use this information to solve my problem, if I can do it. But one problem is that since I can't open any webpage I can't also install or update anything. So I maybe need to use a live USB for doing that.

Thanks again. :grinning: I will try and inform you about the results.

That's why I included the stuff about the package cache and installing local packages, I forgot to mention the need to chroot from a live USB for the kernels, my bad.

manjaro-chroot -a

It seems there are a few others with network problems after updating, I still don't know the details, I have been a little busy and haven't encountered it myself.
There may be threads with better information, so search the forum.

Thanks again for your help.
I looked at my log file and it is like this for last few days:

[2020-04-08T02:18:57+0200] [PAMAC] synchronizing package lists
[2020-04-08T02:19:47+0200] [PAMAC] synchronizing package lists
[2020-04-08T02:23:21+0200] [PACMAN] Running 'pacman -U networkmanager-1.16.0-1-x86_64.pkg.tar.xz'
[2020-04-08T02:23:44+0200] [PACMAN] Running 'pacman -U networkmanager-1.16.0-1-x86_64.pkg.tar.zst'
[2020-04-08T02:24:27+0200] [PACMAN] Running 'pacman -Syu networkmanager-1.16.0-1-x86_64.pkg.tar.zst'
[2020-04-08T02:24:27+0200] [PACMAN] synchronizing package lists
[2020-04-08T02:24:36+0200] [PACMAN] Running 'pacman -Syu networkmanager-1.16.0-1-x86_64.pkg.tar.zst'
[2020-04-08T02:24:36+0200] [PACMAN] synchronizing package lists
[2020-04-08T02:24:42+0200] [PACMAN] Running 'pacman -Syu networkmanager'
[2020-04-08T02:24:42+0200] [PACMAN] synchronizing package lists
[2020-04-08T02:25:51+0200] [PAMAC] synchronizing package lists
[2020-04-08T02:56:42+0200] [PACMAN] Running 'pacman -S networkmanager'
[2020-04-08T02:56:45+0200] [ALPM] transaction started
[2020-04-08T02:56:45+0200] [ALPM] reinstalled networkmanager (1.22.10-1)
[2020-04-08T02:56:45+0200] [ALPM-SCRIPTLET] ldconfig: File /usr/lib/libpyglib-2.0-python2.so.0.0.0 is empty, not checked.
[2020-04-08T02:56:45+0200] [ALPM-SCRIPTLET] ldconfig: File /usr/lib/libpyglib-2.0-python2.so.0 is empty, not checked.
[2020-04-08T02:56:46+0200] [ALPM-SCRIPTLET] ldconfig: File /usr/lib/libpyglib-2.0-python2.so is empty, not checked.
[2020-04-08T02:56:46+0200] [ALPM] transaction completed
[2020-04-08T02:56:46+0200] [ALPM] running '30-systemd-daemon-reload.hook'...
[2020-04-08T02:56:46+0200] [ALPM] running '30-systemd-udev-reload.hook'...
[2020-04-08T02:56:46+0200] [ALPM] running '30-systemd-update.hook'...
[2020-04-08T02:56:46+0200] [ALPM] running 'dbus-reload.hook'...
[2020-04-08T02:57:20+0200] [PACMAN] Running 'pacman -U networkmanager-1.16.0-1'
[2020-04-08T02:57:27+0200] [PACMAN] Running 'pacman -Syu networkmanager-1.16.0-1'
[2020-04-08T02:57:27+0200] [PACMAN] synchronizing package lists
[2020-04-08T03:00:03+0200] [PAMAC] synchronizing package lists
[2020-04-08T03:00:25+0200] [PAMAC] synchronizing package lists
[2020-04-08T03:01:24+0200] [PACMAN] Running 'pacman -Syu networkmanager-1.16.0-1'
[2020-04-08T03:01:24+0200] [PACMAN] synchronizing package lists
[2020-04-08T03:01:35+0200] [PACMAN] Running 'pacman -Sy networkmanager-1.16.0-1'
[2020-04-08T03:01:35+0200] [PACMAN] synchronizing package lists
[2020-04-08T03:01:42+0200] [PACMAN] Running 'pacman -U networkmanager-1.16.0-1'
[2020-04-08T03:03:14+0200] [PAMAC] synchronizing package lists
[2020-04-08T03:03:30+0200] [PAMAC] synchronizing package lists
[2020-04-08T03:03:52+0200] [PAMAC] synchronizing package lists
[2020-04-08T10:51:55+0200] [PACMAN] Running 'pacman -S host'
[2020-04-08T20:02:44+0200] [PACMAN] Running 'pacman -Syu'
[2020-04-08T20:02:44+0200] [PACMAN] synchronizing package lists
[2020-04-09T11:38:02+0200] [PACMAN] Running 'pacman -Syu'
[2020-04-09T11:38:02+0200] [PACMAN] synchronizing package lists
[2020-04-09T11:39:47+0200] [PACMAN] Running 'pacman -Syu'
[2020-04-09T11:39:47+0200] [PACMAN] synchronizing package lists
[2020-04-09T11:42:24+0200] [PACMAN] Running 'pacman -Syyu'
[2020-04-09T11:42:24+0200] [PACMAN] synchronizing package lists
[2020-04-09T11:48:03+0200] [PACMAN] Running 'pacman -Syu'
[2020-04-09T11:48:03+0200] [PACMAN] synchronizing package lists
[2020-04-09T11:54:19+0200] [PACMAN] Running 'pacman -Syu'
[2020-04-09T11:54:19+0200] [PACMAN] synchronizing package lists
[2020-04-10T00:50:37+0200] [PAMAC] synchronizing package lists
[2020-04-10T00:51:01+0200] [PAMAC] synchronizing package lists

It seems it's network manager problem. After going to /var/cache/pacman/pkg and installing networkmanager package, my terminal is like this:

[manjaro pkg]# sudo pacman -U networkmanager-1.22.10-1-x86_64.pkg.tar.zst
loading packages...
warning: networkmanager-1.22.10-1 is up to date -- reinstalling
resolving dependencies...
error: could not open file /var/lib/pacman/local/python-3.8.2-1/desc: No such file or directory
looking for conflicting packages...

Packages (1) networkmanager-1.22.10-1

Total Installed Size:  15.36 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [###################] 100%
(1/1) checking package integrity                   [###################] 100%
(1/1) loading package files                        [###################] 100%
(1/1) checking for file conflicts                  [###################] 100%
(1/1) checking available disk space                [###################] 100%
:: Processing package changes...
(1/1) reinstalling networkmanager                  [###################] 100%
ldconfig: File /usr/lib/libpyglib-2.0-python2.so.0.0.0 is empty, not checked.
ldconfig: File /usr/lib/libpyglib-2.0-python2.so.0 is empty, not checked.
ldconfig: File /usr/lib/libpyglib-2.0-python2.so is empty, not checked.
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
  Skipped: Current root is not booted.
(2/4) Reloading device manager configuration...
  Skipped: Device manager is not running.
(3/4) Arming ConditionNeedsUpdate...
(4/4) Reloading system bus configuration...
  Skipped: Current root is not booted.

I don't know what to do exactly.
Thank you very much again.

Also when I enter the chroot command it shows this message:

[manjaro@manjaro ~]$ manjaro-chroot -a
==> Detected systems:
 --> 0) Windows
 --> 1) ManjaroLinux
==> Select system to mount [0-1] : 
1
==> Mounting (ManjaroLinux) [/dev/sda9]
 --> mount: [/mnt]
 --> mount: [/mnt/boot]
 --> mount: [/mnt/home]
mount: /mnt/etc/resolv.conf: mount point is a symbolic link to nowhere.

Apparently there is a problem with resolv.conf file.
Thanks again.

ls -la /etc

We already knew there was a problem, what I didn't realise was that it may be a broken symlink :man_facepalming: , that would explain the issues writing to the file. In my defense, I never felt the urge to write to a broken link till today, at least not that I remember. Replace it with a normal file and try Network Manager again.

sudo rm /etc/resolv.conf
sudo touch /etc/resolv.conf

Do you use color with ls?

alias ls="ls --color=always"

@drunkenmonkey Thank you very much for your help and I am really sorry for replying this much late..

I did this but the problem wasn't solved.
Actually my Linux has some other errors except this and sometimes after my Linux boots I get this kind of error:

Configuration file /.config/... not writable.
Please contact your system administrator.

So I don't know exactly what to do..
Thank you again for your help.

Just reinstall, sometimes it's the best way. If you haven't got a separate home partition then backup up your data first.

Think about backing up your system (ie /), timeshift is often used for this, that way if something like this happens then you can just restore from backup.

Yes I think reinstalling is the best solution.

Thank you for your advice. Yes I must use this..

Thanks a lot for your assistance.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by