Setup the DNS on a setup - AD-EYE/AD-EYE_Core GitHub Wiki
Errors caused by the lack of proper DNS on a setup
-
In Matlab, when you run
rosinit('name_of_the_linux_computer')
, the following error happens:Cannot connect to ROS master at http://lenovo-laptop:11311. Check the specified address or hostname.
-
In the Linux terminal, after connecting Matlab, this message is displayed:
Couldn't find an AF_INET address for [DESKTOP-GN0SSH]
Step to resolve the issue
Find IPv4 address and computers name
- On Linux, write
ifconfig
in a terminal to prompt the IPv4 address. - The name of the Linux computer is written in the terminal. If you want to change it, follow this step: https://gits-15.sys.kth.se/AD-EYE/AD-EYE_Core/wiki/Configure-PC-name-and-user-account
- On windows, write
ipconfig
in a terminal to prompt the IPv4 address. - The name of the windows computer can be found by typing
name
in the search box of windows 10.
Setup on Linux
- In the file /etc/hosts, make sure the Windows computer name is linked with the windows IPv4 address. You can edit the file with the command
sudo gedit /etc/hosts
. For example:130.237.57.121 DESKTOP-GN0SSH
Setup on windows
- In the file
C:\Windows\System32\drivers\etc\hosts
, make sure the Linux computer name is linked with the Linux IPv4 address. For example:130.237.57.244 linux-computer
. You need administrator's rights to edit the file.