8 Replies Latest reply: Mar 14, 2012 7:54 AM by Charles Lamb RSS

    NoRouteToHostException

    915071
      Hello,
      When I deploy a plan, an exception happened:

      kv-> plan -execute -name "Deploy n03" deploy-sn 1 ip83 6000
      Exception while executing command plan: Oracle NoSQL DB 11gR2.1.2.123 oracle.kv.impl.fault.OperationFaultException: Plan 10[Deploy n03] finished in state ERROR. Problem during plan execution: Exception creating connection to: ip83; nested exception is:
      java.net.NoRouteToHostException: No route to host

      my host can ping host ip83 ,and My hosts config is
      127.0.0.1 localhost.localdomain localhost
      192.168.7.81 ip81
      192.168.7.82 ip82
      192.168.7.83 ip83

      How can I solve it ?
        • 1. Re: NoRouteToHostException
          Guy.K.Hillyer-Oracle
          One possible scenario that might explain this behavior: your Admin process is running on a different host from the one where you are typing commands, and that host has no route to ip83.

          Otherwise, if ping from the Admin host works, I can't explain it. "No Route To Host" reflects a fundamental networking issue. It is really outside the domain of NoSQL Database.
          • 2. Re: NoRouteToHostException
            Charles Lamb
            As my colleague Guy said, this is indicative of a non NoSQL Database problem with your network configuration.

            I have seen this before.

            Try

            telnet HOSTNAME port

            where port is the port you configured NoSQL Database to use (5000?) and see if that works. If you get No Route To Host, thenthe problem is in your network configuration.

            When I've seen this, the problem was with iptables on the machine. In that case, ping also worked.

            Charles Lamb
            • 3. Re: NoRouteToHostException
              Johan Louwers
              it look like I do have the same issue. situation is as follows:

              192.168.1.80 nosql0.testdomain.com
              192.168.1.81 nosql1.testdomain.com
              192.168.1.82 nosql2.testdomain.com
              192.168.1.83 nosql3.testdomain.com

              I have at this moment configured nosql0 and nosql1. nosql0 will be the admin node and I try to configure nosql1 as a storage node by making use of the web front on nosql0.

              Nosql0 is configured using:
              makebootconfig -root KVROOT -port 5000 -admin 5001 -host nosql0.testdomain.com -harange 5010,5020
              and started the kvstore.

              nosql1 is configured using:
              makebootconfig -root KVROOT -port 5000 -host nosql1.testdomain.com -harange 5010,5020
              and started the kvstore.

              On both nosql0 and nosql1 I have tested the keystore by using the kvstore jar with the options : "ping -port 5000 -host nosql0.testdomain.com" and "ping -port 5000 -host nosql1.testdomain.com". when I execute the nosql1 check on the nosql1 host I get a positive answer. As soon as I do a check for nosql1 from nosql0 I do get a noroutetohostexception error.

              Strange thing is I can ping the nosql1 from the nosql0 server and I can setup ssh sessions from nosql1 to nosql0 so network wise I do have a route from and to the host.

              I do have some strange feeling I do not have a correct configuration on nosql1 for some reason however I do not have a clue on what that could be.

              Anyone who has been battling a similar issue?

              Regards,
              Johan Louwers.
              • 4. Re: NoRouteToHostException
                Charles Lamb
                Johan,

                Did you check that iptables is not running? When I have seen this in the past, it has been a problem with that. Also, did you try telnet nosql1 5000 from nosql0? As I said, when I have seen this, ping works fine (and so does ssh), but iptables has been the problem (for port 5000).

                Charles Lamb
                • 5. Re: NoRouteToHostException
                  Johan Louwers
                  sounds like a valid point. I do not have a uplink to the test systems at this moment from my current location however I will check as soon as I am in a location where I can connect.

                  This could be a valid answer to my issue and even it is not this might be very valid for other people visiting this page looking for answers :-)

                  Not sure if iptables settings are blocking port 5000 by default on a default install of Oracle Linux however something to find out (and possibly good to mention in the oracle documentation as a point of consideration? ( hint :-) ))

                  I will let you know the outcome.


                  Regards,
                  Johan.
                  • 6. Re: NoRouteToHostException
                    Johan Louwers
                    Charles,
                    you where spot on. It turns out that it was iptables.

                    if you have a default Oracle Linux installation you will get the below iptables configuration. If you do a simple shutdown of iptables you can do the ping from the kvstore command.


                    +[root@nosql1 init.d]# ./iptables status+
                    Table: filter
                    Chain INPUT (policy ACCEPT)
                    num  target     prot opt source               destination
                    +1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED+
                    +2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0+
                    +3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0+
                    +4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22+
                    +5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited+

                    Chain FORWARD (policy ACCEPT)
                    num  target     prot opt source               destination
                    +1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited+

                    Chain OUTPUT (policy ACCEPT)
                    num  target     prot opt source               destination

                    +[root@nosql1 init.d]#+



                    Meaning you will have to create a iptables rule which will allow communication to port 5000 and you are done
                    • 7. Re: NoRouteToHostException
                      Johan Louwers
                      For all of you who are strugeling with the same and want a write-up of all discussed above please note I did create a quick write-up on my blog:

                      http://johanlouwers.blogspot.com/2012/03/solved-oracle-nosql-javanetnoroutetohos.html

                      Regards,
                      Johan Louwers.
                      • 8. Re: NoRouteToHostException
                        Charles Lamb
                        Johan,

                        Thank you for writing this up. I am adding an entry to the NoSQL Database FAQ regarding NoRouteToHostException.

                        Charles Lamb