Opened 4 years ago

Closed 4 years ago

#5329 closed defect (fixed)

Button Search can't work on Web Interface

Reported by: sylvain.ballaud.externe@… Owned by: geocoding@…
Priority: blocker Milestone:
Component: nominatim Version:
Keywords: nominatim, search Cc: sylvain.ballaud.externe@…

Description

Hi,

I installed Nominatim 2.4. I imported a PBF file called ile-de-france-latest.osm.pbf. This action is OK but when i use the Web Interface, I found no city because the Search button don't work.

I see the map with a message "Data:" at the right of "Highlight".

Thank for help.

Attachments (5)

1.png (16.6 KB) - added by sylvain.ballaud.externe@… 4 years ago.
2.png (23.9 KB) - added by sylvain.ballaud.externe@… 4 years ago.
3.png (39.2 KB) - added by sylvain.ballaud.externe@… 4 years ago.
4.png (42.9 KB) - added by sylvain.ballaud.externe@… 4 years ago.
5.png (51.0 KB) - added by sylvain.ballaud.externe@… 4 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 4 years ago by Sarah Hoffmann

This sounds like your database isn't set up properly. You can check the status of your server at the URL http://<yourserver>/nominatim/status.php. Also check the error logs of apache and postgresql.

comment:2 Changed 4 years ago by sylvain.ballaud.externe@…

Thank for the answer. I restart the PostgreSQL and Apache servers.

When i check the status of the server through the PHP page, the server display "OK".

When i look the apache logs, i have this :

[Thu Jul 09 08:42:51 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 08:42:51 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 08:42:51 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 08:43:13 2015] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /soft/nominatim/lib/log.php on line 12
[Thu Jul 09 08:43:13 2015] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /soft/nominatim/lib/log.php on line 58

I don't think it's very serious. The postgreSQL logs is not very verbose :

LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2015-07-09 08:53:16 CEST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

But when i imported the PBF file, i have more errors on the database :

FATAL:  database "nominatim" does not exist
WARNING:  => is deprecated as an operator name
DETAIL:  This name may be disallowed altogether in future versions of PostgreSQL.
ERROR:  role "mqmgr" does not exist
STATEMENT:  ALTER TABLE public.us_postcode OWNER TO mqmgr;
ERROR:  relation "query_log" does not exist at character 13
STATEMENT:  insert into query_log values ('2015-07-07 10:35:01.6937','','10.68.3.204')
ERROR:  relation "new_query_log" does not exist at character 13
STATEMENT:  insert into new_query_log (type,starttime,query,ipaddress,useragent,language,format) values ('search','2015-07-07 10:35:01.6937','','10.68.3.204','Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0','short_name:en-US,short_name:en,name:en-US,name:en,place_name:en-US,place_name:en,official_name:en-US,official_name:en,short_name,name,place_name,official_name,ref,type','')
ERROR:  relation "import_status" does not exist at character 90
STATEMENT:  select TO_CHAR(lastimportdate - '2 minutes'::interval,'YYYY/MM/DD HH24:MI')||' GMT' from import_status limit 1
ERROR:  relation "query_log" does not exist at character 8
STATEMENT:  update query_log set endtime = '2015-07-07 10:35:01.6982', results = 0 where starttime = '2015-07-07 10:35:01.6937' and ipaddress = '10.68.3.204' and query = ''
ERROR:  relation "new_query_log" does not exist at character 8
STATEMENT:  update new_query_log set endtime = '2015-07-07 10:35:01.6982', results = 0 where starttime = '2015-07-07 10:35:01.6937' and ipaddress = '10.68.3.204' and query = ''


LOG:  unexpected EOF on client connection
ERROR:  index "idx_placex_sector" does not exist
STATEMENT:  drop index idx_placex_sector;
ERROR:  sequence "seq_postcodes" does not exist
STATEMENT:  DROP SEQUENCE seq_postcodes;
ERROR:  table "import_polygon_error" does not exist
STATEMENT:  drop table import_polygon_error;
ERROR:  table "import_polygon_delete" does not exist
STATEMENT:  drop table import_polygon_delete;
ERROR:  sequence "file" does not exist
STATEMENT:  drop sequence file;
ERROR:  index "idx_osm_id" does not exist
STATEMENT:  DROP INDEX public.idx_osm_id;

ERROR:  constraint "pagelinks_pkey" of relation "wikipedia_article" does not exist
STATEMENT:  ALTER TABLE ONLY public.wikipedia_article DROP CONSTRAINT pagelinks_pkey;

ERROR:  role "brian" does not exist
STATEMENT:  ALTER TABLE public.wikipedia_article OWNER TO brian;


ERROR:  index "idx_wikipedia_redirect_from_title" does not exist
STATEMENT:  DROP INDEX public.idx_wikipedia_redirect_from_title;

ERROR:  role "brian" does not exist
STATEMENT:  ALTER TABLE public.wikipedia_redirect OWNER TO brian;


LOG:  sending cancel to blocking autovacuum PID 6075
DETAIL:  Process 9234 waits for AccessExclusiveLock on relation 160000 of database 152621.
STATEMENT:  DROP INDEX IF EXISTS idx_placex_rank_search;
ERROR:  canceling autovacuum task
CONTEXT:  automatic vacuum of table "nominatim.public.placex"

