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:[email protected]]
Sent: Monday, October 4, 2021 9:37 PM
To: Jody Garnett <[email protected]>
Cc: GeoServer Users <[email protected]>
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 <[email protected]<mailto:[email protected]>>
Lähetetty: maanantai 4. lokakuuta 2021 19.50
Vastaanottaja: Rahkonen Jukka (MML)
<[email protected]<mailto:[email protected]>>
Kopio: GeoServer Users
<[email protected]<mailto:[email protected]>>
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)
<[email protected]<mailto:[email protected]>>
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<mailto:o.e.j.w.WebAppContext@1e6d1014%7bgeoserver,/geoserver,null,STOPPED%7d%7bC:%5CProgram>
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 <[email protected]<mailto:[email protected]>>
Lähetetty: sunnuntai 3. lokakuuta 2021 20.26
Vastaanottaja: GeoServer Users
<[email protected]<mailto:[email protected]>>
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users