solr cloud: RROR: Error loading config name for collection - solrcloud

I'm trying to create a new collection with solr-cloud setup, fails with the following:
ERROR: Error loading config name for collection test
I tried deleting the collection:
sudo /opt/solr/bin/solr delete -c test
but with the same results
My setup: solr-cloid with external zookeeper and 5 solr nodes
How do I purge it or reload it again ?
thanks

Solr is not able to find configuration files in zookeeper. Solrcloud try to recreate the core from zookeeper configuration file.
Looks like you have deleted zookeeper configuration node for collection test.
Two steps to completely purge collection test:
Stop solr and Delete folder "test" if exists from Solr home folder.(default: /var/lib/solr)
Navigate to zookeeper node and edit clusterstate.json . Remove entries of collection test. I wanted to start fresh so reset clusterstate.json file to default i.e {}
you should disable autoAddReplicas property of solr before shutting down any solrnode.

Check if the config folder exists in zookeeper. If this is the case, try to link the collection with the configname using the commmand:
zkcli.sh -cmd linkconfig -collection collectionname -confname configname

Related

How do I access a Sqlite3 database from an Electron AppImage .mount point?

OS: Linux 5.9.16-1-MANJARO
Electron version: 10.1.5
BetterSqlite version: 7.1.2
I am currently writing an application using Electron and BetterSqlite.
I build the AppImage like this:
npm run build && electron-builder build
This is how I access the database from my code:
db = new Database(
path.join(__dirname, `/${dbName}`).replace("/app.asar", "")
);
I have added the database file to use using:
"extraResources": [
"public/build/Database.db"
],
But when I open the AppImage i get the following error message:
SqliteError: attempt to write a readonly database
The database seems to be inaccessible due to the /tmp/.mountxxx point being readonly.
This behavior does not occur when I open the application in the development folder since it's not a readonly directory.
Is there a way to use the database from the /tmp/.mountxxx directory?
How would I got about accessing the database another way?
Thank you in advance.
I have searched for a way to use the AppImage mount point to read and write but I have not found anything. I will be using the user's home directory to store the database
As the error says when an AppImage is executed the AppDir is mounted as RO filesystem.
To workaround this you need to copy the database file into the user home using an startup script. By example you can copy it to "$HOME/.cache/com.myapp/appdata.db" then use this new copy.

ByteSequence not on whitelist or annotated #CordaSerializable issue while adding new node using network bootstrapper 4.0 OS

I am trying to add new node to existing corda network
ByteSequence is not on the whitelist or annotated with #CordaSerializable issue while adding new node using corda network bootstrapper 4.0 open source
To add a new node to an existing network I followed below option which is recommended here at this link
How to add a new node to an existing corda network?
I Used the network bootstrapper https://docs.corda.net/network-bootstrapper.html (and followed docs correctly)
I am getting below error when running
java -jar corda-tools-network-bootstrapper-4.0.jar --dir <nodes-root-dir> command.
Error :-
Loading existing network parameters... [ERROR] 14:57:27+0530 [main] amqp.DeserializationInput.log - Serialization failed direction="Deserialize",
type="java.lang.Comparable<net.corda.core.utilities.ByteSequence>",
msg="Class "java.lang.Comparable<net.corda.core.utilities.ByteSequence>" is not on the whitelist or annotated with #CordaSerializable.",
ClassChain="java.lang.Comparable<net.corda.core.utilities.ByteSequence>"
Class "java.lang.Comparable<net.corda.core.utilities.ByteSequence>" is not on the whitelist or annotated with #CordaSerializable
Results after running this command :-
New node's folder got created and node-info file got copied at appropriate places to other nodes as well.
Got the above error on command line when executed the above java command.
New Node got up and running when tried java -jar corda.jar on new node.
But existing node-info files from "additional-node-infos" folder of other nodes got updated with some content related to this serialization in it.
Please help on below
To resolve this error regarding Corda Serialization when running bootstrapper command ?
Regarding Point no. 04 from above is this a correct behavior ?
It seems you cannot even successfully bootstrapped the network. I would suggest you give a try on our latest version of the boot-strapper:https://docs.corda.net/docs/corda-os/4.4/network-bootstrapper.html
The primary reason people use boot-strapter is to start a mock network remotely. Ideally, you would go through the following steps:
build your cordapp
use deployNodes to get the directories for each nodes.
copy the XXX_node.conf file to a different folder
make change to your node.conf to update any changes for ports or etc
copy the CorDapps jars to the new folder
run the bootstrapper
copy the newly generated directories to the remote vm.

How to retrieve currently applied node configuration from Riak v2.0+

