eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
384 stars 143 forks source link

Update create-service command #24736

Open dmatej opened 9 months ago

dmatej commented 9 months ago

Feedback from testing on Windows Server 2022:

Environment Details


  1. Instead of domain1 GlassFish Server the name should be Eclipse GlassFish - domain1
  2. Help still contains glassfish3 directory name
  3. https://en.wikipedia.org/wiki/Service_Management_Facility = SMF used in SMFService name
  4. asadmin rotate-log doesn't do anything
  5. ? TBD
mirozitnansky commented 9 months ago

Maybe I have suggestion for create-service functionality here. If it's not appropriate place, I can move it to other place. Create-service command creates default configuration in {domain1}Service.xml. This contains basic parameters to start process locally. It is not possible to configure user credentials for this command to use when connecting to domain server. When service is starting, glassfish tries to connect to domain and detect if there were any changes and optionally perform instance resync. But this ends with warning,

Warning: Synchronization with DAS failed, continuing startup...

because there aren't credential data for service to use as \<startargument> for process. It is possible to add this parameters do XML manually

  <startargument>--user</startargument>
  <startargument>admin</startargument>
  <startargument>--passwordfile</startargument>
  <startargument>c:\glassfish\.passfile</startargument>

then server is able to resync automatically itself on service startup.

It might not be the best solution, store admin passfile on remote instance, but currently it's the only one I know of. Maybe this can by solved by some kind of certificate authentication for instance that would be better.

dmatej commented 9 months ago

because there aren't credential data for service to use as for process.

I am not sure if this is the cause. First critical blocker is that GMS failed to initialize because of the Shoal failure. For start-local-instance I am not sure now, but I believe it gets full connection settings when it is created and then it doesn't need it any more.

I believe on Monday I will send you a fixed snapshot (logging+shoal), then we can review if it is enough or you are right with this too.