JMeter : java.net.NoRouteToHostException: Cannot assign requested address (Address not available)











up vote
1
down vote

favorite












I have created a simple Spring boot Application having a HelloController.



Get API: http://localhost:8080/hello
Response: Hello World


Now I have created a JMeter Script having 0.1 million concurrent users hitting the above get API.
When I run the JMeter Script, after 30k count, I start getting the error:



java.net.NoRouteToHostException: Cannot assign requested address (Address not available)


What is the reason for this? How can I resolve this issue?




  • I'm using UBUNTU 18.04 with 8gb RAM.

  • While performing the operation, only JMeter and STS was open.










share|improve this question




























    up vote
    1
    down vote

    favorite












    I have created a simple Spring boot Application having a HelloController.



    Get API: http://localhost:8080/hello
    Response: Hello World


    Now I have created a JMeter Script having 0.1 million concurrent users hitting the above get API.
    When I run the JMeter Script, after 30k count, I start getting the error:



    java.net.NoRouteToHostException: Cannot assign requested address (Address not available)


    What is the reason for this? How can I resolve this issue?




    • I'm using UBUNTU 18.04 with 8gb RAM.

    • While performing the operation, only JMeter and STS was open.










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have created a simple Spring boot Application having a HelloController.



      Get API: http://localhost:8080/hello
      Response: Hello World


      Now I have created a JMeter Script having 0.1 million concurrent users hitting the above get API.
      When I run the JMeter Script, after 30k count, I start getting the error:



      java.net.NoRouteToHostException: Cannot assign requested address (Address not available)


      What is the reason for this? How can I resolve this issue?




      • I'm using UBUNTU 18.04 with 8gb RAM.

      • While performing the operation, only JMeter and STS was open.










      share|improve this question















      I have created a simple Spring boot Application having a HelloController.



      Get API: http://localhost:8080/hello
      Response: Hello World


      Now I have created a JMeter Script having 0.1 million concurrent users hitting the above get API.
      When I run the JMeter Script, after 30k count, I start getting the error:



      java.net.NoRouteToHostException: Cannot assign requested address (Address not available)


      What is the reason for this? How can I resolve this issue?




      • I'm using UBUNTU 18.04 with 8gb RAM.

      • While performing the operation, only JMeter and STS was open.







      java performance spring-boot jmeter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 7 at 12:24









      user7294900

      18.3k93056




      18.3k93056










      asked Nov 7 at 12:04









      dpk

      360110




      360110
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          You can follow Lakshmi Narayan answer to increase available ports:




          Resolution:




          1. Increased the local port range using below command:


          echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range



          This allows more local ports to be available.




          1. Enable fast recycling TIME_WAIT sockets as below:


          $ sudo sysctl -w net.ipv4.tcp_tw_recycle =1



          By default,



          cat /proc/sys/net/ipv4/tcp_tw_recycle



          Output : 0 (disabled by default)



          Be cautious if enabled in production environments, since this is our
          internal Environment and machine used only for Jmeter load tests, we
          enabled recycle and resolved the issue.




          1. Enable reuse of sockets as below:


          $ sudo sysctl -w net.ipv4.tcp_tw_reuse=1



          By default,



          cat /proc/sys/net/ipv4/tcp_tw_reuse



          Output : 0 (disabled by default)



          Note: The tcp_tw_reuse setting is particularly useful in environments
          where numerous short connections are open and left in TIME_WAIT state,
          such as web servers. Reusing the sockets can be very effective in
          reducing server load.



          After enabling fast recycling and reuse the server could support 5K
          user Load with single Unix box.







          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189126%2fjmeter-java-net-noroutetohostexception-cannot-assign-requested-address-addre%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            You can follow Lakshmi Narayan answer to increase available ports:




            Resolution:




            1. Increased the local port range using below command:


            echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range



            This allows more local ports to be available.




            1. Enable fast recycling TIME_WAIT sockets as below:


            $ sudo sysctl -w net.ipv4.tcp_tw_recycle =1



            By default,



            cat /proc/sys/net/ipv4/tcp_tw_recycle



            Output : 0 (disabled by default)



            Be cautious if enabled in production environments, since this is our
            internal Environment and machine used only for Jmeter load tests, we
            enabled recycle and resolved the issue.




            1. Enable reuse of sockets as below:


            $ sudo sysctl -w net.ipv4.tcp_tw_reuse=1



            By default,



            cat /proc/sys/net/ipv4/tcp_tw_reuse



            Output : 0 (disabled by default)



            Note: The tcp_tw_reuse setting is particularly useful in environments
            where numerous short connections are open and left in TIME_WAIT state,
            such as web servers. Reusing the sockets can be very effective in
            reducing server load.



            After enabling fast recycling and reuse the server could support 5K
            user Load with single Unix box.







            share|improve this answer

























              up vote
              0
              down vote



              accepted










              You can follow Lakshmi Narayan answer to increase available ports:




              Resolution:




              1. Increased the local port range using below command:


              echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range



              This allows more local ports to be available.




              1. Enable fast recycling TIME_WAIT sockets as below:


              $ sudo sysctl -w net.ipv4.tcp_tw_recycle =1



              By default,



              cat /proc/sys/net/ipv4/tcp_tw_recycle



              Output : 0 (disabled by default)



              Be cautious if enabled in production environments, since this is our
              internal Environment and machine used only for Jmeter load tests, we
              enabled recycle and resolved the issue.




              1. Enable reuse of sockets as below:


              $ sudo sysctl -w net.ipv4.tcp_tw_reuse=1



              By default,



              cat /proc/sys/net/ipv4/tcp_tw_reuse



              Output : 0 (disabled by default)



              Note: The tcp_tw_reuse setting is particularly useful in environments
              where numerous short connections are open and left in TIME_WAIT state,
              such as web servers. Reusing the sockets can be very effective in
              reducing server load.



              After enabling fast recycling and reuse the server could support 5K
              user Load with single Unix box.







              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                You can follow Lakshmi Narayan answer to increase available ports:




                Resolution:




                1. Increased the local port range using below command:


                echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range



                This allows more local ports to be available.




                1. Enable fast recycling TIME_WAIT sockets as below:


                $ sudo sysctl -w net.ipv4.tcp_tw_recycle =1



                By default,



                cat /proc/sys/net/ipv4/tcp_tw_recycle



                Output : 0 (disabled by default)



                Be cautious if enabled in production environments, since this is our
                internal Environment and machine used only for Jmeter load tests, we
                enabled recycle and resolved the issue.




                1. Enable reuse of sockets as below:


                $ sudo sysctl -w net.ipv4.tcp_tw_reuse=1



                By default,



                cat /proc/sys/net/ipv4/tcp_tw_reuse



                Output : 0 (disabled by default)



                Note: The tcp_tw_reuse setting is particularly useful in environments
                where numerous short connections are open and left in TIME_WAIT state,
                such as web servers. Reusing the sockets can be very effective in
                reducing server load.



                After enabling fast recycling and reuse the server could support 5K
                user Load with single Unix box.







                share|improve this answer












                You can follow Lakshmi Narayan answer to increase available ports:




                Resolution:




                1. Increased the local port range using below command:


                echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range



                This allows more local ports to be available.




                1. Enable fast recycling TIME_WAIT sockets as below:


                $ sudo sysctl -w net.ipv4.tcp_tw_recycle =1



                By default,



                cat /proc/sys/net/ipv4/tcp_tw_recycle



                Output : 0 (disabled by default)



                Be cautious if enabled in production environments, since this is our
                internal Environment and machine used only for Jmeter load tests, we
                enabled recycle and resolved the issue.




                1. Enable reuse of sockets as below:


                $ sudo sysctl -w net.ipv4.tcp_tw_reuse=1



                By default,



                cat /proc/sys/net/ipv4/tcp_tw_reuse



                Output : 0 (disabled by default)



                Note: The tcp_tw_reuse setting is particularly useful in environments
                where numerous short connections are open and left in TIME_WAIT state,
                such as web servers. Reusing the sockets can be very effective in
                reducing server load.



                After enabling fast recycling and reuse the server could support 5K
                user Load with single Unix box.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 7 at 12:14









                user7294900

                18.3k93056




                18.3k93056






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53189126%2fjmeter-java-net-noroutetohostexception-cannot-assign-requested-address-addre%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Hercules Kyvelos

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud