Discussion:
Webboard: database connection
b***@mnogosearch.org
2013-10-21 09:02:47 UTC
Permalink
Author: erwan plop
Email:
Message:
Hi,
I try to use mnoGoSearch 3.3.14 on my website but I have some trouble.
The indexation works fine but after when I try to do a query, I always have no results. I activated the log and I noticed something weird, indeed, even when I put irrelevant password or username, mnoGoSearch seems to have no complaint and tell it's connected to the database and will do the query and of course for this case I have got no results. So, according to the log file, everything works fine but it's not...
Do you know what could be the problem here ?

Thanks

Reply: <http://www.mnogosearch.org/board/message.php?id=21543>
b***@mnogosearch.org
2013-10-21 09:52:04 UTC
Permalink
Author: monsieurpaul
Email:
Message:
hi,

did you check that you have activated the right database connexion in your search.htm?

Reply: <http://www.mnogosearch.org/board/message.php?id=21544>
b***@mnogosearch.org
2013-10-21 09:52:59 UTC
Permalink
Author: Alexander Barkov
Email: ***@mnogosearch.org
Message:
Hi,
Post by b***@mnogosearch.org
Hi,
I try to use mnoGoSearch 3.3.14 on my website but I have some trouble.
The indexation works fine but after when I try to do a query, I always have no results. I activated the log and I noticed something weird, indeed, even when I put irrelevant password or username, mnoGoSearch seems to have no complaint and tell it's connected to the database and will do the query and of course for this case I have got no results. So, according to the log file, everything works fine but it's not...
Do you know what could be the problem here ?
Thanks
Which log file do you mean?
search.cgi does not produce logs by default.

Make sure DBAddr in indexer.conf and in search.htm are the same.


Reply: <http://www.mnogosearch.org/board/message.php?id=21545>
b***@mnogosearch.org
2013-10-21 11:17:35 UTC
Permalink
Author: erwan plop
Email:
Message:
Thanks for the reply.
By log file, I uncommented this line 'LogLevel 6' in the search.htm.

I've got the same DBADDR in indexer.conf and in search.htm.



Reply: <http://www.mnogosearch.org/board/message.php?id=21546>
b***@mnogosearch.org
2013-10-21 11:59:22 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
Thanks for the reply.
By log file, I uncommented this line 'LogLevel 6' in the search.htm.
I've got the same DBADDR in indexer.conf and in search.htm.
Can you please try a wrong data base name instead of
a wrong user name or a password?


Reply: <http://www.mnogosearch.org/board/message.php?id=21547>
b***@mnogosearch.org
2013-10-21 12:02:15 UTC
Permalink
Author: erwan plop
Email:
Message:
It's the same thing, no error shows up in the log.

Reply: <http://www.mnogosearch.org/board/message.php?id=21548>
b***@mnogosearch.org
2013-10-21 12:23:20 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
It's the same thing, no error shows up in the log.
Please post the output from the log.


Reply: <http://www.mnogosearch.org/board/message.php?id=21549>
b***@mnogosearch.org
2013-10-21 12:32:23 UTC
Permalink
Author: erwan plop
Email:
Message:
Here is an example of the log.

Oct 21 05:15:30 fedora16 search.cgi[8300]: search.cgi started with '/usr/local/mnogosearch/etc/search.htm'
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start UdmFind
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start Prepare
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop Prepare 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start FindWords
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start FindWordsDB for oracle://****:****@127.0.0.1:1521/orcl/?dbmode=blob
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start loading limits
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop loading limits 0.00 (0 URLs found)
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start fetching words
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start search for 'homme'
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start fetching
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop FindWordsDB: 0.21
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start UdmConvert
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop UdmConvert: 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start Excerpts
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop Excerpts: 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start WordInfo
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop WordInfo: 0.00
Oct 21 05:15:31 fedora16 search.cgi[8300]: Stop UdmFind: 0.21

Reply: <http://www.mnogosearch.org/board/message.php?id=21550>
b***@mnogosearch.org
2013-10-21 13:57:26 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
Here is an example of the log.
Oct 21 05:15:30 fedora16 search.cgi[8300]: search.cgi started with '/usr/local/mnogosearch/etc/search.htm'
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start UdmFind
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start Prepare
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop Prepare 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start FindWords
Reply: <http://www.mnogosearch.org/board/message.php?id=21551>
b***@mnogosearch.org
2013-10-21 14:00:07 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
Here is an example of the log.
Oct 21 05:15:30 fedora16 search.cgi[8300]: search.cgi started with '/usr/local/mnogosearch/etc/search.htm'
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start UdmFind
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start Prepare
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop Prepare 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start FindWords
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start loading limits
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop loading limits 0.00 (0 URLs found)
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start fetching words
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start search for 'homme'
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start fetching
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop FindWordsDB: 0.21
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start UdmConvert
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop UdmConvert: 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start Excerpts
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop Excerpts: 0.00
Oct 21 05:15:30 fedora16 search.cgi[8300]: Start WordInfo
Oct 21 05:15:30 fedora16 search.cgi[8300]: Stop WordInfo: 0.00
Oct 21 05:15:31 fedora16 search.cgi[8300]: Stop UdmFind: 0.21
The error message is not in fact printed in the error log.
It's printed in the search output, like this:

