ERROR: -Xdebug is not supported by this script - solr

bin/solr start -e techproducts -m 5g -Duser.timezone=US/Eastern -Xdebug -Xrunjdwp:server=y,suspend=n,transport=dt_socket,address=8000
ERROR: -Xdebug is not supported by this script
when i am running solr6.6 on debug mode, its giving me error.
can someone tell me how to run solr on debug mode?

This exact use case is given in the examples in the script:
./solr start -c -m 1g -z localhost:2181 -a \"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\""
-a Additional parameters to pass to the JVM when starting Solr, such as to setup
Java debug options. For example, to enable a Java debugger to attach to the Solr JVM
you could pass: -a \"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\"
In most cases, you should wrap the additional parameters in double quotes.

Related

How to start Solr Cloud collection without -e -cloud

I use Solr Cloud for my project and I always start it with bin/solr start -e -cloud that always prompt all the questions for making a new collection or re-use one.
But is there a command that can directly start the collection I want, like bin/solr start [collectionName] -cloud -p 8983?
I didn't find anything in the Solr Manual.
Thanks :)
All collections are available by default, so starting Solr in cloud mode should be enough.
bin/solr start -c
The default port is 8983, so there is no need to give the -p parameter unless you're changing it.

How to get Solr console to output the commands used to perform an action?

I am following a tutorial and (just like in the official tutorial) when you execute a command with Solr if outputs the commands that were sent to, and received from, the Solr server to perform the action like so:
$ bin/solr create_core -c films
WARNING: Using _default configset. Data driven schema functionality is enabled
by default, which is NOT RECOMMENDED for production use.
To turn it off:
curl http://localhost:8983/solr/films/config -d
'{"set-user-property": {"update.autoCreateFields":"false"}}'
Copying configuration to new core instance directory:
/home/paul/solr-7.0.0/server/solr/films
Creating new core 'films' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=films&instanceDire=films
{
"responseHeader":{
"status":0,
"QTime:1222},
"core":"films"}
When I run the same command I get
bin/solr create_core -c films
WARNING: Using _default configset with data driven schema functionality. NOT RECOMMENDED for production use.
To turn off: bin/solr config -c films -p 8983 -action set-user-property -property update.autoCreateFields -value false
INFO - 2018-12-07 10:00:10.021; org.apache.solr.util.configuration.SSLCredentialProviderFactory; Processing SSL Credential Provider chain: env;sysprop
Created new core 'films'
How Do I get my Solr commancds to output the extra information?
Append the -V argument when invoking bin/solr:
-V Enable more verbose output.
.. making the end command be bin/solr create_core -c films -V.

How does solr loads configsets in examples provided by solr?

I have started learning solr.I have downloaded the latest zip(5.1.0) provided by solr and run the server using bin/solr start -e cloud -noprompt.
I check that this internally calls
bin/solr start -cloud -s example/cloud/node1/solr -p 8983
bin/solr start -cloud -s example/cloud/node2/solr -p 7574 -z localhost:9983
I check that these is no config(conf/solrconfig.xml) defined in example/cloud/node1/solr so how does solr load config from the SOLR_HOME/configsets directory?
I read the documentation on several places but i am still unable to figure out the use of cloud like in 'bin/solr start -cloud -s ... ' and use of zookeeper.
Please help.
when you are working on solr cloud with zookeeper, you have to upload your solr config on zookeeper.
./bin/solr zk -upconfig -z localhost:2181,localhost:2182,localhost:2182 -n my-config -d server/solr/files/conf/
using upconfig you can upload your solr config, only have to provide path of your config directory.
You can use config name(my-config) for create core using api.
http://XXX.XXX.XXX.XXX:8983/solr/admin/collections?action=CREATE&name=irTest&numShards=3&replicationFactor=2&maxShardsPerNode=3&collection.configName=my-config
So it will create core using your config only.
Download the latest version of the Apache solr reference guide.
https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/apache-solr-ref-guide-5.1.pdf
check this section in the PDF.
Configuration Directories and SolrCloud
Since you are not specifying a specific configset, the default is loaded.
First, if you don't provide the -d or -n options, then the default
configuration ($SOLR_HOME/server/solr/con
figsets/data_driven_schema_configs/conf) is uploaded to ZooKeeper
using the same name as the collection

Solr 5.0: Unable to start Solr with Zookeeper Ensemble

I have 3 Zookeeper servers running at server1:2181, server2:2181 and server3:2181.
I want to start 4 Solr servers at server1:8983,server2:8983,server3:8983 and server4:8983 to point to Zookeeper Ensemble above. So at server1, I run a command:
bin>solr -c -z server1:2181,server2:2181,server3:2181 -m 2g
and I received an error message:
Missing operand.
Invalid command-line option: server2:2181
Usage:.........
but if I point to one Zookeeper server such as:
bin>solr -c -z server1:2181 -m 2g
it starts successfully.
All server running in Windows.
What did I do wrong? Or does the Solr start script in Windows have an error?
You need to put your zk connection string in quotes.

PostgreSQL installation as a user on Cygwin

I'm trying to install PostgreSQL on Cygwin as a user following the instructions given in the cygwin package installation:
cygrunsrv -S cygserver
initdb -D /usr/share/postgresql/data
pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log
createdb
psql
After I do the third step, I get the following output in the terminal,
$ postgres -D /usr/share/postgresql/data
LOG: database system was shut down at 2013-04-12 19:04:33 PDT
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
After that, I'm unsure on what to do since I never see the command line again(the "$" sign). I'm a complete beginner when it comes to databases, so are there any 'for dummies' pointers for me?
Use pg_ctl -D /usr/share/postgresql/data -l /path/to/write/log/to start if you want the server to start up and background its self.
I strongly recommend reading the PostgreSQL tutorial and manual, which cover this in detail.

Resources