However, the import was a success.

Regards.

comment:3 Changed 4 years ago by Sarah Hoffmann

Try a simple query like http://<yourserver>/nominatim/search.php?q=foo&format=xml If that gives you a server error, try again in debug mode: http://<yourserver>/nominatim/search.php?q=foo&format=xml&debug=1

If you get a sensible result (i.e. some kind of xml) then there is probably a problem with the website setup. Check again that you have set CONST_Website_BaseURL correctly in your settings/local.php and use the browser debug mode to check if it cannot load some ressources.

Changed 4 years ago by sylvain.ballaud.externe@…

Attachment: 1.png added

Changed 4 years ago by sylvain.ballaud.externe@…

Attachment: 2.png added

Changed 4 years ago by sylvain.ballaud.externe@…

Attachment: 3.png added

comment:4 Changed 4 years ago by sylvain.ballaud.externe@…

I attached 3 files with the results of the two queries and the result of my research (for example, paris).

With Firebug, i see some errors like this :

NetworkError: 407 Proxy Authentication Required - http://b.tile.openstreetmap.org/18/132837/90143.png".

But it's only with some PNG files.

comment:5 Changed 4 years ago by sylvain.ballaud.externe@…

On Internet Explorer, for the query without debug mode, I have this :

  <?xml version="1.0" encoding="UTF-8" ?> 
  <searchresults timestamp="Thu, 09 Jul 15 11:40:09 +0200" attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright" querystring="foo" polygon="false" more_url="http://psu884:8080search?format=xml&exclude_place_ids=&accept-language=fr-FR&q=foo" />

comment:6 Changed 4 years ago by Sarah Hoffmann

For the error in 1.png, see https://wiki.openstreetmap.org/wiki/Nominatim/Installation/Troubleshooting#I_get_an_error_XML_Parsing_Error:_XML_or_text_declaration_not_at_start_of_entity_Location.

Could you then repeat the query with q=paris&format=xml&debug=1

It looks like there is really just a problem with showing the html on the website (possibly related to the authenticated proxy), Nominatim itself seems to be doing ok.

comment:7 Changed 4 years ago by sylvain.ballaud.externe@…

I changed the php.ini with this :

date.timezone = 'Europe/Paris'

No others PHP Warning on Apache. This is the result of the query :

