2

I'm going through the Getting Started documentation for the mongo-connector and I can't get even get the tutorial working properly. I followed the tutorials instructions up to I made a new Solr core called "documents" and I've attempted many variations on the command to run the connector but nothing seems to work.

I get to step 3 and it says to start the DB. If I run that command...

java -jar start.jar

it says...

WARNING: Nothing to start, exiting...

so I just started Solr on port 8983 using the Solr command:

bin\solr start

and it confirms that it started with...

Started Solr server on port 8983. Happy searching!

But then step 4 doesn't work at all. The command I'm trying is:

mongo-connector -m localhost:27017 -t http://localhost:8983/solr -d solr_doc_manager

I've tried pointing the -t flags url at .../solr/documents and even .../solr/#/documents as well, because I thought I may need a specific core to point it at, but I always get this error.

Traceback (most recent call last):
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\212569002\AppData\Local\Programs\Python\Python36-32\Scripts\mongo-connector.exe\__main__.py", line 9, in <module>
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\util.py", line 104, in wrapped
    func(*args, **kwargs)
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\connector.py", line 1275, in main
    conf.parse_args()
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\config.py", line 120, in parse_args
    option, dict((k, values.get(k)) for k in option.cli_names))
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\connector.py", line 1024, in apply_doc_managers
    dm_instances.append(DocManager(target_url, **kwargs))
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\doc_managers\solr_doc_manager.py", line 80, in __init__
    self._build_fields()
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\util.py", line 35, in wrapped
    return f(*args, **kwargs)
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\site-packages\mongo_connector\doc_managers\solr_doc_manager.py", line 97, in _build_fields
    result = decoder.decode(declared_fields)
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "c:\users\212569002\appdata\local\programs\python\python36-32\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This person seems to have encountered the same problem although they are running the command through Python whereas I'm using the libraries provided to make the call to Solr. It makes me think there is something wrong with my -t flag. At any rate, their solution didn't seem relevant beyond the fact that the error was the same. Any help provided would be really appreciated. I'm very new to Solr and Mongo stuff.

More info: java: 1.8.0_144 | python: 3.6.2 | Solr: 6.6 | Mongo/Mongod: v3.4.7 | Windows 10

0 Answers0