Caused by: java.net.NoRouteToHostException: No route to host

后端 未结 1 1040
感动是毒
感动是毒 2021-01-22 15:40

I am trying to deploy my Jersey project from eclipse on openshift and I am getting this error in the tail files Caused by: java.net.NoRouteToHostException: No route to hos

相关标签:
1条回答
  • 2021-01-22 16:01

    Your MySQL is not listening on TCP/IP and hence your attempt to connect is failing. You sort of answered your question when you said:

    I checked whether some of the port 8080, 3306 are being used from my local mashine but they are just being used from eclipse.

    In other words, MySQL is not listening on localhost. To confirm this another way, try connecting to MySQL from the command prompt:

    mysql -u adminNMccsBr -h 127.10.230.440 -p YOUR_DB_NAME
    

    I expect this to fail. The solution to your problem is to configure MySQL to listen on localhost. In the /etc/my.cnf config file, under the [mysqld] line, add the following:

    bind-address = 127.10.230.440
    

    This is not a Java problem, it's a MySQL problem.

    0 讨论(0)
提交回复
热议问题