ESGF / esgf-installer

ESGF P2P Node Installer
https://esgf.llnl.gov/
Other
21 stars 21 forks source link

solr not starting #606

Closed nathanlcarlson closed 5 years ago

nathanlcarlson commented 5 years ago

The 3.x auto installer is failing to start solr. The following error is reported:

 DEBUG    | esg_functions.py - 921 - call_binary - 10/03/2018 08:57:57 AM - binary_name: /usr/local/solr/bin/solr
  DEBUG    | esg_functions.py - 922 - call_binary - 10/03/2018 08:57:57 AM - arguments: ['start', '-d', '/usr/local/solr/server', '-s', '/usr/local/solr-home/master-8984', '-p', '8984', '-a', "'-Denable.master=true'", '-m', '512m']
tail: cannot open `/usr/local/solr/server/logs/solr.log' for reading: No such file or directory
  DEBUG    | esg_functions.py - 921 - call_binary - 10/03/2018 08:58:29 AM - binary_name: /usr/local/solr/bin/solr
  DEBUG    | esg_functions.py - 922 - call_binary - 10/03/2018 08:58:29 AM - arguments: ['status']
  ERROR    | solr.py - 99 - solr_status - 10/03/2018 08:58:30 AM - Error checking solr status
f_3.x_install.NEW/esgf-installer
...
Found 1 Solr nodes: 

Solr process 19617 from /usr/local/solr/bin/solr-8984.pid not found.

There is a lot of misleading reports here. The root cause is here:

arguments: ['start', '-d', '/usr/local/solr/server', '-s', '/usr/local/solr-home/master-8984', '-p', '8984', '-a', "'-Denable.master=true'", '-m', '512m']

Specifically

"'-Denable.master=true'"

This parameter is getting double quoted as plumbum quotes the provided arguments itself, whether or not it already has quotes. This parameter is being defined here

if solr_config_type == "master":
        enable_nodes = "'-Denable.master=true'"
    elif solr_config_type == "localhost":
        enable_nodes = "'-Denable.localhost=true'"
    else:
        enable_nodes = "'-Denable.master=true -Denable.slave=true'"

The inner quotes just have to be removed.

William-Hill commented 5 years ago

@nathanlcarlson merged the PR to address this