On Tue, Oct 5, 2021 at 3:45 PM Calliess Daniel Ing. < daniel.calli...@stadt-salzburg.at> wrote:
> Hi Sander, > > > > see below for my comments: > > > > - As Daniel points out, the Service option runs as the "NT > AUTHORITY\Network Service" user. And yes, the installer will set write > access to the appropriate folders for that user (or at least it should), no > matter where the GEOSERVER_DATA_DIR or the GEOSERVER_HOME are located. > > => This worked fine for me on Server 2012R2 and Windows 10. > Ok, nice :) > > > - For manual installations, the write access for the appropriate folders > are assigned to the "Users" group, so any user account in that group should > have access. Please let me know if a different account is preferred or > should be given write access instead. > > => What exactly do you mean by 'manual installation'? > I mean when you do NOT install GeoServer as a Windows Service, but if you want to run it manually (using the *.bat files). > > > - Daniel also pointed out that he does not "like programs writing to the > Program Files folder". Please note that both the *suggested* install > directory and data directory can be set (overridden) in the installer > wizard and will (should) be picked up by the Service or manual startup > scripts accordingly. > > => I just wanted to show up another possibility to handle this situation. > Understood :) > > > - I'm afraid that the NSIS installer does not write a log file somewhere > unfortunately, except for the installer output window itself. We would have > to use the NSISLog plugin for example to write to a file. However, I have > modified the NSIS script now so that it should show the stderr of the > wrapper installation and service start/stop commands in the installer > output window. This will be available in a next version of the Windows > installer. > > => Does this mean that the output window will be accessible after the > installation has finished? > Correct. The details window will be displayed by default now and remain open when the (un)installer has finished. Or at least it should. Thanks, Sander > > *From:* Sander Schaminee [mailto:sander.schami...@geocat.net] > *Sent:* Tuesday, October 5, 2021 12:02 PM > *To:* Calliess Daniel Ing. <daniel.calli...@stadt-salzburg.at> > *Cc:* Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi>; Jody > Garnett <jody.garn...@gmail.com>; GeoServer Users < > geoserver-users@lists.sourceforge.net> > *Subject:* [EXTERN!]: Re: [Geoserver-users] GeoServer 2.20-RC windows > installer testing requested > > > > Hi all, > > > > Thanks for testing and the feedback. > > I am the bastard who wrote the installer ;) > I am currently getting ready to get the PR ready for the Windows installer > (so that it can be merged to the GeoServer main branch) and I am trying to > incorporate some of the suggestions I have read here. > > > > Some remarks I have: > > - The installer should request elevation (admin) before it starts. It also > checks if the user truly is an Administrator, else installing the Service > will not work. However, it uses a standard NSIS plugin for that (UserInfo) > which is rather old, so this check might no longer work properly? For > example, I am not sure how it handles a local power user (as Jukka was > using): is it considered an admin? Then the check will say all is fine, but > the Service installation will fail, as was observed by Jukka. > > - As Daniel points out, the Service option runs as the "NT > AUTHORITY\Network Service" user. And yes, the installer will set write > access to the appropriate folders for that user (or at least it should), no > matter where the GEOSERVER_DATA_DIR or the GEOSERVER_HOME are located. > > - For manual installations, the write access for the appropriate folders > are assigned to the "Users" group, so any user account in that group should > have access. Please let me know if a different account is preferred or > should be given write access instead. > > - I'm afraid that the NSIS installer does not write a log file somewhere > unfortunately, except for the installer output window itself. We would have > to use the NSISLog plugin for example to write to a file. However, I have > modified the NSIS script now so that it should show the stderr of the > wrapper installation and service start/stop commands in the installer > output window. This will be available in a next version of the Windows > installer. > > - Daniel also pointed out that he does not "like programs writing to the > Program Files folder". Please note that both the *suggested* install > directory and data directory can be set (overridden) in the installer > wizard and will (should) be picked up by the Service or manual startup > scripts accordingly. > > > > Some comments about what Brad Hards mentioned earlier: > > It was a fairly minimal install, and didn't have JRE or JDK. The installer > > detected that, and directed me to AdoptOpenJDK. That could be updated to > > Adoptium in a future change. > > I have updated the NSIS script to suggest Adoptium instead of AdoptOpenJDK > (I wasn't aware). Thanks for bringing this up. > An upcoming installer exe should point to Adoptium from now on. > > After installing OpenJDK 11, the GeoServer installer still doesn't detect it > > until I close the installer and retry. > > Note that this is standard Windows behavior: you cannot expect an open > application to pick up a change in the system environment variables (which > is what the installer uses to detect a JDK). In the past you even needed to > reboot... > > > > The "About GeoServer" start menu item goes to http://geoserver.org. That could > > be updated to https in a future change. > > Have you tried opening https://geoserver.org? Gives me > a NET::ERR_CERT_COMMON_NAME_INVALID in Chrome, so I guess there's some > SSL/TLS certificate error there. > > > > Thanks again, > > > > Sander > > > > > > > > > > On Tue, Oct 5, 2021 at 10:59 AM Calliess Daniel Ing. < > daniel.calli...@stadt-salzburg.at> wrote: > > Hi, > > > > I've been running the installer as a user that is part of the local > administrators group but not the local Administrator user account itself. I > then used 'Run as administrator' (which is necessary also for users with > admin privileges) and installed GeoServer to the 'Program Files' folder. In > the services console I then saw the GeoServer service which is by the > default installed to run with the 'NT AUTHORITY\Network Service' user. So > to successfully start the service, this user must have read access in the > 'Program Files\GeoServer' folder and write access in the contained 'logs' > and 'work' folders. The read access should be automatically set via the > local 'Users' group, the write access will be explicitely set by the > installer. Wherever the data directory is located, the 'Network Service' > must have write access. > As long as we don't know how to access the installer log you can record > the screen while installing using a tool like OBS Studio ( > https://obsproject.com/). > > > > For better separation of different applications on the server I'm creating > a local user account specially for GeoServer and am changing the > configuration accordingly. > > > > As I don't like programs writing to the Program Files folder I am moving > the work and logs folders to a different location: > > work: wrapper\jsl64.ini -> add '-Djava.io.tmpdir=<path to temp folder>' to > the 'cmdline' parameter > > wrapper logs: wrapper\jsl64.ini -> set 'systemout' and ' systemerr' > parameters > > jetty logs: etc\jetty.xml -> See 'ADD THIS' comments in the code sample -> > > > > <Set name="handler"> > > <New id="Handlers" > class="org.eclipse.jetty.server.handler.HandlerCollection"> > > <Set name="handlers"> > > <Array type="org.eclipse.jetty.server.Handler"> > > <Item> > > <New id="Contexts" > class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> > > </Item> > > <Item> > > <New id="DefaultHandler" > class="org.eclipse.jetty.server.handler.DefaultHandler"/> > > </Item> > > <!-- ADD THIS: --> > > <Item> > > <New id="RequestLog" > class="org.eclipse.jetty.server.handler.RequestLogHandler"/> > > </Item> > > </Array> > > </Set> > > </New> > > </Set> > > <!-- ADD THIS: --> > > <Ref id="RequestLog"> > > <Set name="requestLog"> > > <New id="RequestLogImpl" > class="org.eclipse.jetty.server.NCSARequestLog"> > > <Arg><SystemProperty name="jetty.logs" > default="D:\LogDateien\GeoServer\jetty"/>/yyyy_mm_dd.request.log</Arg> > > <!-- use E:\LogDateien\GeoServer\jetty for intranet--> > > <!-- use D:\Entwicklung\Server\LogDateien\WebGis for > development --> > > <Set name="retainDays">90</Set> > > <Set name="append">true</Set> > > <Set name="extended">false</Set> > > <Set name="LogTimeZone">GMT</Set> > > </New> > > </Set> > > </Ref> > > > > By the way, this is the exact same procedure that I used with the previous > installer. > > > > Hope this helps, > > regards > > Daniel > > > > *From:* Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] > *Sent:* Monday, October 4, 2021 9:37 PM > *To:* Jody Garnett <jody.garn...@gmail.com> > *Cc:* GeoServer Users <geoserver-users@lists.sourceforge.net> > *Subject:* [EXTERN!]: Re: [Geoserver-users] GeoServer 2.20-RC windows > installer testing requested > > > > Hi, > > > > I do not quite understand what rights I have on my work computer so I > changed to my home computer where I have full admin rights. I made > installation a) as a normal user but running the installer as admin and b) > when logged in as admin. The experience was better now but not perfect yet. > > > > - The installer prints a lot of text about how the installation > proceeds but it all disappears immediately when the installation is ready. > It would be nice to have an option to get the messages into a file. > > - I verified that the uninstaller does not remove > GEOSERVER_DATA_DIR environment, even if the data directory folder is > removed. Moreover, the installer does not set GEOSERVER_DATA_DIR right if > some other location is specified for the data directory during the next > installation. Because of that Geoserver does start, but without data even > the new data directory is there. > > - If installation is made into Program Files then only admin user > can start the service manually with startup.bat. The reason is that Jetty > wants to create a new directory into Program Files. It might be good to > document this and suggest non-admins to use some other directory. > ProgramData seems to be OK for the data directory. > > - The installer still could did not install the Windows service > for me. I could see some error messages flashing in the details window of > the installer but I did not manage to read them properly. Maybe something > about “invalid user or wrong password”. This happened even when I was > logged in as admin. > > > > -Jukka Rahkonen- > > > > > > > > *Lähettäjä:* Jody Garnett <jody.garn...@gmail.com> > *Lähetetty:* maanantai 4. lokakuuta 2021 19.50 > *Vastaanottaja:* Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi > > > *Kopio:* GeoServer Users <geoserver-users@lists.sourceforge.net> > *Aihe:* Re: [Geoserver-users] GeoServer 2.20-RC windows installer testing > requested > > > > I think you need to be administrator to install a service? I am sorry I am > not that familiar with windows permissions (power user vs administrator > huh?) > > > > Q: Did this situation you describe work with the previous geoserver 2.14 > installer? Perhaps we can learn something. > > > > ProgramData is the “approved” location for applications to manage their > configuration; I often wonder why tomcat does not placed its webapps folder > in ProgramData. > > > > I am not sure what else I can determine due to your power user rights… > > > > Jody > > > > On Mon, Oct 4, 2021 at 12:56 AM Rahkonen Jukka (MML) < > jukka.rahko...@maanmittauslaitos.fi> wrote: > > Hi, > > > > I was testing with my work computer as a localpower user. That user does > not have full rights but I do not know exactly the limits. My observations: > > > > · I used the Install as a service option but I could not start the > service. Running the startService.bat did not start the service for me but > yielded always these two lines > > net start GeoServer > > [Invalid service name] – translated from Finnish > > > > Installer creates also the startup.bat file and next results are obtained > by running that. > > · Geoserver does not start if it is installed into the suggested location > Program Files\GeoServer. With my rights it is not allowed to create a new > layer during startup. Error: > > Please wait while loading GeoServer... > > > > 2021-10-04 09:43:02.572:INFO::main: Logging initialized @1579ms to > org.eclipse.jetty.util.log.StdErrLog > > 2021-10-04 09:43:02.873:INFO:oejs.Server:main: jetty-9.4.36.v20210114; > built: 2021-01-14T16:44:28.689Z; git: > 238ec6997c7806b055319a6d11f8ae7564adc0de; jvm 1.8.0_252-b09 > > 2021-10-04 09:43:02.888:INFO:oejdp.ScanningAppProvider:main: Deployment > monitor [file:///C:/Program%20Files/GeoServer/webapps/] at interval 1 > > 2021-10-04 09:43:02.988:WARN:oejw.WebAppContext:main: Failed startup of > context > o.e.j.w.WebAppContext@1e6d1014{geoserver,/geoserver,null,STOPPED}{C:\Program > Files\GeoServer\webapps\geoserver} > > java.lang.IllegalStateException: Unable to create temp dir C:\Program > Files\GeoServer\work\jetty-0_0_0_0-8080-geoserver-_geoserver-any- > > > > · The first installation with the default settings created environmental > variable GEOSERVER_DATA_DIR set to C:\ProgramData\GeoServer. It seems that > uninstaller does not remove this variable and giving another path when > running the installer again does not change GEOSERVER_DATA_DIR. Error: > > 04 lokakuuta 09:54:36 WARN [geoserver.platform] - Found Java environment > variable GEOSERVER_DATA_DIR set to C:\ProgramData\GeoServer , but this path > does not exist > > 04 lokakuuta 09:54:36 WARN [geoserver.platform] - Found System environment > variable GEOSERVER_DATA_DIR set to C:\ProgramData\GeoServer , but this path > does not exist > > 04 lokakuuta 09:54:36 INFO [geoserver.platform] - Falling back to embedded > data directory: C:\ohjelmat\gs20rc\webapps\geoserver\data > > > > However, the directory that I gave for the installer was created and > populated. As a result Geoserver did not start right because it was > searching the data_dir from a wrong place. > > > > · Next I uninstalled again and removed the GEOSERVER_DATA_DIR environment > variable before running the installer. I used a custom data_dir location > but the installer did not set the variable at all. The data directory was > created and populated and after setting the GEOSERVER_DATA_DIR manually I > could run startup.bat and Geoserver 2.20-RC started. > > > > Conclusion: > > · There seems to be something to check with setting/removing/changing the > location of the data_dir with installer and uninstaller > > · The run as service alternative did not work at all for me > > · Using directory “Program Files” may make troubles even the installation > seems to be successful because Jetty wants to create a new directory when > it starts. I do not know if using ProgramData may show similar issues > because I used a custom data_dir location in most of my tests. > > > > -Jukka Rahkonen- > > > > > > *Lähettäjä:* Jody Garnett <jody.garn...@gmail.com> > *Lähetetty:* sunnuntai 3. lokakuuta 2021 20.26 > *Vastaanottaja:* GeoServer Users <geoserver-users@lists.sourceforge.net> > *Aihe:* [Geoserver-users] GeoServer 2.20-RC windows installer testing > requested > > > > Reporting in from the foss4g code sprint, and I noticed that Sander and > Juan produces a GeoServer-install-2.20-RC.exe last week... > > > > I do not have a windows environment handy, can I ask for testing please? > Download is available from > https://sourceforge.net/projects/geoserver/files/GeoServer/2.20-RC/ > > > > -- > > Jody Garnett > > -- > > -- > > Jody Garnett > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > >
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users