Service Virtualization

Expand all | Collapse all

Getting No Date, no incoming request found error

Maria Heloisa De Oliveira Santos Flores

Maria Heloisa De Oliveira Santos FloresMay 29, 2018 10:15 AMBest Answer

  • 1.  Getting No Date, no incoming request found error

    Posted May 27, 2018 03:50 PM

    Hi Team,

     

    In virtual service transaction view, we are seeing "No Date, No Incoming Request found error" transactions intermittently.

    Error is showing "Unable to listen for requests on address/port 4501.  It is either currently in use by another process or is not allowed by the operating system". But port is not used by any other services. and it worked after some time again. Not sure what might the cause.

    Could you please suggest on this?

     

    Below are the details of error:

    ============================================================================
    | Unable to listen for requests on address/port 4501.  It is either currently in use by another process or is not allowed by the operating system.
    ============================================================================
    | Step:        Virtual HTTPS Listener 4501
    ----------------------------------------------------------------------------
    | Message:     Address already in use: bind
    ----------------------------------------------------------------------------
    | Trapped Exception: Address already in use: bind
    | Trapped Message:   java.net.BindException: Address already in use: bind
    ----------------------------------------------------------------------------
    STACK TRACE
    java.net.BindException: Address already in use: bind
     at sun.nio.ch.Net.bind0(Native Method)
     at sun.nio.ch.Net.bind(Net.java:433)
     at sun.nio.ch.Net.bind(Net.java:425)
     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
     at com.itko.lisa.vse.sio.NIOPortServer.<init>(NIOPortServer.java:68)
     at com.itko.lisa.vse.sio.DefaultPortServerFactory.createPortServer(DefaultPortServerFactory.java:47)
     at com.itko.lisa.vse.sio.PortServer.createPortServer(PortServer.java:76)
     at com.itko.lisa.vse.http.TextHTTPServer.<init>(TextHTTPServer.java:118)
     at com.itko.lisa.vse.http.TextHTTPServer.getServer(TextHTTPServer.java:84)
     at com.itko.lisa.vse.stateful.protocol.http.HttpListenStep.execute(HttpListenStep.java:462)
     at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1294)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
     at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
     at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)
     at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
    ============================================================================

     

    Thank You

    Rajasekhar



  • 2.  Re: Getting No Date, no incoming request found error
    Best Answer

    Posted May 29, 2018 10:15 AM

    Hello Rajasekhar,

     

    From the description, it looks like the virtual service is working fine but you are seeing these exceptions in the Inspection View. Feel free to correct me if I am wrong.

     

    If this is the case, please take a look at your vse.log files and verify if you have some other WARN messages, like:

    LisaException detail java.lang.IllegalArgumentException: Incoming request is not HTTP. exception is java.lang.IllegalArgumentException: Incoming request is not HTTP.

    bad HTTP parsed: 400 Unknown Version for HttpChannelOverHttp@153f364c{r=0,c=false,a=IDLE,uri=null}

     

    It can be that you have a vulnerability scan tool running on your environment and testing this VSM several times.

     

    Hope it helps.

    Heloisa



  • 3.  Re: Getting No Date, no incoming request found error

    Posted Jun 04, 2018 11:32 AM

    Thanks Helosia for the details.

     

    Yes, Virtual Service is running fine and responding properly but i could see these errors. As you said, I could see the error "exception is java.lang.IllegalArgumentException: Incoming request is not HTTP." in vse.log files.

    So vulnerability tool, sends requests to VSM randomly since I could see these errors for few virtual services only not for all. Please correct me if I am wrong.

    Thank You.

    Rajasekhar



  • 4.  Re: Getting No Date, no incoming request found error

    Posted Jun 06, 2018 12:59 AM

    Hello Rajasekhar,

     

    If you have a vulnerability scan running, I believe it will test all the open ports on your environment, unless you configure it not to do so.

    Were you able to confirm you have a scanning tool being executed against the VSE?

     

    Thanks

    Heloisa



  • 5.  Re: Getting No Date, no incoming request found error

    Posted Jun 07, 2018 09:10 AM

    Also, can you confirm for us what the service is using as its basepath?

    And, if a port scanner is in use, can you identify which software tool is used (for example Qualys)?

    I have seen these exceptions when a basepath of "/" is used on a service. The problem with "/" is that the service will attempt to process every request coming in on the port (so long as the protocol matches).  A tightened base path means the port scanner (assuming one is running) has to construct both a valid protocol & basepath else, the service rejects the incoming request before it gets to the VSM.    



  • 6.  Re: Getting No Date, no incoming request found error

    Posted Jun 22, 2018 12:53 PM

    Thanks Joel for the details. Sorry for late reply.

    I am not sure of the vulnerability scanning and port scanning softwares on the server.

    And virtual Service is having the full base path instead of just /.

    I am seeing this issue intermittently.

     

    Thank You.

    Rajasekhar



  • 7.  Re: Getting No Date, no incoming request found error

    Posted Nov 20, 2018 11:43 AM

    What if you can't tighten your base path? Is there an elegant way to battle the port scanners within the service or VSM?

    In my case the I have a list of transactions similar to :

    GET /api/v1/employees

    GET /api/v1/employee/{EmployeeId}/

    POST /api/v1/create

    GET /info

     

    As I understand my options, the /info transaction limits my ability to put in a restrictive base path in this particular case.

    If I deploy this service, after 4th port scans the service goes off line.  They don't even have to be consecutive.

    One way I replicate this is to hit the service with a telnet command. Example:

       telnet {{VSEip}} {{VSEport}}

       Cntrl-x <Enter>

     

    I've thought about creating a generic operation responses for / in the VSI, but the error comes pre-VSI during the http listener which reports the "incoming request is not HTTP"



  • 8.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Nov 20, 2018 11:54 AM

    I wouldn't expect that the basepath is the cause of any issue you encounter.

     

    You have to know that it is the VSE process that opens the port, not the virtual service itself. The basepath is used by the VSE to figure out to which running virtual service an incoming request needs to be handed off. So basepaths become important when more than one virtual service is deployed for the same listen port.

     

    Is that the case? If not, then a / baseparth should work perfectly fine to process the 4 requests that you list above.

     

    If you send send a telnet request to that port which is listening for HTTP requests that would indeed generate an error as the first line of the incoming packet would not be an GET, POST, ...

     

    If you deploy the virtual service with basepath / (assuming it is the only VS listening on the port) what is the error that is reported?

     

    Cheers,

    Danny



  • 9.  Re: Getting No Date, no incoming request found error

    Posted Nov 20, 2018 12:04 PM

    I think you missed my point?  I'm not saying base path is a problem. I'm saying that if I open the base path to be simply / then the service is eligible to be hit with things such as port scanners. This causes an error on the service and after 4 errors the service goes off line.  If I deploy the service with a more specific base path then it is not prone to going down as a result of the port scanners.  The telnet example was simply a way of replicating the issue since I don't control the port scanners.



  • 10.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Nov 20, 2018 12:14 PM

    hmm ... I once wrote a quick virtual service for HTTP that responded when something hit the base port of /, with the lyrics to "Never Gonna Give You Up" by Rick Astley. It would happily listen (and not fail on telnet connections), and fire a response when the consumer typed something. It would respond with a line of the lyrics every second, for the first verse and chorus.

     

    If I can find it, I'll upload it. It also responds with the lyrics to "Hello" by Lionel Richie if the consumer enters "hello".

     

    I wrote it because developers on a customer site would telnet to a port as a quick check that their virtual service had deployed, rather than running a real API request against it, even after I recommended that they send a valid request to avoid the "4 hard errors" virtual service deactivation. So I thought it appropriate to rickroll them.



  • 11.  Re: Getting No Date, no incoming request found error

    Posted Nov 20, 2018 12:37 PM

    Twisted!  I like it.  You are my kind of people!



  • 12.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Nov 20, 2018 12:05 PM

    Apologies, I reacted based on the incoming question, without looking at the history of the discussion.

     

    Contrary to what Joel stated, I do believe that the incoming packet is handed to the vsm but if the HTTP Listen Step doesn't recognize it as an HTTP request it probably throws an environment error.

    Have you tried to let change tie "If environment Error" of the Listen step from Abort action to flowing to some step where you can process that environment error.

    To test this hypothesis I you could maybe let the environment error loop back onto the Listen step itself and then test with your telnet requests? See if that still brings down the VS after 4 requests?

     

    Cheers,

    Danny



  • 13.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Nov 20, 2018 12:20 PM

    I just tried it myself, using Putty and it looks promising, no more errors reported.

     

    I think now the next hurdle to take is to process the "faulty" incoming request and try to determine if it is a port scanner request or a real environment error. And only loop back to the Listen step if determined it was a port scanner, otherwise abort

     

    Hope this helps,

     

    Cheers,

    Danny



  • 14.  Re: Getting No Date, no incoming request found error

    Posted Nov 20, 2018 12:25 PM

    Yes, and that would be the elegant part I was referring to. Handling the error with acknowledgment that it happened vs just swallowing it up or leading to termination.



  • 15.  Re: Getting No Date, no incoming request found error

    Posted Nov 20, 2018 12:20 PM

    I was going down this path, but I was looking to see if someone had a best practice for this particular situation. I figured this is one of those cases where it's not very unique and many others likely faced the issue.

     

    I can "fix" the issue by changing the listener step setting "If environment error" from "Abort the test" to "End the test"

    Doing this the telnet errors don't even register on the portal Monitor/VSE screen, and the service does not go down.  So yes, problem resolved, but feels more like a hack then a fix. 



  • 16.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Nov 20, 2018 12:27 PM

    In my book, if you can let the virtual service respond with an abort for any unforeseen incoming request and are able to filter out and continue for any specific incoming requests that you want to ignore, that is a fix. :-)

     

    Cheers,

    Danny



  • 17.  Re: Getting No Date, no incoming request found error

    Broadcom Employee
    Posted Jun 13, 2018 10:07 PM

    Hi Rajasekhar,

     

    Did you see responses from Heloisa and Joel?

    Could you please let us know your anwsers to the questions that Heloisa and Joel asked?