Software & AppsOperating SystemLinux

Fixing NetPlan Error in Ubuntu 21.10: “object has no attribute ‘state'”

Ubuntu 3

In this article, we will address a common issue that users face after upgrading to Ubuntu 21.10, specifically when working with NetPlan. The error message “‘netplanapply’ object has no attribute ‘state'” appears when trying to apply a new network setup using the “netplan try” command. This error can be frustrating as it prevents the application of new network configurations. However, there are a few potential solutions to this problem that we’ll explore in this guide.

Quick Answer

Using the "netplan apply" command instead of "netplan try" can help resolve the "object has no attribute ‘state’" error in NetPlan on Ubuntu 21.10. However, it’s important to note that this workaround may disrupt your network connection if there are any configuration issues. Reporting the bug to the Ubuntu team is also recommended for a more permanent solution.

Understanding the Issue

NetPlan is a utility for easily configuring networking on a Linux system. You can use it to configure network interfaces, as well as to set up more advanced features like VPNs or tunnels. When you attempt to apply a new network setup with the “netplan try” command, you may encounter the error message “‘netplanapply’ object has no attribute ‘state'”. This error seems to occur regardless of your configuration, even when using the default NetPlan config file.

Possible Solutions

Using the “netplan apply” command

One workaround for this error is to use the “netplan apply” command instead of “netplan try”. The “netplan apply” command applies the current NetPlan configuration to the system immediately. It does not have a safety period like “netplan try”, which allows you to confirm the changes before they are permanently applied.

Here’s how you can use it:

sudo netplan apply

Please note that if there are any issues with your network configuration, using “netplan apply” could potentially disrupt your network connection. It’s always a good idea to double-check your configuration before using this command.

Reporting the Bug

Since this error has been reported by multiple users, it is likely a bug in NetPlan. In such cases, it’s a good idea to file a bug report. Ubuntu uses Launchpad to track bugs, and you can report this issue there.

When reporting a bug, make sure to include as much information as possible, such as your Ubuntu version, NetPlan version, and the exact steps you took before encountering the error. This will help the developers to diagnose and fix the issue more effectively.


While the “‘netplanapply’ object has no attribute ‘state'” error can be quite frustrating, there are ways to work around it. Using the “netplan apply” command can be a quick fix, though it does come with its own risks. Reporting the bug to the Ubuntu team can also help to get the issue resolved in future updates.

Remember, when working with system configurations, always double-check your changes and ensure you have a backup of your original settings. This will help you to avoid any potential disruptions or loss of connectivity. We hope this guide has been helpful in resolving your NetPlan error in Ubuntu 21.10.

Can I downgrade to a previous version of NetPlan to avoid this error?

Downgrading NetPlan is not recommended as it may introduce compatibility issues with other system components. It’s best to follow the solutions mentioned in this guide or wait for a fix from the Ubuntu team.

Is there a specific release of Ubuntu 21.10 that is affected by this error?

This error has been reported by users across different releases of Ubuntu 21.10. It seems to be a general issue rather than specific to a particular release.

Can I use an alternative network configuration tool instead of NetPlan?

NetPlan is the default network configuration tool in Ubuntu, and it’s recommended to use it for consistency and compatibility. While there are alternative tools available, they may require additional configuration and may not be fully supported by Ubuntu.

Will using “netplan apply” overwrite my existing network configuration?

No, using the "netplan apply" command will not overwrite your existing network configuration. It will only apply the changes specified in the NetPlan configuration file. However, it’s always a good idea to have a backup of your original configuration in case any issues arise.

How can I check my NetPlan version?

You can check your NetPlan version by running the following command in the terminal:

netplan --version

This will display the version of NetPlan installed on your system.

Leave a Comment

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