当前位置:网站首页>Solve the problem that the virtual machine cannot be connected locally
Solve the problem that the virtual machine cannot be connected locally
2022-06-27 22:21:00 【Lilianac】
Find the problem
( Record the problem that the virtual machine cannot be connected locally ) Originally, I wanted to open it in my local browser hadoop0 Of hdfs Website , But I can't get in , But in the browser of the virtual machine, you can go in , So I opened cmd ping The following virtual machines , Connection timeout :

I found it through Baidu , There is a problem with the gateway , use first ipconfig -all Command to view the local computer gateway address :
Gateway of virtual machine :
The local gateway is inconsistent with the virtual machine gateway , Now let's change the virtual machine address , Shut down the virtual machine first , I 'm on my own IP The address is 192.168.168.117
solve the problem
1. Modify the IP Address Open the virtual network editor of the virtual machine





2. modify Windows Of IP Address
Turn on the Internet and Internet



3. modify /etc/sysconfig/network-scripts/ifcfg-ens33 file
After these steps , Turn on the virtual machine , Input ifconfig, There was no ens33 Of ip Address , Only appeared. lo:

It was found that it was /etc/sysconfig/network-scripts/ifcfg-ens33 There's something wrong with the document , I was giving this before master The node is configured with static ip, Enter the command :vi /etc/sysconfig/network-scripts/ifcfg-ens33

Take these IP Change the address , It is the same as that configured in the virtual network editor IP The address is consistent , Then save to exit , Restart the network card , Input service NetworkManager stop, Then input service NetworkManager start Complete restart , Then type... Again ifconfig It just shows up ens33 La
My virtual machine CentOS 8, The commands found to restart the gateway are basically service network restart perhaps service network-manager restart, But I have been reporting :
Redirecting to /bin/systemctl start network-manager.service
Failed to start network-manager.service: Unit network-manager.service not found.
Such a mistake , Input nmcli c reload perhaps nmcli networking off perhaps nmcli networking on Orders like that , So it is networkmanager No startup error , Finally, I found the above two commands to restart the network card

Problem solving
Try whether you can ping Same as virtual machine IP

Ook , Problem solved , Last IP The address has been changed , stay /etc/hosts In the document IP It shall also be modified accordingly , also C:\Windows\System32\drivers\etc Configured in the file ip It should also be modified accordingly , If configured , Prevent mistakes in subsequent learning .
边栏推荐
- mysql 大于 小于 等于符号的表示方法
- Record a list object traversal and determine the size of the float type
- Use Fiddler to simulate weak network test (2g/3g)
- MYSQL和MongoDB的分析
- [LeetCode]513. Find the value in the lower left corner of the tree
- Read write separation master-slave replication of MySQL
- How many ways does selenium upload files? I don't believe you have me all!
- qt base64加解密
- Acwing week 57 longest continuous subsequence - (binary or tree array)
- 使用sqlite3语句后出现省略号 ... 的解决方法
猜你喜欢

Go from introduction to actual combat - task cancellation (note)

The create database of gbase 8A takes a long time to query and is suspected to be stuck

单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~

Management system itclub (medium)

Use Fiddler to simulate weak network test (2g/3g)

Simulink method for exporting FMU model files

AQS SOS AQS with me

登录凭证(cookie+session和Token令牌)

Test birds with an annual salary of 50w+ are using this: JMeter script development -- extension function

对话乔心昱:用户是魏牌的产品经理,零焦虑定义豪华
随机推荐
Yarn performance tuning of CDH cluster
读写分离-Mysql的主从复制
北京邮电大学|用于成本和延迟敏感的虚拟网络功能放置和路由的多智能体深度强化学习
[LeetCode]572. 另一棵树的子树
我想我要开始写我自己的博客了。
软件缺陷管理——测试人员必会
[LeetCode]186. Flip word II in string
Read write separation master-slave replication of MySQL
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
Beijing University of Posts and Telecommunications - multi-agent deep reinforcement learning for cost and delay sensitive virtual network function placement and routing
石子合并问题分析
Gbase 8A method for reducing the impact on the system by controlling resource usage through concurrency during node replacement of V8 version
STM32F107+LAN8720A使用STM32cubeMX配置网络连接+tcp主从机+UDP app
VMware virtual machine PE startup
Interview question 3 of software test commonly used by large factories (with answers)
Windwos 8.1系统安装vmware tool插件报错的解决方法
宏任务、微任务理解
MONTHS_BETWEEN函数使用
Record a list object traversal and determine the size of the float type
Common problems encountered by burp Suite