K
K
karpo5182020-01-09 02:14:17
Nginx
karpo518, 2020-01-09 02:14:17

How to check the performance of allocated ip-addresses on a web server?

There is an iron web-server with two additional dedicated ip-addresses. After restarting the server, nginx refused to start, swearing at additional ip addresses like this:

emerg]: bind() to IP x.x.x.x failed (99: Cannot assign requested address)

Having discovered the problem, I quickly replaced the ip addresses in the host configs with the main ip address of the server and restarted nginx. The sites are up and running. I contacted the data center TP to solve the problem. ip addresses were not pinged. I decided that regardless of whether the server is configured correctly or incorrectly, ip addresses should be pinged. But they told me that on my server, something inside is configured incorrectly.
I returned the old ip addresses to the config and got rid of the error with the net.ipv4.ip_nonlocal_bind = 1 line in /etc/sysctl.conf
Nginx started up, but sites on additional ip addresses stopped opening. Browser writes:
This site can’t be reached 
site.ru is unreachable.
ERR_ADDRESS_UNREACHABLE

The problem is that I did not configure anything on the server. Those. did not perform any action that could lead to a breakdown. Now you need to either prove to the TP the presence of a hardware problem on the server, or diagnose and solve the problem in the server software. How to do it?
So, the a-record of the domain points to an additional dedicated ip-address, it is also selected for the domain in the VESTACP panel and registered in the nginx config, but the site can't be reached. What does it mean? If you choose the main ip-address, then the site works correctly.
Server: Ubuntu 16.04 + VESTACP + NGINX + PHP-FPM

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AUser0, 2020-01-16
@karpo518

karpo518 , there was a manual intervention , because you yourself saw additional addresses registered in the '/etc/network/interfaces' file. Who registered them there is another question, I can’t do it here.
Why did it stop working? Here I can. Ubuntu has once again been updated, and netplan has become the main network configuration utility (although who did not ask him about it?). And since the additional addresses were written non-standard, in separate entries, the migration script from one configuration to another could not correctly recognize / transfer them, so they were lost / disconnected. Voila!
PS I wrote that it would be possible to mark the answer as a solution.

A
Alexey Dmitriev, 2020-01-09
@SignFinder

Of course, all ip addresses must be configured in the settings of the network or network cards.
Are there additional addresses in the output of the ifconfig command?

K
karpo518, 2020-01-16
@karpo518

With the help of AUser0 :
1) I found a comment in /etc/networks/interfaces that the network configuration files are in the /etc/netplan folder.
2) The /etc/netplan file contains the 01-netcfg.yaml file and found the following code:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eno2:
      accept-ra: false
      addresses: [ a.b.c.d/24 ]
      gateway4: m.n.o.p
      nameservers:
          search: [ worldstream.nl ]
          addresses:
              - "s.t.u.v"
              - "w.x.y.z"

3) Replaced the line "addresses: [ abcd/24 ]" with "addresses: [ abcd/24, efgh/24, ijkl/24 ]", where:
abcd is the main address of the
efgh server and ijkl are additional ip addresses that are not worked because they were missing in this line
4) Executed the netplan apply command as root on the server
After completing the steps, the ip addresses appeared in the output of the ip a command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question