I'm trying to port a CakePHP application from WAMP (development machine) to LAMP (production server). In the WAMP instance submitting a search works. In the LAMP environment, search returns HTTP 500 error. Tomcat6 works and so does the :8080/solr/admin page. The CakePHP webapp works other than search.
Production Environment:
- Ubuntu 10.04
- Apache 2.2.14
- Tomcat6
- Solr 3.4.0
- CakePHP 1.3 (with solr-php-client)
- MySql 5.1.41
Observation: for the same search, the query strings are slightly different between the two environments. The LAMP version seems to be truncated, but I don't know how the value is derived so I can't be sure if the difference is significant.
LAMP (500 error): fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253A
WAMP (results) : fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253An%253A0%253A%257B%257D
Are there logs that might help troubleshoot the 500 error? Are there tests I can run directly through solr/admin that might shed light on the issue?
Problem solved. #aitchnyu: Thank you for your time and suggestions.
This turned out to be a CakePHP issue. The code to reference the php-solr-client classes works differently in WAMP and LAMP. In WAMP, code works when capitalizing file/folders properly. In LAMP, the reference must use all lower case with an added parameter containing properly capitalized file/folder names.
Here's where I found the answer:
http://cakebaker.42dh.com/2008/03/26/loading-vendor-files/
The different URLs in LAMP/WAMP appear to be insignificant.
Related
I am trying to install piwik on my machine using XAMPP as it requires PHP, apache and mysql. When i installed XAMPP and launched apache, it worked fine but when i am trying to access MySql admin through XAMPP or access sample php page (copied on xampp/htdocs folder), apache is getting redirected to IIS which is then not able to view page, showing 404.3 error (its looking for file in wwwroot, which is also not working after pasting in wwwroot).
My objective is to make piwik up and running on my machine. Another option is Unix server which is very new to me (i have been working in Windows ). I know one should have a web server loaded with MySql and PHP to run piwik (which is hardly half an hour job once we have all these) but coz different resource available, i am struggling to get this thing done.
Any help is highly appreciated.
After two days of R&D, i figured it out (well, sort of). So for anybody who is new in piwik and in linux/apache/php/mysql, here is what i did to achieve the objective. For those of you who are familiar with all these or few of these, you might have a better way or answer and i would really request you to improve this answer but this is to help someone who is new and does not know all things at once.
Here is what i did
--get apache
--get php (one of the requirement for piwik)
--get sql (again requirement)
--all should be running (get wamp (its carrying all three of the above)), make sure apache is running on port 80.
--install mysql but make sure only wamp's sql is running
--set passowrd for root in wamp->mysql-->mysqlConsole-->set password for 'root'#'localhost'=password('yourPasswordHere');
--Paste piwik folder in www directory
--open localhost through wamp,login in adminer and phpmyadmin (bottom right)
--run http://localhost:8080/piwik-->u will see directory listing, click on folder piwik. You should be able to see welcome screen for piwik installation
--make sure we have php 7 as selected version in wamp( for php, wamp was carrying two version so we can choose) to avoid error in system check step of installation
--Follow the steps which are very straight forward.
This is something which worked out for me. Actual answer might be simpler or better. Hope it will help someone who is probably banging his/her head around and hitting some walls without getting something concrete.
Happy to help!!!
I am a bit confused about installing SOLR 5.5. The 5.5 manual says it is not recommended to deploy solr war on any other web/application servlet containers. It says deploy solr as a stand alone server. What does this mean? SOLR running on port 8983 is not running out of jetty? SOLR itself is a web server? How stable will it be in a prod environment?
I followed all the instructions on https://cwiki.apache.org/confluence/display/solr/Installing+Solr
https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production
Appreciate if someone can share their experience.
It's using Jetty, but it might not in the future (as there are quite a few things that gets easier to implement when you don't have to consider the webapp framework around your service). That's why 5.0 dropped explicit support for running in an existing container (it can still be done - but you're on your own, and features may break). At least now the environment for the application can be assumed to be a certain container and have a specific feature set.
I'm running Solr 4.2 and would like to try out LucidWorks Banana product. However, when I navigate to the banana directory on my Solr server, I receive a 404 error.
I'm following the instructions from their github site here, basically dropping the banana src directory into the my SOLR_HOME\solr-webapp\webapp directory.
I've tried modifying the src\config.js and src\app\dashboards\default.json files as suggested by the readme file to change the localhost URL to the actual server name or the IP address. Both attempts still resulted in the 404 error.
Has anyone had luck in getting banana working with Solr 4.2? Is it not supported on this version of Solr? Hopefully I'm missing something really simple.
Thanks!
At LucidWorks, we have only tested Banana on Solr 4.4 and above. So, I am not sure whether all the functionality will work with Solr 4.2. However, I do know a couple of users on Solr 4.3 (who might have made some small code changes).
That said, the webapp is just javascript/html and should at least come up (maybe with errors on the dashboard, but not a 404), even without modifying config.js/default.json.
Just to confirm your process (from https://github.com/LucidWorks/banana/blob/release/QUICKSTART):
Copy Banana folder to $SOLR_HOME/example/solr-webapp/webapp/
Browse to http://localhost:8983/solr/banana/src/index.html#/dashboard
If you dropped the src folder (and not the banana folder), then you will need to
browse to http://solrserver.yourdomain.com:8983/solr/src/index.html#/dashboard
I figured this out thanks to Ravi's suggestion that made me re-examine my configuration.
Turns out my web app was actually running from C:\Windows\solr-webapp, and not $SOLR_HOME\solr-webapp\webapp. I missed that my CWD was set to C:\Windows even though everything else was pointing to $SOLR_HOME directories.
Once I dropped the Banana folder into C:\Windows\solr-webapp\webapp, I was able to bring up the dashboard. Now I have other errors, but that's a different set of issues.
Hope this helps someone. TL;DR - make sure your CWD is consistent with the destination of banana.
Currently, I have developed a web application. In my web application, I used embedded solr server to make indexing. After that I deployed onto the Tomcat 6 on window xp. Everything is ok. Next, I have tried my web application to deploy on Amazon AWS. My platform is linux + mysql. When I deployed, I got the exception related with embedded solr.
[ WARN] 19:50:55 SolrCore - [] Solr index directory 'solrhome/./data/index' doesn't exist. Creating new index...
[ERROR] 19:50:55 CoreContainer - java.lang.RuntimeException: java.io.IOException: Cannot create directory: /usr/share/tomcat6/solrhome/./data/index
at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:403)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:552)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:480)
So how to fix my problem. I am novie to linux.
My guess is that the user you are running Solr under does not have permission to access that directory.
Also, which version of Solr are you using? Looks like 3+. The latest version is 4, so it may make sense to try using that from the start. Probably a bit more troubleshooting to start, but a much better pay off that starting with legacy configuration.
I got solution. That is because of permission affair on Amazon Linux with ec2-user. So , I changed permission by following.
sudo chmod -R ugo+rw /usr/share/tomcat6
http://wiki.apache.org/solr/SolrOnAmazonEC2strong text
t should allow access to ports 22 and 8983 for the IP you're working from, with routing prefix /32 (e.g., 4.2.2.1/32). This will limit access to your current machine. If you want wider access to the instance available to collaborate with others, you can specify that, but make sure you only allow as much access as needed. A Solr instance should not be exposed to general Internet traffic. If you need help figuring out what your IP is, you can always use whatismyip.com. Please note that production security on AWS is a wide ranging topic and is beyond the scope of this tutorial.
I am running Coldfusion 10 (10,0,9,284568) on Win7 64bit developer instance. Initially we had no need for SOLR, so we did not include it in the original ColdFusion install. However, we now have need, so I downloaded ColdFusion_10_Jetty_Solr_win.exe from adobe, and installed using default values, and received no errors. However, when I open CF Admin to add a collection, I receive the cannot create collection error.
What is the SOLR home directory supposed to be set to in ColdFusion Admin? I tried several values, (coldfusionjetty\solr, and coldfusionjetty\multicore\), and they all appear to work. But when I go to create a collection I always receive the cannot create error. I have uninstalled and reinstalled the ColdFusion 10 SOLR multiple times, but no improvement. Adobe has no documentation on this that I can find. Any ideas?
Edit:
--- nevermind, I was finally able to get it to work. For anyone else who wonders where the Coldfusion SOLR Home should be, I set the SOLR host to localhost and the SOLR home to C:/ColdFusionJetty/multicore/ using CF admin, saved, then created a collection and it worked. I swear I tried the multicore directory earlier, but perhaps not.
For anyone else who wonders where the Coldfusion SOLR Home should be, I set the SOLR host to localhost and the SOLR home to C:/ColdFusionJetty/multicore/ using CF admin, saved, then created a collection and it worked. I swear I tried the multicore directory earlier, but perhaps not.
References
Jetspeed Deployers Guide - Apache Tomcat Overview
Solr Tomcat
Apache Tomcat 7 (7.0.78) - Security Considerations
Solr Wiki: Why no WAR