A properly running Neutron service will launch several Linux processes. When troubleshooting, you will want to make sure that all services are configured correctly and are running actively. If you run pgrep –l neutron
, you should see a list of Neutron services, as shown in the following screenshot:
Depending on how you have deployed Neutron, the services listed in the preceding screenshot may be spread across multiple servers. For example, your neutron-server processes may be running on your controller node, all of the agents may be on your Network node, and your Compute nodes may also be running some of the agents.
To confirm that all the agents are running as expected, you can execute the neutron agent-list command. The output of this will look similar to what is shown in the following screenshot:
When the agent is up and running, the alive
column will have :-)
, and when the agent is not alive, the value will be xxx
. If an agent is not alive and you are expecting it to be, you can attempt to start the agent. On Ubuntu, utilizing an Upstart script would be as simple as running start neutron-openvswitch
or the equivalent of whichever agent you wanted to start. You can also attempt to start the agent manually by running the following command or the equivalent of the agent you are targeting:
sudo -u neutron neutron-openvswitch-agent --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ml2/ml2_conf.ini --log-file=/var/log/neutron/openvswitch-agent.log
Attempting to start the agent this way will allow you to see any errors that may be thrown on the startup, allowing you to troubleshoot agent startup issues.
A good place to start is by having a look at the Neutron logs. By default, the neutron log files are located at the /var/log/neutron/
directory. However, the log file location can be overridden. You can determine where Neutron is logging by looking at the Neutron processes. Run the ps –aux | grep
command and look for the value in the --log-file
attribute. You can also check the settings for log_dir
in the neutron.conf
file.
In the Neutron log directory, there should be several log files, one for the Neutron server, one for neutron-ns-metadata-proxy
, and one for each of the agents. It's worth noting that if you do not see logs for a particular service, it may be a sign that the service hasn't started properly. The following is an example of what your neutron log directory might look like:
It's good practice to check each log for errors, paying special attention to the timestamps. For example, we may start to examine the server.log file by running this:
less /var/log/neutron/server.log | grep ERROR
Execute this command for each file in the Neutron log directory and investigate each error in turn. You may also want to enable verbose logging when troubleshooting. To enable verbose logging for Neutron, you will want to set verbose to True
in the /etc/neutron/neutron.conf
file.
In the following section, we will work through some common networking problems, providing tips to identify and correct these issues.