Service Virtualization

 View Only
  • 1.  Use standard port 80 (for http) and port 443 (for https) for virtual service?

    Posted Jan 25, 2018 08:39 AM

    As soon as I deploy a virtual service (VS) to any of the standard port 80 (http) and port 443 (https), the deployed VS stops with a bunch of errors atached to it.

     

    I need a confirmation if it is possible to assign any of the standard port to a virtual service and have it successfully deployed.  If yes, how can this be accomplished?

     

    Thanks

     

    Kishore



  • 2.  Re: Use standard port 80 (for http) and port 443 (for https) for virtual service?

    Posted Jan 25, 2018 11:07 AM

    Can you be more specific about what type of errors you are receiving?



  • 3.  Re: Use standard port 80 (for http) and port 443 (for https) for virtual service?

    Posted Jan 25, 2018 11:54 AM

    | Exception:
    ============================================================================
    | Message: java.net.SocketException: Permission denied
    ----------------------------------------------------------------------------
    | Trapped Exception: Permission denied
    | Trapped Message: java.net.SocketException: Permission denied
    ----------------------------------------------------------------------------
    STACK TRACE
    java.net.SocketException: Permission denied
    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)
    ============================================================================</long>
    <TestRunId>296B018D01EF11E88792000C29FC1647</TestRunId>
    </Event>
    </Events>
    <Warnings />
    <Errors>
    <Msg>
    <Body>Virtual HTTPS Listener



  • 4.  Re: Use standard port 80 (for http) and port 443 (for https) for virtual service?
    Best Answer

    Posted Jan 25, 2018 06:15 PM

    The message you are receiving is permission denied.

    This may not be an error from DevTest rather an OS permissions issue related to the Run As user.

     

    If Ubuntu ( and maybe all forms of Linux, I don't know), I believe only root can open ports lower than 1024. I doubt your VSE is running as root - at least, CA would not recommend you run VSE under the root account.

     

    If Windows (not sure the same port rule applies to only admin accounts), try netstat -aon | findstr /c:":443" from a CMD line. This might identify if another server process is running on those ports. 



  • 5.  Re: Use standard port 80 (for http) and port 443 (for https) for virtual service?

    Posted Feb 07, 2018 02:27 PM

    Thanks Joel  for your response.

    I was able to get around the issue by redirecting ports 80 and 443 to any other random port in the Linux server:

     

    sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 13005

     

    sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 13015

     

     

    Thanks again!

     

    Kishore