So, I have two instance of solr node running along with a embedded zookeeper on a single machine using the link Set up solrCloud. Now I want to add a new machine to this cluster. I run bin\solr start -cloud -s ./solr -h newMachineIP -p 9000 -z oldMachineIP:9983. It shows successful startup, but when I create a new collection it gives me an error saying "Server refused connection at: http://newMachineIp:9000/solr"
just a guess but... does C:\path\to\dir\solr-7.1.0\solr-7.1.0\server\solr\gettingstarted contain any spaces? If so, install Solr into a path with no spaces, this has been an issue before in Windows, and it's possible it still is in some code paths. Solr on Windows get much less testing than on linux.
Related
I'm trying to set up 3 Solr (8.4.0) servers with a Zookeeper (3.7.0) ensemble on Windows Server 2019. Each server has one Solr instance and one Zookeeper installed. The problem I'm facing is that I'm getting an error when trying to start Solr pointing to multiple Zookeeper Ips:
.\solr start -c -z "172.29.70.47:2181,172.29.70.48:2181"
Console output:
Invalid command-line option: 172.29.70.48:2181
I have tried various combinations of this command with or without quotes, with or without ports etc but it fails every time. If I only specify one Zookeeper IP and port the command runs fine. As soon as I specify more than one IP it fails.
I've tried setting ZK_HOST in solr.in.cmd but it also fails to start. Even in the docs (https://solr.apache.org/guide/8_4/setting-up-an-external-zookeeper-ensemble.html#using-the-z-parameter-with-binsolr) it shows that configuring multiple IPs should be possible using the -z parameter.
What am I missing?
Thanks to MatsLindh I was able to figure out what the issue was. When using Powershell the double quotes need to be wrapped in single quotes so the command should look like:
.\solr start -c -z '"172.29.70.47:2181,172.29.70.48:2181,172.29.70.49:2181"'
Using Command Prompt in windows double quotes work as expected and the command should be:
solr start -c -z "172.29.70.47:2181,172.29.70.48:2181,172.29.70.49:2181"
I am using the cloned dspace 6-x branch and installed it via docker. Can someone help me with the backup of my local database (Communities, collections, items)to a remote database?
According to the documentation we need to use the command:
dspace packager -s -t AIP -e eperson -p parent-handle file-path
But it returns an error: dspace is not a command
Anyone could help me transfer my local database to my remote repo?
Thanks!
Moving publications to a new repository will be a more substantial undertaking!
But your recent problem seems just that you are either not on the right container or in the right directory for executing the dspace command. Thus it is "not found". Make sure to execute dspace on the dspace container and specify the right/complete path. The dspace command is located in
/path/to/your/dspace-deployement-directory/bin.
i was installing postgresql on ubuntu using linuxbrew:
brew install postgresql
it seems to work fine but after that because i was installing PostgreSQL for the first time i tried creating a database:
initdb /usr/local/var/postgres -E utf8
but it returned as:
initdb: command not found
i tried running the command with sudo but that doesn't helped
run locate initdb it should give you the list to chose. smth like:
MacBook-Air:~ vao$ locate initdb
/usr/local/Cellar/postgresql/9.5.3/bin/initdb
/usr/local/Cellar/postgresql/9.5.3/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.5.3/share/man/man1/initdb.1
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
/usr/local/Cellar/postgresql/9.6.1/share/doc/postgresql/html/app-initdb.html
/usr/local/Cellar/postgresql/9.6.1/share/man/man1/initdb.1
/usr/local/bin/initdb
/usr/local/share/man/man1/initdb.1
So in my case I want to run
/usr/local/Cellar/postgresql/9.6.1/bin/initdb
If you don't have mlocate installed, either install it or use
sudo find / -name initdb
There's a good answer to a similar question on SuperUser.
In short:
Postgres groups databases into "clusters", each of which is a named collection of databases sharing a configuration and data location, and running on a single server instance with its own TCP port.
If you only want a single instance of Postgres, the installation includes a cluster named "main", so you don't need to run initdb to create one.
If you do need multiple clusters, then the Postgres packages for Debian and Ubuntu provide a different command pg_createcluster to be used instead of initdb, with the latter not included in PATH so as to discourage end users from using it directly.
And if you're just trying to create a database, not a database cluster, use the createdb command instead.
I had the same problem and found the answer here.
Ubuntu path is
/usr/lib/postgresql/9.6/bin/initdb
Edit: Sorry, Ahmed asked about linuxbrew, I'm talking about Ubuntu.
I Hope this answer helps somebody.
I had a similar issue caused by the brew install postgresql not properly linking postgres. The solve for me was to run:
brew link --overwrite postgresql
you can add the PATH to run from any location
sudo nano ~/.profile
inside nano go to the end and add the following
# set PATH so it includes user's private bin if it exists
if [ -d "/usr/lib/postgresql/14/bin/" ] ; then
PATH="/usr/lib/postgresql/14/bin/:$PATH"
fi
and configure the alternative
sudo update-alternatives --install /usr/bin/initdb initdb /usr/lib/postgresql/14/bin/initdb 1
I have a git repository containing a solr/conf folder with solrconfig.xml and schema.xml. I've managed to create a local solr core and copy these files into it, but I expect there is an easier way than what I did, which was basically:
solr create -c mycorename
cp solr/conf/schema.xml /usr/local/Cellar/solr/5.5.0/server/solr/mycorename/conf
cp solr/conf/solrconfig.xml /usr/local/Cellar/solr/5.5.0/server/solr/mycorename/conf
...and restart the core to have the changes take effect.
My solution is not that complicated, but it requires a lot of specific knowledge of folders etc. and I'd like something simpler. Ideally, I would prefer that the core is created in-place in my existing folder.
If that is not possible I would like to have a simpler way that does not require knowledge of the specific solr folders on a developer's workstation. Maybe a couple of curl commands.
Your question is about best practice for creating a core from command line.
You already use
bin\solr create -c mycorename`
but at time you need a restart, because you change the config after creation.
Solr can copy your config files and creating the core in one step:
bin\solr create_core -c mycore -d c:/tmp/myconfig
If you are using SolrCloud you could work even more folder independent:
Add configuration folder to zookeeper
Create collection with this configuration
see also How to create new core in Solr 5?
To create Solr core, use solr script ran with solr user privileges, e.g.
sudo -u solr ./bin/solr create -c mycorename
I'm trying to install postgres 9.2 on a mac 10.6 using using KyngChaos (because ultimately I'd like to enable PostGIS, and this seems to be the best package to that with).
I get exactly the problem spelled out at the bottom of the page: http://www.kyngchaos.com/software/postgres
--
NOTE: I've had reports of the installer not initializing the data cluster, which results in Postgres not starting. It seems to be random, and I haven't figured out the cause yet. If Postgres won't start (you get an error "could not connect to server: No such file or directory" when trying to connect with psql), try manually initializing the cluster with:
/usr/local/pgsql-9.1/bin/initdb -U postgres \
-D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US"
Or see the Locales and Encodings readme if you need a different locale or encoding.
Then stop and start Postgres as specified in the readme.
--
I run
/usr/local/pgsql-9.1/bin/initdb -U postgres -D /usr/local/pgsql-9.1/data --encoding=UTF8 --locale=en_US"
which opens up a new line to enter additional commands with
>
but i'm lost there, even after combing the readme.