string(136) "select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' paris','paris')" array(1) { [0]=> array(3) { ["string"]=> string(5) "paris" ["words"]=> array(1) { [0]=> string(5) "paris" } ["wordsets"]=> array(1) { [0]=> array(1) { [0]=> string(5) "paris" } } } } array(2) { [" paris"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(5) "39933" ["word_token"]=> string(6) " paris" ["word"]=> string(5) "paris" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["paris"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(3) "284" ["word_token"]=> string(5) "paris" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(4) "5685" } } } array(2) { [1]=> array(1) { [0]=> array(16) { ["iSearchRank"]=> int(1) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [39933]=> string(5) "39933" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } [2]=> array(1) { [0]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [284]=> string(3) "284" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } }
rank	Name Tokens	Name Not	Address Tokens	Address Not	country	operator	class	type	house#	Lat	Lon	Radius
1	# paris(39933)#											
2	#paris(284)#											
Search Loop, group 1, loop 1
rank	Name Tokens	Name Not	Address Tokens	Address Not	country	operator	class	type	house#	Lat	Lon	Radius
1	# paris(39933)#											
string(214) "select place_id, 0::int as exactmatch from search_name where name_vector @> ARRAY[39933] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 20"
Place IDs: array(17) { [0]=> string(6) "101375" [1]=> string(6) "854399" [2]=> string(6) "859305" [3]=> string(6) "856181" [4]=> string(6) "156081" [5]=> string(6) "280198" [6]=> string(6) "318451" [7]=> string(6) "378529" [8]=> string(6) "501719" [9]=> string(6) "514761" [10]=> string(6) "725418" [11]=> string(6) "778426" [12]=> string(6) "856293" [13]=> string(6) "109932" [14]=> string(6) "172079" [15]=> string(6) "199487" [16]=> string(6) "261681" } string(4643) "select osm_type,osm_id,class,type,admin_level,rank_search,rank_address,min(place_id) as place_id, min(parent_place_id) as parent_place_id, calculated_country_code as country_code,get_address_by_language(place_id, ARRAY['short_name:fr','short_name:fr-FR','short_name:en-US','short_name:en','name:fr','name:fr-FR','name:en-US','name:en','place_name:fr','place_name:fr-FR','place_name:en-US','place_name:en','official_name:fr','official_name:fr-FR','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type']) as langaddress,get_name_by_language(name, ARRAY['short_name:fr','short_name:fr-FR','short_name:en-US','short_name:en','name:fr','name:fr-FR','name:en-US','name:en','place_name:fr','place_name:fr-FR','place_name:en-US','place_name:en','official_name:fr','official_name:fr-FR','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type']) as placename,get_name_by_language(name, ARRAY['ref']) as ref,avg(ST_X(centroid)) as lon,avg(ST_Y(centroid)) as lat, coalesce(importance,0.75-(rank_search::float/40)) as importance, (select max(p.importance*(p.rank_address+2)) from place_addressline s, placex p where s.place_id = min(CASE WHEN placex.rank_search < 28 THEN placex.place_id ELSE placex.parent_place_id END) and p.place_id = s.address_place_id and s.isaddress and p.importance is not null) as addressimportance, (extratags->'place') as extra_place from placex where place_id in (101375,854399,859305,856181,156081,280198,318451,378529,501719,514761,725418,778426,856293,109932,172079,199487,261681) and (placex.rank_address between 0 and 30 OR (extratags->'place') = 'city') and linked_place_id is null group by osm_type,osm_id,class,type,admin_level,rank_search,rank_address,calculated_country_code,importance,langaddress ,placename ,ref ,extratags->'place' union select 'T' as osm_type,place_id as osm_id,'place' as class,'house' as type,null as admin_level,30 as rank_search,30 as rank_address,min(place_id) as place_id, min(parent_place_id) as parent_place_id,'us' as country_code,get_address_by_language(place_id, ARRAY['short_name:fr','short_name:fr-FR','short_name:en-US','short_name:en','name:fr','name:fr-FR','name:en-US','name:en','place_name:fr','place_name:fr-FR','place_name:en-US','place_name:en','official_name:fr','official_name:fr-FR','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type']) as langaddress,null as placename,null as ref,avg(ST_X(centroid)) as lon,avg(ST_Y(centroid)) as lat, -1.15 as importance, (select max(p.importance*(p.rank_address+2)) from place_addressline s, placex p where s.place_id = min(location_property_tiger.parent_place_id) and p.place_id = s.address_place_id and s.isaddress and p.importance is not null) as addressimportance, null as extra_place from location_property_tiger where place_id in (101375,854399,859305,856181,156081,280198,318451,378529,501719,514761,725418,778426,856293,109932,172079,199487,261681) and 30 between 0 and 30 group by place_id union select 'L' as osm_type,place_id as osm_id,'place' as class,'house' as type,null as admin_level,30 as rank_search,30 as rank_address,min(place_id) as place_id, min(parent_place_id) as parent_place_id,'us' as country_code,get_address_by_language(place_id, ARRAY['short_name:fr','short_name:fr-FR','short_name:en-US','short_name:en','name:fr','name:fr-FR','name:en-US','name:en','place_name:fr','place_name:fr-FR','place_name:en-US','place_name:en','official_name:fr','official_name:fr-FR','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type']) as langaddress,null as placename,null as ref,avg(ST_X(centroid)) as lon,avg(ST_Y(centroid)) as lat, -1.10 as importance, (select max(p.importance*(p.rank_address+2)) from place_addressline s, placex p where s.place_id = min(location_property_aux.parent_place_id) and p.place_id = s.address_place_id and s.isaddress and p.importance is not null) as addressimportance, null as extra_place from location_property_aux where place_id in (101375,854399,859305,856181,156081,280198,318451,378529,501719,514761,725418,778426,856293,109932,172079,199487,261681) and 30 between 0 and 30 group by place_id,get_address_by_language(place_id, ARRAY['short_name:fr','short_name:fr-FR','short_name:en-US','short_name:en','name:fr','name:fr-FR','name:en-US','name:en','place_name:fr','place_name:fr-FR','place_name:en-US','place_name:en','official_name:fr','official_name:fr-FR','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type']) order by importance desc" Recheck words:<\i>array(1) { [1]=> string(5) "paris" }

But I have always no reaction when i click on Search. About the PNG errors with "NetworkError?: 407 Proxy Authentication Required", they appears when i zoom on the map.

comment:8 Changed 4 years ago by Sarah Hoffmann

So the database and search are obviously working fine. My guess is that javascript isn't loading properly, just like the pngs. The issue is with your local network setup. This is outside the scope of Nominatim, I can't help you with that, I'm afraid.

Changed 4 years ago by sylvain.ballaud.externe@…

Attachment: 4.png added

Changed 4 years ago by sylvain.ballaud.externe@…

Attachment: 5.png added

comment:9 Changed 4 years ago by sylvain.ballaud.externe@…

I compared with firebug the errors when i access to the application that i installed and your demonstration application on your website http://www.openstreetmap.org.

On the 2 sides, i have the PNG errors. But on your website, i have 3 queries GET. I attached the pictures.

comment:10 Changed 4 years ago by sylvain.ballaud.externe@…

Also, I have others errors on Apache :

[Thu Jul 09 13:57:36 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 13:57:36 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 14:17:16 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/nominatim.xml
[Thu Jul 09 14:20:20 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico
[Thu Jul 09 14:20:20 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/nominatim/favicon.ico

comment:11 Changed 4 years ago by sylvain.ballaud.externe@…

It's OK. We find the problem. It's on the local.php. I forget a "/" at the end of the string.

You can close the ticket.

Regards.

comment:12 Changed 4 years ago by Sarah Hoffmann

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.