First use the following command to check whether the port number is enabled
sudo netstat -ntlp
If you don’t find the port number you want to connect to, go to core-site.xml to see if you have this port number.
I don’t deserve 8020. I haven’t been connected with 8020 for a long time.
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop131:9820</value>
</property>
You can change the port number of the connection to your own