[Mapbender-users] RE: problem with wms after importing gui on server

Marec marec at t-online.de
Wed Jan 16 13:28:11 EST 2008


Hi Karsten,

just try following steps

1. edit your Mapbender-conf file and
     set from line 138 your configs like this to log
     errors.

    # --------------------------------------------
    # Mapbender error logging
    # --------------------------------------------

    define("LOG_LEVEL_LIST", "off,error,warning,notice,all");
    define("LOG_LEVEL", "error");
    define("LOG_JS", "on"); // "on", "alert", "console", "off"



2. Upload your Service again (is it an external Server??).

3. pick out the right log file from /mapbender/log/

if your report looks like this....
------------------------------------------------------------------------------------------------------------------
2007.05.15, 17:59:31,Error while executing prepared statement in 
C:/xampp/htdocs/mapbender_2.4.1/http/php/mod_loadwms.php: Sql: INSERT 
INTO gui_layer (fkey_gui_id, fkey_layer_id, gui_layer_wms_id, 
gui_layer_status, gui_layer_selectable, gui_layer_visible, 
gui_layer_queryable, 
gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale, 
gui_layer_priority) *VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)*, Error: 
ERROR:  duplicate key violates unique constraint "pk_gui_layer"
-------------------------------------------------------------------------------------------------------------------

I would say, that your Mapbender
is not be able to take a connection to other Servers/Internet.

in this case Mapbender  connot fill the table  gui_layer  and your
VALUES
are always the same ($1).


greetings Marc

    


karsten vennemann schrieb:
> Hi I still experience problems when I try to import GUIs originating from my
> local windows machine to my linux server (both mapbender 2.4.3). The gui
> seems to import fine but when I try to upload the WMS on the server again it
> gives me a message 
> "duplicate key violates unique constraint "pk_gui_layer""
> I don't know how I could possibly have a duplicate key ... nor what/which it
> could be...
> The WMS is at 
> http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/projects/a
> lliance/alliance.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1
>
> Weird is that I can upload the same WMS (which is located on the server) and
> it works on my local machine, but I can' succeed to upload it on the server
> itself.
> What can I do to fix it. Delete mabender db and start over again ?
> I also tried the db cleaning script from
> http://www.mapbender.org/index.php/Database-cleaning-script with no success
> after running it.
>
> What is the proper order to recreate a project on the server ?
> Import GUI first or up load WMS to a different container-GUI first?
>
> Thanks
> Karsten 
>
> -----Original Message-----
> From: karsten vennemann [mailto:karsten at terragis.net] 
> Sent: Thursday, January 03, 2008 00:54
> To: 'mapbender_users at lists.osgeo.org'
> Subject: Re: problem with wms after importing gui on server
>
> Happy new year all,
>
> Ok - my mistake I fiddled around with the wms in the meantime (trying to fix
> it) and added a second layer on the wms on the server that broke the whole
> thing.
> Now the wms seems to be working again at
> http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/projects/a
> lliance/ok_server.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1
> gives me an xml output file. 
>
> I can use this wms successfully on my local machine but not on the server
> (which serves the wms !) ???
> I could now import the gui on the server without any errors (that showed
> before - see below), but the wms data doesn't show up nor does the wms on
> the administration interface (same as before).
>
> I also tried to figure out if I had some junk in the db, thus renamed the
> wms on the localhost, copied gui to new name , deleted the old wms , added
> new one, exported as sql and imported on server - still the same problem
> (works on localhost but not on server).
>
> When I load the mapbender app from the server  get the following error in
> firebug:
>
> wms[0] has no properties
> mb_mapObj_const("mapframe1", "maps", "625", "400", null)map.php (line 19)
> mb_registerMapObj("mapframe1", "maps", null, "625", "400")map.php (line 7)
> init_mod_map1()mod_map1.php (line 17)
> onload(load )mod_map1.php (line 1)
> [Break on this error]
> this.epsg=wms[0].gui_wms_epsg;this.extent=setExtent(this.width,this.height,t
> his....
>
> Anybody any hints what I can try to fix this ?
>
> Karsten
>
>
>
> Date: Tue, 1 Jan 2008 16:15:30 +0100 (CET)
> From: "Ulrich Rothstein" <uli.rothstein at wheregroup.com>
> Subject: Re: [Mapbender-users] problem with wms after importing gui on
> 	server
> To: "Mapbender User List" <mapbender_users at lists.osgeo.org>
> Message-ID: <33245.212.79.172.164.1199200530.squirrel at vogon.ccgis.de>
> Content-Type: text/plain;charset=iso-8859-1
>
> Hey Karsten,
>
> I just get an error-message if I try to load the capabilities document:
>
> msLoadMap(): General error message. Undefined overlay symbol "POINT" in
> class 0, style 1 of layer Active Attorneys. msAddImageSymbol(): Unable to
> access file. Error opening image file
> /var/www/mapdata/projects/alliance/POINT.
>
> regards
> Uli
>
>
> On Sat, December 29, 2007 9:04 am, karsten vennemann wrote:
>   
>> Hi list,
>>
>>
>>
>>
>> I'm working with mapbender 2.4.3 and created a gui including one wms
>> (http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/project
>> s/ alliance/ok_server.map
>> <http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/projec
>> ts/ alliance/ok_server.map&> &) on my local windows machine. There all is
>> working fine. I then exported the gui as sql and imported into the
>> mapbender database (postgis) on my linux server. The gui shows up on the
>> admin pages after I ran Insert into gui_mb_user Values
>>     
> ('ocla1',1,'owner');
>   
>>
>>
>> However, the wms does not show up when I load the gui, also I can't find
>> my wms in the table "wms" nor does it show up when I try to edit the wms
>> under Configue WMS access> WMS GUI settings in the WMS_TiTle list box.
>> I don't know whether a wms belonging to a gui usually is exported with the
>>  gui  - or whether I have to recreate that resource on the server again?
>>
>>
>>
>> Thus, I tried to recreate the wms with "load capabilities", however
>> trying to load
>>
>> http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/project
>> s/a lliance/ok_server.map
>> <http://alliance.terragis.net/cgi-bin/mapserv?map=/var/www/mapdata/projec
>> ts/
>> alliance/ok_server.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0>
>>  &REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0
>>
>>
>> gives me a violation of a constraint :-(:
>>
>> Warning: pg_exec() [function.pg-exec
>> <http://alliance.terragis.net/php/function.pg-exec> ]: Query failed:
>> ERROR:
>> duplicate key violates unique constraint "pk_gui_layer" in
>> /var/www/sites/mapbender/http/php/database-pgsql.php on line 133
>> sql error: ERROR: duplicate key violates unique constraint "pk_gui_layer"
>> ROLLBACK performed....
>>
>>
>>
>>
>> Now I'm stuck and don't know how to port gui and wms to the server. Any
>> ideas what went wrong, or how I can fix this?
>>
>> Karsten
>>
>>
>> _______________________________________________
>> Mapbender_users mailing list
>> Mapbender_users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapbender_users
>>
>>
>>     
>
>
>   


More information about the Mapbender_users mailing list