Fresh installation of virtualmin, IP problem

4 posts / 0 new
Last post
#1 Wed, 07/17/2019 - 04:25
szkhost

Fresh installation of virtualmin, IP problem

Good day all,

I have installed Virtualmin on a VPS, and have the following error after install: First of all the installer does not detect the IP address of primary interface:

Device "link" does not exist.
[WARNING] Unable to determine the IP address of the primary interface.
Please enter the name of your primary network interface:

When I enter the device manually, for example, "venet0", I get the error message:

[WARNING] Unable to determine the IP address of the primary interface.
Please enter the name of your primary network interface:
venet0:0
./slib.sh: line 450: log_debugPrimary address detected as 127.0.0.1: command not found

So the problems are: -the detected IP is local 127.0.0.1 , not the real IP of the VPS. Virtualmin is accessible, and everything works, but I want to make sure this does not cause problems in the future. -as you can see there is an error in ./slib.sh: line 450 that issues a "command not found".

I tried reading the install.sh script, but I did not find the code that deals with IP detection. I saw on the forums that other users have this problem too, but I did not see a clear solution.

I am using a clean Centos 7 with all the latest updates installed. The VPS is virtualized with OpenVZ.

The output of network devices is:

ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
    link/void
[root@srv ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/void
    inet 127.0.0.1/32 scope host venet0
    inet XXXXXXXXXXXXXX brd XXXXXXXXXXXXXXX scope global venet0:0
    inet6 XXXXXXXXXXXXXX scope global
       valid_lft forever preferred_lft forever

A suggestion would be greatly appreciated.

Thank you

Wed, 07/17/2019 - 05:58
noisemarine

Tell the installer that the interface is venet0:0. As you can see from your 'ip a' output, venet0 is the loopback interface. Issuing 'ifconfig' should show this a little more clearly.

Fri, 07/19/2019 - 00:54
szkhost

Hello,

I tried setting the network interface venet0:0 , and other devices, but the IP (127.0.0.1) is still showing after the installation is complete:

Device "link" does not exist.
[WARNING] Unable to determine IP address of a primary interface.
Please enter the name of your primary network interface:
venet0:0
./slib.sh: line 450: log_debugPrimary address detected as 127.0.0.1: command not found
[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready
[SUCCESS] to configure at https://srv.webmindemo.tk:10000 (or https://127.0.0.1:10000).
[SUCCESS] You'll receive a security warning in your browser on your first visit.

However, the correct IP is shown in the Webmin interface

System hostname srv.webmindemo.net (xxx.xxx.xxx.xxx) Operating system CentOS Linux 7.6.1810
Webmin version 1.900
Usermin version 1.751
Virtualmin version 6.06 Authentic theme version 19.21
Time on system Friday, July 19, 2019 5:46 AM

I just want to make sure this does not cause problems in the future when the VPS will be in production.

Sat, 07/20/2019 - 01:51
noisemarine

Some VPS providers occasionally have non-optimal default settings after spinning up the instance.

Can you please check your /etc/hosts to make sure things look correct? Usually you should have something like:

127.0.0.1 localhost.localdomain localhost # ipv4 loopback. Shouldn't have hostname/FQDN information.
x.x.x.x   hostname.yourdomain.com   hostname # public ipv4 address. Your FQDN and hostname.
::1             localhost ip6-localhost ip6-loopback # ipv6 loopback. Shouldn't have hostname/FQDN information.
xxxx:xxx:x:x::xxx hostname.yourdomain.com  hostname  # public ipv6 address. Your FQDN and hostname.

Your https://srv.webmindemo.tk:10000 (or https://127.0.0.1:10000) line above is making me think something isn't resolving properly. If the installer thinks you should be visiting the loopback IP address, I'd expect it to say https://localhost:10000  (or https://127.0.0.1:10000) there rather than the name you have.

Topic locked