An error occurred!

DB err: Oracle: InitDB: ORA-12154: TNS:could not resolve the connect identifier specified! -



Btw, is "orlc" a valid Oracle SID that is configured in
tnsnames.ora and/or listener.ora ?


Reply: <http://www.mnogosearch.org/board/message.php?id=21552>
b***@mnogosearch.org
2013-10-21 14:08:35 UTC
Permalink
Author: erwan plop
Email:
Message:
Yes, orcl is a valid SID for the database in question.

If I use the search.cgi by command line and an error occured, the error will be printed on the stdout/stderr ?
Because mnoGoSearch never printed any error relating to the connection to the database.

Reply: <http://www.mnogosearch.org/board/message.php?id=21553>
b***@mnogosearch.org
2013-10-21 14:11:24 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
Yes, orcl is a valid SID for the database in question.
If I use the search.cgi by command line and an error occured, the error will be printed on the stdout/stderr ?
Because mnoGoSearch never printed any error relating to the connection to the database.
As I told in the previous letter, the error is printed to stdout,
like this:


An error occurred!

DB err: Oracle: InitDB: ORA-12154: TNS:could not resolve the connect identifier specified! -

Reply: <http://www.mnogosearch.org/board/message.php?id=21554>
b***@mnogosearch.org
2013-10-21 14:30:25 UTC
Permalink
Author: erwan plop
Email:
Message:
Ok, I don't have any error message, the output always looks the same (the one I copy in a previous message), no matter what I put in the DBADDR. That's why I really don't know how to resolve this issue.

Reply: <http://www.mnogosearch.org/board/message.php?id=21555>
b***@mnogosearch.org
2013-10-21 20:40:43 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
Ok, I don't have any error message, the output always looks the same (the one I copy in a previous message), no matter what I put in the DBADDR. That's why I really don't know how to resolve this issue.
Please try to run it from command line:

./search.cgi test > test.html

then check test.html in the browser.

Does it display the error message?

Make sure that you have the part of the template
that is responsible to print the error message:


<!--error-->
<CENTER>
<FONT COLOR="#FF0000">An error occurred!</FONT>
<P><B>$(E)</B>
</CENTER>
<!--/error-->


Reply: <http://www.mnogosearch.org/board/message.php?id=21556>
b***@mnogosearch.org
2013-10-22 07:29:15 UTC
Permalink
Author: erwan plop
Email:
Message:
Hi,
I ran /search.cgi test > test.html and this time, I've got an error which is : Unsupported DBAddr.
My database is an Oracle 11g and for the configure I dit : ./configure --with-oracle8i --enable-news. That's correct or this is where I made a mistake ?


Reply: <http://www.mnogosearch.org/board/message.php?id=21557>
b***@mnogosearch.org
2013-10-22 07:42:17 UTC
Permalink
Author: erwan plop
Email:
Message:
Sorry, I made a mistake, I forgot to replace the line DBaddr from a previous test...
In fact, I don't have any error and it's seem to work since I have got a result ("Search results: test : 64.")
So the problem comes from my node.xml, i'll look into that.

Thanks for your time

Reply: <http://www.mnogosearch.org/board/message.php?id=21558>
b***@mnogosearch.org
2013-10-22 08:58:02 UTC
Permalink
Author: erwan plop
Email:
Message:
So from a command line it works but when I try to use it from from my website, I've got the following error : DB err: Oracle: InitDB: ORA-12154: TNS:could not resolve the connect identifier specified! -


Reply: <http://www.mnogosearch.org/board/message.php?id=21559>
b***@mnogosearch.org
2013-10-22 10:19:03 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
So from a command line it works but when I try to use it from from my website, I've got the following error : DB err: Oracle: InitDB: ORA-12154: TNS:could not resolve the connect identifier specified! -
Perhaps it wants environment variables like ORACLE_HOME to be
set.

Configure your web server to set ORACLE_HOME and
all other environment variables that Oracle might need.



Reply: <http://www.mnogosearch.org/board/message.php?id=21560>
b***@mnogosearch.org
2013-10-22 12:00:59 UTC
Permalink
Author: erwan plop
Email:
Message:
I checked all the environment variable related to Oracle and everything is correct.

Reply: <http://www.mnogosearch.org/board/message.php?id=21561>
b***@mnogosearch.org
2013-10-22 12:29:28 UTC
Permalink
Author: Alexander Barkov
Post by b***@mnogosearch.org
I checked all the environment variable related to Oracle and everything is correct.
Something is different between when you run search.cgi from
command line and from the web server.


Possibly, the user that's running the web server
(usually "apache", or sometimes "nobody")
does not have read permissions to the oracle directories.

Try it from command line:
change user to "apache", then run search.cgi
and check its output.




Reply: <http://www.mnogosearch.org/board/message.php?id=21562>

Loading...