Skip to content
www.mytechnote.ru
Menu
  • Administration
    • Scripts
  • Equipment
    • Reviews
    • Instructions
  • Other
  • English
    • English
    • Русский
Menu

Solving the ‘failed to open statefile /var/run/network/ifstate: No such file or directory’ Error on a Debian Server

When your Debian server throws network issues, especially after a restart, it can bring operations to a halt. A common error that many administrators face, after commands ifup eth0 or /etc/init.d/networking restart  is:

failed to open statefile /var/run/ network/ifstate: No such file or directory

This issue, while common, can be quite vexing as it directly affects the server’s connectivity. But there’s hope! I’ve grappled with this error and have found the way out. Here’s a detailed guide to restoring your network and putting this problem behind you.

The crux of this issue often lies in the missing /var/run/network directory and the /var/run/network/ifstate file. You might think that manually creating these would solve the problem (and using ifup -a does restore the network momentarily), but they vanish after every reboot.

To fix this for good, a tweak to the /etc/init.d/networking file is needed. Right after the line stating start), introduce:

start)

[ -d /var/run/network ] || mkdir /var/run/network

[ -f /var/run/network/ifstate ] || touch /var/run/network/ifstate

Once incorporated, your server’s networking should work seamlessly.

In my quest for answers, I also stumbled upon suggestions to delete either /etc/udev/rules.d/85-ifupdown.rules or /lib/udev/rules.d/85-ifupdown.rules. However, in my scenario, neither of these files existed.

Posted on 07.09.201730.05.2024 by sanglyb

Post navigation

← How to Flash Samsung Galaxy Tab 2 with Stock Firmware: Step-by-Step Guide
How to Quickly Delete All MySQL Databases →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Подписывайтесь

Youtube
vk
telegram
github
twitter
rss
  • Форум
  • Об авторе
  • Поддержать автора

Популярные записи

Новые записи

  • How to Extend an LVM Partition in Linux
  • SCCM Reporting Errors After Migrating from SQL Server 2016 to 2019
  • Problem Using PassFiltEx on Older CPUs
  • How to remove attachments from old calendar events in Exchange using a script
  • How to download and install Office 2024 LTSC

Архивы

  • 2026 (3)
  • 2025 (5)
  • 2024 (7)
  • 2023 (30)
  • 2022 (4)
  • 2020 (17)
  • 2017 (82)
  • 2016 (5)
© 2015-2026 www.mytechnote.ru
Использование материалов сайта возможно только с разрешения владельца или обязательна индексируемая, прямая, передающая вес ссылка на материал.