当前位置:网站首页>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 .
边栏推荐
- 真香,自从用了Charles,Fiddler已经被我彻底卸载了
- \w和[A-Za-z0-9_],\d和[0-9]等价吗?
- 记一次List对象遍历及float类型判断大小
- Codeforces Round #717 (Div. 2)
- How to do function test well? Are you sure you don't want to know?
- [LeetCode]186. 翻转字符串里的单词 II
- Crontab scheduled task common commands
- [LeetCode]30. Concatenate substrings of all words
- Codeforces Round #716 (Div. 2)
- Acwing week 57 longest continuous subsequence - (binary or tree array)
猜你喜欢

Secret script of test case design without leakage -- module test

Exclusive interview with millions of annual salary. What should developers do if they don't fix bugs?

使用Fiddler模拟弱网测试(2G/3G)

Stm32f107+lan8720a use stm32subemx to configure network connection +tcp master-slave +udp app

管理系统-ITclub(下)

I think I should start writing my own blog.

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

Go from introduction to practice - error mechanism (note)
![\w和[A-Za-z0-9_],\d和[0-9]等价吗?](/img/96/2649c9cf95b06887b57fd8af2d41c2.png)
\w和[A-Za-z0-9_],\d和[0-9]等价吗?

关于davwa的SQL注入时报错:Illegal mix of collations for operation ‘UNION‘原因剖析与验证
随机推荐
Login credentials (cookie+session and token token)
深度学习又有新坑了!悉尼大学提出全新跨模态任务,用文本指导图像进行抠图
扁平数组和JSON树的转换
Bean paste green protects your eyes
畅游动态规划之区间DP
crontab定时任务常用命令
This set of steps for performance testing using JMeter includes two salary increases and one promotion
Record a list object traversal and determine the size of the float type
Read write separation master-slave replication of MySQL
如何做好功能测试?你确定不想知道吗?
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
Go from introduction to actual combat - execute only once (note)
[sword offer ii] sword finger offer II 029 Sorted circular linked list
[MySQL practice] query statement demonstration
Selenium上传文件有多少种方式?不信你有我全!
【MySQL】数据库函数通关教程下篇(窗口函数专题)
[LeetCode]30. 串联所有单词的子串
It smells good. Since I used Charles, Fiddler has been completely uninstalled by me
Codeforces Round #717 (Div. 2)
[LeetCode]100. 相同的树