Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Having Issues Running Trains-Server On Win10. Trains-Elastic Exited With Code 137 Trains-Mongo Exited With Code 100 Trains-Apiserver Exited With Code 1 Some Errors=> Requests.Exceptions.Connectionerror: Httpconnectionpool(Host='Elasticsearch', Port=9200

Having issues running trains-server on Win10.

trains-elastic exited with code 137
trains-mongo exited with code 100
trains-apiserver exited with code 1

Some errors=>
requests.exceptions.ConnectionError: HTTPConnectionPool(host='elasticsearch', port=9200):
[WARNING] [urllib3.connectionpool] Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0992aeab38>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /_template/events_plot

  
  
Posted 3 years ago
Votes Newest

Answers 17


Checked. Only change I had to make was to increase memory to 4GB. Still there are errors.
I think errors are related to network and permission.

  
  
Posted 3 years ago

Specifically notice step (1) and (2) they are important for Windows docker service to be able to run the elastic container and mongo container

  
  
Posted 3 years ago

trains-apiserver | [2020-07-10 13:33:29,269] [8] [ERROR] [trains.updates] Failed obtaining updates
trains-apiserver | Traceback (most recent call last):
trains-apiserver | File "/opt/trains/server/updates.py", line 96, in _check_updates
trains-apiserver | response = self._check_new_version_available()
trains-apiserver | File "/opt/trains/server/updates.py", line 48, in _check_new_version_available
trains-apiserver | uid = Settings.get_by_key("server.uuid")
trains-apiserver | File "/opt/trains/server/database/model/settings.py", line 26, in get_by_key
trains-apiserver | res = Settings.objects(key=key).first()
trains-apiserver | File "/usr/local/lib/python3.6/site-packages/mongoengine/queryset/manager.py", line 37, in get
trains-apiserver | queryset = queryset_class(owner, owner._get_collection())
trains-apiserver | File "/usr/local/lib/python3.6/site-packages/mongoengine/document.py", line 219, in _get_collection
trains-apiserver | if cls._meta.get("auto_create_index", True) and db.client.is_primary:
trains-apiserver | File "/usr/local/lib64/python3.6/site-packages/pymongo/mongo_client.py", line 1005, in is_primary
trains-apiserver | return self._server_property('is_writable')
trains-apiserver | File "/usr/local/lib64/python3.6/site-packages/pymongo/mongo_client.py", line 830, in _server_property
trains-apiserver | writable_server_selector)
trains-apiserver | File "/usr/local/lib64/python3.6/site-packages/pymongo/topology.py", line 235, in select_server
trains-apiserver | address))
trains-apiserver | File "/usr/local/lib64/python3.6/site-packages/pymongo/topology.py", line 193, in select_servers
trains-apiserver | selector, server_timeout, address)
trains-apiserver | File "/usr/local/lib64/python3.6/site-packages/pymongo/topology.py", line 209, in _select_servers_loop
trains-apiserver | self._error_message(selector))
trains-apiserver | pymongo.errors.ServerSelectionTimeoutError: mongo:27017: [Errno -2] Name or service not known

  
  
Posted 3 years ago

could you send the entire log here?
i.e. from the "docker-compose" command line and onward

  
  
Posted 3 years ago

LazyLeopard18 well done on locating the issue.
Yes Docker on Windows is a bit flacky...

  
  
Posted 3 years ago

Looks like a mongodb and NTFS issue
https://github.com/docker-library/mongo/issues/190

  
  
Posted 3 years ago

Are all the docker running? it looks like the mongo docker is down

  
  
Posted 3 years ago

LazyLeopard18 nice. maybe we should add it in the FAQ / Install. Could you send the exact docker-compose you used and command line, I'll ask the guys to add it 🙂

  
  
Posted 3 years ago

I tried a slightly different approach that seems to work.
docker volume create --name=mongodata
And configured mogodat data in docker-compose file

  
  
Posted 3 years ago

Notice you have configure the shared driver for the docker, as the volume mount doesn't work without it. https://stackoverflow.com/a/61850413

  
  
Posted 3 years ago

Above command and yaml file are working in Win10

  
  
Posted 3 years ago

Sure, let me test its completely working

  
  
Posted 3 years ago

Many thanks LazyLeopard18 ! 🙂

  
  
Posted 3 years ago

docker volume create --name=mongodata

  
  
Posted 3 years ago

Hi LazyLeopard18 ,
See details below, are you using the win10 docker-compose yaml?
https://github.com/allegroai/trains-server/blob/master/docs/install_win.md

  
  
Posted 3 years ago

Web server port is modified and changed c:\opt to d:\opt

  
  
Posted 3 years ago