Forums / Developer / ezfind installation : updatesearchindexsolr

ezfind installation : updatesearchindexsolr

Author Message

Kévin S.

Monday 20 September 2010 1:56:39 am

Hello !

I am trying to install ezfind on my local ezpublish. I have followed the steps of the provided documentation to do so.The step 5.1 : Updating the search index (page 9) prompts to execute this command :

php extension/ezfind/bin/php/updatesearchindexsolr.php -s <admin siteaccess> --php-exec=php --conc=2

My admin siteaccess is ezwebin_site_admin so I use this one to start the indexation :

php extension/ezfind/bin/php/updatesearchindexsolr.php -s ezwebin_site_admin --php-exec=php --conc=2

All I get is "An unexpected error has occurred. Please contact the webmaster."
This message isn't quite helpful... has anyone ever had this problem and knows how to solve it ?

Thank you !

___

Kévin

Matthieu Sévère

Monday 20 September 2010 2:07:24 am

Hello,

Try to look in your var/log/error.log you may get some more usefull information

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 2:38:59 am

Thank you Matthieu ! I should have this reflex !

The log tells me that this is a database connection error :

"

[ Sep 20 2010 11:32:52 ] [] eZMySQLiDB:Connection error: Couldn't connect to database. Please try again later or inform the system administrator.Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

[ Sep 20 2010 11:32:52 ] Unexpected error, the message was : Unable to connect to the database server 'localhost' in /Applications/MAMP/htdocs/ezpublish_clean/lib/ezdb/classes/ezmysqlidb.php on line 157

"

The database connection configuration, in settings/siteaccess/ezwebin_site_admin/site.ini.append is :

[DatabaseSettings]

DatabaseImplementation=ezmysqli

Server=localhost

Port=

User=ezadmin_clean

Password=admin

Database=ezpublish_clean

Charset=

Socket=disabled

I am looking for the source of the error. If anyone knows it, don't hesitate to post !

___

Kévin

Matthieu Sévère

Monday 20 September 2010 2:47:37 am

Is your site access ezwebin_site_admin working ?

Do you have database configuration up to date in your settings/siteaccess/ezwebin_site_admin/site.ini.append.php ?

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 2:53:02 am

Yes, the admin siteaccess is working and its database configuration is OK :

[DatabaseSettings]

DatabaseImplementation=ezmysqli

Server=localhost

Port=

User=ezadmin_clean

Password=admin

Database=ezpublish_clean

Charset=

Socket=disabled

(Sorry, I have just edited the previous post)

I don't understand why it doesn't want to connect ... I tried to add a port number (8888 on mac os x) and a charset, no result.

Matthieu Sévère

Monday 20 September 2010 3:04:44 am

Oh you use MySQLi, I have never try with it, can't say ...

Maybe if you have a working MySQL server you can try with it, it should work better

--
eZ certified developer: http://ez.no/certification/verify/346216

Kévin S.

Monday 20 September 2010 3:09:19 am

OK, I have no choice than to try it out with mysql then... it is embarrassing though, because the prod site on which I'll have to install ezfind are working with MySQLi ...

If anyone can help me with that, don't hesitate !

Kévin S.

Monday 20 September 2010 3:31:17 am

I have just tried it out with a MySQL database. I have exactely the same problem, so it doesn't seem to be related to the DB engine.

Ivo Lukac

Monday 20 September 2010 4:08:02 am

If the admin interface is working, but the scripot is not you should check the differences between your php.ini and php-cli.ini.

Default mysql port is 3306, so if you have some custom, you should put in ini. Maybe your MAMP bundle configured the custom port in php.ini, and not in php-cli.ini (a wild guess)

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Monday 20 September 2010 5:32:06 am

I can't find any php-cli.ini file. What is it supposed to do ?

Ivo Lukac

Monday 20 September 2010 5:52:06 am

"

I can't find any php-cli.ini file. What is it supposed to do ?

"

This is special php.ini for command line php command. But if you can't find it then it should use standard php.ini.

I must say that I don't have a clue what is going on... Did you clear the cache?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Monday 20 September 2010 10:08:02 am

Yes, I did it several times...

Ivo Lukac

Tuesday 21 September 2010 4:10:50 am

Did you check what php you are running with: whereis php and php -version?

Maybe you are using some other php then intended...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Tuesday 21 September 2010 9:08:49 am

The command 'whereis php' returns this :

/usr/bin/php

'php -version' gives me this :

php -versionPHP 5.2.12 (cli) (built: Feb  9 2010 00:34:23) Copyright (c) 1997-2009 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

I think everything is OK here, no ?

What is really strange is that, ezmysql(i).php uses the same identifiers than the administration interface ... those given in settings/siteaccess/ezwebin_site_admin/site.ini.append. I really don't understand why it doesn't manage to connect to the DB !

Maybe this php scripts don't have the same rights than ezpublish ones ... but I wouldn't know why ...

Kévin S.

Tuesday 21 September 2010 9:29:58 am

I finally got this script connect to the database ! It was a problem of mysql socket. All I had to do was create a link /var/mysql/mysql.sock towards the socket /Applications/MAMP/tmp/mysql/mysql.sock

You can find more information here.

Thank you to Ivo & Matthieu for your help !

___

Kévin

eZ debug

Timing: Jan 17 2025 23:58:37
Script start
Timing: Jan 17 2025 23:58:37
Module start 'content'
Timing: Jan 17 2025 23:58:38
Module end 'content'
Timing: Jan 17 2025 23:58:38
Script end

Main resources:

Total runtime1.1818 sec
Peak memory usage4,096.0000 KB
Database Queries233

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0109 587.8438180.8125
Module start 'content' 0.01091.0298 768.6563735.1328
Module end 'content' 1.04070.1410 1,503.7891357.3047
Script end 1.1817  1,861.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.4100210.0002
Check MTime0.00170.1417210.0001
Mysql Total
Database connection0.00320.269310.0032
Mysqli_queries1.073290.81262330.0046
Looping result0.00250.21262310.0000
Template Total1.141596.620.5708
Template load0.00230.195220.0012
Template processing1.139296.398820.5696
Template load and register function0.00010.012110.0001
states
state_id_array0.00110.088910.0011
state_identifier_array0.00090.079420.0005
Override
Cache load0.00230.1908810.0000
Sytem overhead
Fetch class attribute can translate value0.00150.123840.0004
Fetch class attribute name0.00140.1165170.0001
XML
Image XML parsing0.00130.110240.0003
class_abstraction
Instantiating content class attribute0.00000.0037210.0000
General
dbfile0.00270.2258340.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
15content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
24content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 58
 Number of unique templates used: 10

Time used to render debug report: 0.0002 secs