1 Reply Latest reply on Dec 17, 2002 9:38 PM by Nishith Prabhakar

    fixed server ports

    Andreas Vombach Newbie

      I have Tomcat on 192.168.2.1 and JBoss on 192.168.3.2.
      A Servlet on Tomcat requests a simple Session bean.
      My concern is that there shall be a firewall between the two hosts with a fixed number of ports open. From the doc and dump I see that ports 1099 and 4444 are necessary for RMI and naming. But the ejb instance seems to listen on a "random" port (this case 32874, but will be different next time) Is there a way to fix this port, preferrable to one Port for all instances as it is possible with UnicastRemoteObject?
      Thanks in advance!

      tcpdump: listening on fxp0
      192.168.2.1.34415 > 192.168.3.2.4444: F 2692529456:2692529456(0) ack 1982095151 win 8760 (DF)
      192.168.3.2.4444 > 192.168.2.1.34415: . ack 1 win 24820 (DF)
      192.168.3.2.4444 > 192.168.2.1.34415: F 1:1(0) ack 1 win 24820 (DF)
      192.168.2.1.34415 > 192.168.3.2.4444: . ack 2 win 8760 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: S 2697818702:2697818702(0) win 8760 <mss 1460> (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: S 1992128595:1992128595(0) ack 2697818703 win 24820 <mss 1460> (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: . ack 1 win 8760 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: P 1:8(7) ack 1 win 8760 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: . ack 8 win 24820 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: P 1:19(18) ack 8 win 24820 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: . ack 19 win 8760 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: P 8:29(21) ack 19 win 8760 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: P 29:317(288) ack 19 win 8760 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: . ack 317 win 24820 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: P 19:370(351) ack 317 win 24820 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: F 370:370(0) ack 317 win 24820 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: . ack 371 win 8760 (DF)
      192.168.2.1.34416 > 192.168.3.2.4444: F 317:317(0) ack 371 win 8760 (DF)
      192.168.3.2.4444 > 192.168.2.1.34416: . ack 318 win 24820 (DF)
      192.168.2.1.34425 > 192.168.3.2.1099: S 2713342981:2713342981(0) win 8760 <mss 1460> (DF)
      192.168.3.2.1099 > 192.168.2.1.34425: S 2021595371:2021595371(0) ack 2713342982 win 24820 <mss 1460> (DF)
      192.168.2.1.34425 > 192.168.3.2.1099: . ack 1 win 8760 (DF)
      192.168.3.2.1099 > 192.168.2.1.34425: P 1:5(4) ack 1 win 24820 (DF)
      192.168.2.1.34425 > 192.168.3.2.1099: . ack 5 win 8760 (DF)
      192.168.3.2.1099 > 192.168.2.1.34425: P 5:84(79) ack 1 win 24820 (DF)
      192.168.2.1.34425 > 192.168.3.2.1099: . ack 84 win 8760 (DF)
      192.168.3.2.1099 > 192.168.2.1.34425: FP 84:355(271) ack 1 win 24820 (DF)
      192.168.2.1.34425 > 192.168.3.2.1099: . ack 356 win 8760 (DF)
      192.168.2.1.34426 > 192.168.3.2.32874: S 2713633877:2713633877(0) win 8760 <mss 1460> (DF)
      --------------------+++++++++++++++++
      192.168.3.2.32874 > 192.168.2.1.34426: S 2022170249:2022170249(0) ack 2713633878 win 24820 <mss 1460> (DF)
      192.168.2.1.34426 > 192.168.3.2.32874: . ack 1 win 8760 (DF)
      192.168.2.1.34426 > 192.168.3.2.32874: P 1:8(7) ack 1 win 8760 (DF)
      192.168.3.2.32874 > 192.168.2.1.34426: . ack 8 win 24820 (DF)

        • 1. Re: fixed server ports
          Nishith Prabhakar Newbie

          I think there are three ports that need to be taken care of when using EJB's etc.

          Port
          Required initially for Naming search on the EJB. Configurable in jboss-service.xml (called Port). Default is 1099.

          RMIPort
          Required to lookup the remote interface name (auto generated i think ?). JBoss Quick Guide says the RMI Naming implementation is exported to this port. Default 0 meaning random port chosen. Can be fixed by adding a jnp.rmiPort=XXXX in a jnp.properties file in the conf folder of the server.

          RmiObjectPort
          The remote objects listen on this port for RMI messages. Is also random by default. Can be fixed by uncommenting the line in the jboss-service.xml file in conf folder. Usually set to 4444.