mapproxy / mapproxy

MapProxy is a tile cache and WMS proxy
http://mapproxy.org
Apache License 2.0
552 stars 253 forks source link

mapproxy background seeding Windows #349

Open GeOSMRob opened 6 years ago

GeOSMRob commented 6 years ago

Hello everybody,

I would like to try mapproxy background seeding on windows server 2012R and have currently encountered the following error.

The normal seeding with the new Mapproxy version == 1.11.0 works great under Windows. But background seeding does not work. An error is sent to the CMD or PowerShell terminal. Python tries to send the signal (stop subprocess) to the console. It seems the CMD or PS can not handle the signal and the seed process is not stopped and keeps going.

My Environment

Background-Seeding-docs

https://mapproxy.org/docs/latest/seed.html#example-background-seeding

Steps to Reproduce

  1. Open PowerShell-Console or CMD-Console

  2. Start the seed-progress with this comands-params: "D:\srv\Python27_x86\Scripts\mapproxy-seedx86.exe" -f "d:\srv\etc\mapproxy\instanzen\osm.yaml" -s "d:\srv\etc\mapproxy\instanzen\seed\seed_osm-be.yaml" -c 6 --seed=berlin-dev --reseed-interval=5m --duration=1m --reseed-file=reseed.time --progress-file=seed_progress --continue

  3. If the desired target time has been reached then this error message comes up and the seed process is not stopped

error message: Traceback (most recent call last): File "D:\srv\Python27_x86\Scripts\mapproxy-seedx86-script.py", line 11, in load_entry_point('MapProxy==1.11.0', 'console_scripts', 'mapproxy-seed')() File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 361, in main return SeedScript()() File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 175, in call sys.exit(self.call_with_duration(options, args)) File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 319, in call_with_duration cmd.send_signal(signal.SIGINT) File "d:\srv\python27_x86\lib\subprocess.py", line 767, in send_signal raise ValueError("Unsupported signal: {}".format(sig)) ValueError: Unsupported signal: 2

So far, I have found the blog that explains the signal error under Windows, (https://stefan.sofa-rockers.org/2013/08/15/handling-sub-process-hierarchies-python-linux-os-x/).

Best regards Robert

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Log: PS D:\srv\etc\mapproxy> D:\srv\Python27_x86\Scripts\mapproxy-seedx86.exe -f "d:\srv\etc\mapproxy\instanzen\osm.yaml" -s "d:\srv\etc\mapproxy\instanzen\seed\seed_osm-be.yaml" -c 6 --seed=berlin-dev --reseed-interval=5m --duration=1m --reseed-file=reseed.time --progress-file=seed_progress [2018-01-25 17:31:48,473] mapproxy.config - WARNING - unknown 'transparent' in caches.berlin_bus_cache [2018-01-25 17:31:48,473] mapproxy.config - WARNING - unknown 'transparent' in caches.berlin_ampeln_cache [2018-01-25 17:31:48,473] mapproxy.config - WARNING - unknown 'transparent' in caches.berlin_subhf_cache [2018-01-25 17:31:48,489] mapproxy.config - WARNING - grid begrid_72 does not have an origin. default origin will change from sw (south/west) to nw (north-west) with MapProxy 2.0 [2018-01-25 17:31:48,489] mapproxy.config - WARNING - grid begrid does not have an origin. default origin will change from sw (south/west) to nw (north-west) with MapProxy 2.0 [2018-01-25 17:31:48,489] mapproxy.config - WARNING - grid begrid_hq does not have an origin. default origin will change from sw (south/west) to nw (north-west) with MapProxy 2.0 [2018-01-25 17:31:48,582] mapproxy.config - WARNING - link_single_color_images not supported on windows ========== Seeding tasks ========== Start seeding process (1 task) berlin-dev: Seeding cache 'berlin_dev_cache' with grid 'begrid_72' in EPSG:3068 Limited to coverage in: 13.06970, 52.32758, 13.77728, 52.68494 (EPSG:4326) Levels: [0, 1, 2, 3, 4] Overwriting: tiles older than 2018-01-25 17:30:48 [17:31:48] 0 0.00% 2418.73641, 165.69884, 50269.11751, 39788.06131 (0 tiles) [17:32:01] 2 50.00% 2418.73641, 165.69884, 36124.44444, 36124.44444 (832 tiles) Traceback (most recent call last): File "D:\srv\Python27_x86\Scripts\mapproxy-seedx86-script.py", line 11, in load_entry_point('MapProxy==1.11.0', 'console_scripts', 'mapproxy-seed')() File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 361, in main return SeedScript()() File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 175, in call sys.exit(self.call_with_duration(options, args)) File "d:\srv\python27_x86\lib\site-packages\mapproxy\seed\script.py", line 319, in call_with_duration cmd.send_signal(signal.SIGINT) File "d:\srv\python27_x86\lib\subprocess.py", line 767, in send_signal raise ValueError("Unsupported signal: {}".format(sig)) ValueError: Unsupported signal: 2 [17:32:56] 55.56% 0O. 0O.0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

olt commented 6 years ago

Thanks for reporting this issue. We don't have resources to fix this at the moment. I've added a note to the documentation that it only works on Linux (and Unix like systems).