Hey, note that dpkg -r does not remove config files, so it might be that the file/directory was already there with wrong permissions (otherwise I would have seen that error on my local ubuntu as well I guess)? If you want to make sure that all old config data is removed, you need to call dpkg -P
I'd be very happy if you could reproduce it reliably so I can take a further look. --Alex On Mon, Mar 31, 2014 at 9:59 AM, Patrick Lock <[email protected]>wrote: > Hi, the reason I had to create the /etc/elasticsearch directory with an > empty file in it, is otherwise I would get a cannot create directory error > (possibly permissions problem). It is quite possible that I have messed up > the /etc/elasticsearch before, but I'm not sure how to rectify this > problem. I have tried deleting the directory but that results in the cannot > create directory error. > > Cheers > > > On Monday, 31 March 2014 08:30:29 UTC+1, Alexander Reelsen wrote: > >> Hey, >> >> if you create a file /etc/elasticsearch, then the debian package can not >> create a directory at the same position. Creating a directory instead might >> help (or remove everything with that name before the installation). >> Also, when you start elasticsearch, you should use the init script, >> otherwise logging is not configured appropriately (this is why you get the >> above error message). >> >> I could not reproduce that error when installing elasticsearch 1.0.1 on a >> local ubuntu VM, is it possible you have somehow messed up your >> /etc/elasticsearch directory/file before? >> >> >> --Alex >> >> >> On Mon, Mar 24, 2014 at 10:53 AM, Patrick Lock <[email protected]>wrote: >> >>> I am trying to install Elasticsearch 1.0.1 on Ubuntu 12.04. So far I >>> have done: >>> >>> First I removed the old elasticsearch 0.90 package >>> >>> sudo dpkg -r elasticsearch >>> >>> Then >>> >>> cd ~ >>> sudo apt-get update >>> sudo apt-get install openjdk-7-jre-headless -y >>> >>> wget >>> https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb >>> sudo dpkg -i elasticsearch-1.0.1.deb >>> >>> The last step results in the following >>> >>> (Reading database ... 57341 files and directories currently installed.) >>> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ... >>> Unpacking replacement elasticsearch ... >>> Setting up elasticsearch (1.0.1) ... >>> chown: cannot access `/etc/elasticsearch/*': No such file or directory >>> >>> So I created /etc/elasticsearch with a dummy file in it and then did >>> >>> sudo chmod 777 /etc/elasticsearch >>> >>> Now when I run >>> >>> sudo dpkg -i elasticsearch-1.0.1.deb >>> >>> I get >>> >>> (Reading database ... 57341 files and directories currently installed.) >>> Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ... >>> Unpacking replacement elasticsearch ... >>> Setting up elasticsearch (1.0.1) ... >>> Processing triggers for ureadahead ... >>> >>> But nothing appears in /etc/elasticsearch >>> >>> However I do get a folder appear in >>> >>> /usr/share/elasticsearch >>> >>> With the following contents >>> >>> bin core-signatures.txt lib NOTICE.txt README.textile >>> >>> From here if I run >>> >>> sudo bin/elasticsearch >>> >>> I get >>> >>> log4j:WARN No appenders could be found for logger (node). log4j:WARN >>> Please initialize the log4j system properly. log4j:WARN See >>> http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. >>> >>> And continues to run >>> >>> If I open a new window and run >>> >>> curl -XGET 'localhost:9200' >>> >>> I get >>> >>> { >>> "status" : 200, >>> "name" : "Volstagg", >>> "version" : { >>> "number" : "1.0.1", >>> "build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b", >>> "build_timestamp" : "2014-02-25T15:52:53Z", >>> "build_snapshot" : false, >>> "lucene_version" : "4.6" >>> }, >>> "tagline" : "You Know, for Search" >>> } >>> >>> So it appears to be running, and I can populate the search (symfony2 >>> FOSElasticaBundle) with >>> >>> php app/console fos:elastica:populate >>> >>> But if I do a search no results are found. >>> >>> >>> There is nothing in /etc/elasticsearch apart from the dummy file I >>> placed in there. >>> >>> I have found the configuration file at /etc/default/elasticsearch which >>> is all commented out at present. >>> >>> The Symfony2 error I get when trying to search is: ERROR - Caught >>> exception: SearchPhaseExecutionException[Failed to execute phase >>> [query], all shards failed >>> >>> So the question is please, has it installed or not and why isn't it >>> working properly? >>> >>> Thanks >>> >>> Patrick >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "elasticsearch" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8% >>> 40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/0dd824da-8c36-4954-9d3f-ffd037a36ab8%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/6b055e07-7b28-4a7b-b61c-2e12ea62541d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9%3Dj_LPJXgfmYU%3DLc-Hg4ygOEEvm7hbR7YjhWd-j8Gsjg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