Showing currently applied configuration values
In v2.0+ of Riak there is a new command option: riak config effective
Which I read as it would tell you the current running values of riak.
At any time, you can get a snapshot of currently applied
configurations through the command line. For a listing of all of the
configs currently applied in the node
Config changes applied only on start of each node?
In multiple locations in Riak documentation there is reference like:
Remember that you must stop and then re-start each node when you
change storage backends or modify any other configuration
Problem:
However when I made a change to a setting (I've tested this in both riak.conf and advanced.conf), I see the newest value when running: riak config effective
ie:
Start node: riak start
View current setting for log level: riak config effective | grep log.console.level
log.console.level = info
Change the level to debug (something that will output a lot to console.log)
Re-run: riak config effective | grep log.console.level, we get:
log.console.level = debug
Checking the console log file for debug: cat /var/log/riak/console.log | grep debug give no results (indicating the config change has not been applied)
So the question is, how can I retrieve and verify what config setting each Riak node is running under?
When Riak starts, it creates two files: 'app..config' and 'vm..config'. The default location is in a 'generated.configs' directory under the platform data directory (usually /var/lib/riak).
These files will contain the settings that were in place when Riak was started. The command riak config effective processes the current riak.conf and advanced.config files.

Update solr config files in solrcloud

Hi fellow SOLR developers,
https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files This link says the below
To update or change your SolrCloud configuration files:
1. Download the latest configuration files from ZooKeeper, using the
source control checkout process.
2. Make your changes. Commit your changed file to source control.
3. Push the changes back to ZooKeeper.
4. Reload the collection so that the changes will be in effect.
But I was wondering if there are some examples or articles somewhere which can help me do this. For instance, how would one download the latest config files from zookeeper? Or should I know Zoopkeeper in-and-out to do this?
Version 5.3.1
I updated the synonym file in the "C:\12345\solrcloud\solr-5.3.1\example\example-DIH\solr\db\conf" folder and I'm using the below command
zkcli -zkhost localhost:2181,localhost:2182,localhost:2183 -cmd upconfig -confname db_config -confdir "C:\12345\solrcloud\solr-5.3.1\example\example-DIH\solr\db\conf"
But the file doesn't seem to change nor the query seem to work. I reloaded the core which did not help too. I even tried restarting my solrcloud.
My Brother, you are using upconfig command....
Same way there is a command called downconfig with same parameters.
So your order of execution will be :
Downconfig
Change the config
Upconfig
Downconfig command :
bin/solr zk downconfig -z 111.222.333.444:2181 -n mynewconfig -d /path/to/configset
Upconfig command :
bin/solr zk upconfig -z 111.222.333.444:2181 -n mynewconfig -d /path/to/configset
I think this short code can help to download the configs of solrcloud from zookeeper.
public void exportSynonyms(...) {
try {
final CloudSolrClient cloudSolrClient = ... //Retrieve the Solr client
final String configName = cloudSolrClient.getDefaultCollection();
final Path configPath = ... //Get or create temporary local file path
cloudSolrClient.downloadConfig(configName, configPath);
// Do something
cloudSolrClient.uploadConfig(configPath, configName);
// Reload the collection
} catch (RestClientException | SolrServiceException | IOException var11){
this.handleException(var11);
}
}
And I met the same problem and asked it on
https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files?focusedCommentId=65147407#comment-65147407
Hope it can help you.
After you update the file in Zookeeper, you need to tell solr to reload the collection, this tells solr to get the new configuration from Zookeeper.
See the Reload Solr Collection REST call:
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2

Symfony 2 pdo exception

I'm using Symfony 2 and have this row in my parameters.ini:
database_driver = pdo_pgsql
When I was creating database structure with Doctrine everything was good. But if I want to add some doctrine object to my darabase (insert row), I catch an exception:
What I have to do with this?
Are you sure you're using pdo_pgsql? Are you running on localhost? It might be very certain that you are using pdo_mysql driver instead.
However you have to check the following:
php.ini
extension=pdo.so
extension=pdo_mysql.so
or in your case
extension=pdo.so
extension=pdo_pgsql.so
You can check the phpinfo(); to find out the configured database driver.
In your symfony project you have to check the parameters.ini file in config folder. E.g.
[parameters]
database_driver="pdo_mysql"
database_host="localhost"
Besides try to avoid this error
'stty' is not recognized as an internal or external command,
operable program or batch file.
https://github.com/symfony/symfony/issues/4974
First of all, verify your php.ini file: the extensions php_pdo_pgsql and php_pdo must be enabled. Make sure you apply this changes on php.ini file that your symfony project is using, check this on localhost/path_to_your_project/web/config.php. You know if this extensions are enabled executing the function phpinfo().
This command is also helpfull: php -m. It lists on console all the php modules that are loaded.
Tip: check out you Apache error log, there could be something wrong with the load of your extensions. This file is located according to your server configuration.

Resources