Issue with Artix Configuartion for multiple services on same port - Forum - Community Groups - Progress Community

Issue with Artix Configuartion for multiple services on same port

 Forum

Issue with Artix Configuartion for multiple services on same port

  • Hi,

    We use Artix 4.1 in our application. We have this requirement where in we have got to host two different services as

    https://localhost:1000/testing and  https://localhost:1000/tested

    The JVM's are different for these two servebr implemenut they refer to same installation of Artix.When we try to bring up the services, one of it runs and the other one says "Address already in use".

    SystemException occurred attempting create listener on 0.0.0.0.1000: IT_ATLI2_IP:ADDRESS_IN_USE

    Isn't there a way to achieve this? Just like a web server, we have two different contexts but same hostname & port.

    Please note that the wsdl file for the two service is same and hence there is no difference in the service or the portnames for these two services. Its a business requirement and hence these two services can not be merged together.

    Thanks,

    Deepak Dhamija

  • Update ...

    "JVM's are different for these two service implementations but they refer to same installation of Artix as they run at same Unix box."

  • If you have two JVMs, e.g. two different OS processes then there is nothing you can do. Two OS processes cannot listen to the same port on the same IP address.

    In other words, this is not an ARTIX issue as such.

  • Thanks Thomas for your reply.

    But I would really appreciate if you can give me solution for my problem...except for merging these two together in one process.

    These are running as two different main() processes in java 1.5

  • Well, there is no answer to give if you don't merge them into the same process. If you have two mains, thus, two java process then the underlying OS will always raise this exception.

    The only way around this is having more than one network card and IP addresses. E.g. 10.0.0.1 and 10.0.0.2. In that case you can bind to port 10000 at the same time (compare that to 0.0.0.0 you have right now).

    Sorry, but without merging not much I can do.

    The only other thing that comes to mind is to have a (reverse) proxy (e.g. Apache http) running at port 10000 and dispatch base on /context.

    Okay?

  • Thanks Thomas...it really helped...but then again...its not the solution.

    Can't I configure just one Host and Port and multiple contexts under that via Artix only? I mean why can't Artix handle this....? I mean...can't I have a main servant and then something like sub-servants under it?

    I do see in the artix logs that it gets bytes from some other (i suppose externally accessible) port and then gives it to the port that i configured my server on...i think its handling it internally... i just need to know how...

    I do see something as

    policies:at_http:client:proxy_server = "http://localhost:0/SOAPHTTPProxy

    in the default artix.cfg file. I am pretty sure there is a way to do it...just don't know how :-(

  • I work with Deepak.  Is there anyway that this problem can be overcome?  Both of the clients coming into this single port are using 2 separate URL's.  Can't we have a single process/function out front that looks at the URL & hands it off to JVM-1 or JVM-2, based upon the URL provided?