payara 4 to 5 migration / port offset

77 views
Skip to first unread message

Korbinian

unread,
May 30, 2019, 7:05:54 AM5/30/19
to Payara Forum
Hi,

on my dev environment all is ready to go for a deploy on payara5 - but on my prod server I wonder how to do it without too much downtime. I dont really like to export/ import the domain1 from payara4 to 5 since this one was originally created in glassfish 3 times... yes I know :)

So, leaving me with the problem: how could I create a new domain that temporarely uses a different port offset then the one I want to have later on, so I can run it in parallel on my production server to have all tested well (that should take at least some hours) ?
Wildfly has this neat
-Djboss.socket.binding.port-offset=10000
option where one can specify it during startup - but how would I do that in payara?

I only have seen it during creation of a domain like mentioned here:
https://blog.payara.fish/administering-payara-server-5-with-the-cli


Best,

KB

PS: did 5.192 get the "additional 4.x upgrade support" like mentioned in roadmap?
(https://www.payara.fish/payara-site/media/gb/Roadmap-2019.pdf)

HASUNUMA Kenji

unread,
Jun 2, 2019, 9:27:59 PM6/2/19
to Payara Forum
Hello,

There's --portbase option in asadmin create-domain for such usage.

For example,

asadmin create-domain --portbase 10000 yourdomain

Thanks.

2019年5月30日木曜日 20時05分54秒 UTC+9 Korbinian:

Korbinian

unread,
Jun 3, 2019, 3:30:03 AM6/3/19
to Payara Forum
Hello Kenji,

I know the creation tag but like I wrote I would like to not create a domain using whole different ports but just shift these ports temporary. Do you know if it is enough to alter the ports in the domain.xml manually and revert them later on or would payara here have some kind of internal quirks? - I looked at the domain.xml and I somehow am not sure its the fullk port related configuration....

HASUNUMA Kenji

unread,
Jun 3, 2019, 7:21:41 PM6/3/19
to Payara Forum
Hi Corbinian,

I'm sorry that I don't know how to shift these ports temporally such as 'jboss.socket.binding.port-offset' JVM option in WildFly.
Possibly someone else might know alternate ways.

Thanks.

2019年6月3日月曜日 16時30分03秒 UTC+9 Korbinian:

Rudy De Busscher

unread,
Jun 4, 2019, 8:02:05 AM6/4/19
to Payara Forum
Hi Korbinian,

The domain.xml is all the configuration of the domain. So changing the ports there is all that you need to do.

Changes are only picked up after restart.

Rudy

Ondro Mihályi

unread,
Jul 5, 2019, 6:35:23 PM7/5/19
to Payara Forum
Hi, Korbinian,

Payara doesn't allow providing an offset to shift all ports. This can be provided only when domainis created. The only thing similar to it is to set all ports to reference environment variables and specify them all before you start Payara Server. Later you could specify different values for them. I understand that it's very cumbersome.

Alternatively, you can create a new domain with a specified offset for ports and then compare it to the default domain. It should be easy to find out all ports that need to be changed. Then it is pretty easy to edit domain.xml manually and update all ports as needed (there are around 8 ports to change). If you want to do that quickly to limit the down time, you can script this as asadmin commands, run the commands when you want to switch and then restart your server.

You may also raise an issue on github to request a similar offset functionality that exists in WildFly.

All the best,
Ondro
Reply all
Reply to author
Forward
0 new messages