asadmin start-domain overriding instanceport
In case the http listener's port (by default 8080) is blocked by another process, GlassFish obviously fails to start, so we need to change the port. As asadmin set won't work offline, this is not an option. Also, we do not want to hack domain.xml manually as that is error-prone.
Unfortunately there is no --instanceport option with start-domain.
Is there a (hidden or experimental) way to use set offline, or can the http listener port be provided with start-domain in some way?
I'm not aware of a way to do that, but this is a good enhancement request.
The create-domain command tries to mitigate this problem by checking that the port is free when the domain is created, but obviously that doesn't help with the default domain that's included in the download.
@bshannon Yes, exactly the included default domain is causing the troubles in our particular case. We fix that by modifying domain.xml by hand, which is just not nice. While start-domain --instanceport would override the cause of this particular problem, in fact an offline variant of set would be of more general purpose.
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
@arjantijms @smillidge Please reopen this issue, as it is neither solved nor irrelevant. Thanks.
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
Let's keep it open. Hopefully someday, someone, will look at this.
Anybody willing to fix this eventually? 🤔
What are suggested solutions?
I can think of these options:
- support running
asadmin setwithout a server running - probably doable by starting the server from the set command and then stopping it before it gets to binding ports or anything that could end with an error - add an option to override port numbers by an argument to start-domain command
- add an option to run set commands or even other asadmin commands at server startup, allowing to modify configuration before the server initializes listeners
I think the easiest and probably simplest is the solution 3. It would also be universal and would allow more changes to the configurstion. We could also add support for a stop after boot, which would then work as solution number 1.