In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the "jar package startup failure prompt java Name or service not known solution" related knowledge, in the actual case operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
I found that I could not start the jar package when I used the startup script of the written jar package on a machine in the production environment. Then I used the java command to start the jar package separately. The following error occurred
Root@aly-gz-web-1:/etc/init.d# java-Dfile.encoding=UTF-8-Xmx2048M\-Dcom.sun.management.jmxremote\-Dcom.sun.management.jmxremote.port=30113\-Dcom.sun.management.jmxremote.authenticate=false\-Dcom.sun.management.jmxremote.ssl=false\-jar / data/appdata/kjyl_1000020/kjly.jarError: Exception thrown by the agent: java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: aly-gz-web-1: aly-gz -web-1: Name or service not known this error is caused because the server cannot find the ip corresponding to the current hostname
Then I went to check the local / etc/hosts file and found that there was a problem with the mapping between the public network IP of the machine and the hostname of the machine in the hosts file, and then modified it to normal, as follows:
# Editing / etc/hosts file vim / etc/hosts# with problem 154.188.27.71 aly-gz-web-100# modified (correct hostname) 154.188.27.71 aly-gz-web-1
Finally, the jar package startup script is executed and started successfully.
Root@aly-gz-web-1:/etc/init.d# / etc/init.d/kjyl_1000020 start {"changed": true, "changes": "kjyl_1000020 start Success"} "jar package startup failure prompt java Name or service not known solution" content here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.