elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

unable to start the elastalert server for praeco

Open shettypriy opened this issue 5 years ago • 6 comments

Followed the manual installation at https://github.com/ServerCentral/praeco/ , but when running 'npm run start' it gives the following error and hangs

13:13:13.395Z INFO elastalert-server: ProcessController: Index create exited with code 0 13:13:13.395Z INFO elastalert-server: ProcessController: Starting elastalert with arguments [none] 13:13:13.400Z INFO elastalert-server: ProcessController: Started Elastalert (PID: 179714) 13:13:13.402Z INFO elastalert-server: Server: Server listening on port 3030 13:13:13.402Z INFO elastalert-server: Server: Websocket listening on port 3333 13:13:13.403Z INFO elastalert-server: Server: Server started 13:13:13.614Z ERROR elastalert-server: ProcessController: Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/mnt/praeco/elastalert/elastalert/elastalert.py", line 30, in from .alerts import DebugAlerter File "/mnt/praeco/elastalert/elastalert/alerts.py", line 26, in from jira.client import JIRA File "/usr/local/lib/python3.7/dist-packages/jira/init.py", line 10, in from jira.client import Comment # noqa: E402 File "/usr/local/lib/python3.7/dist-packages/jira/client.py", line 225 validate=False, get_server_info=True, async=False, logging=True, max_retries=3, proxies=None, ^ SyntaxError: invalid syntax

13:13:13.636Z ERROR elastalert-server: ProcessController: ElastAlert exited with code 1

shettypriy avatar Apr 07 '20 13:04 shettypriy

Hi, @shettypriy https://github.com/ServerCentral/praeco/issues/191#issuecomment-594582151

Manual installation is unsupported (that doesn't mean it won't work, it just means I don't have the time to help fix issues). I would highly recommend using the docker image or an environment close to the docker image.

Could you install with docker?

daichi703n avatar Apr 08 '20 02:04 daichi703n

I tried installing using docker, but it is giving the error 'elasticsearch.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ConnectTimeout(HTTPConnectionPool(host='1.2.3.4', port=9200): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fe9af8afe48>, 'Connection to 1.2.3.4 timed out. (connect timeout=20)')))'

I am using elasticsearch version 7.5.1

shettypriy avatar Apr 08 '20 13:04 shettypriy

@shettypriy It seems to be connectivity issue. Can you connect to ES with curl -v http://1.2.3.4:9200 from docker host?

daichi703n avatar Apr 08 '20 14:04 daichi703n

@daichi703n when trying to connect to the container using the command 'docker attach continerid', it hangs and I am unable to login to attach to the container

shettypriy avatar Apr 08 '20 17:04 shettypriy

@shettypriy It seems to be connectivity issue. Can you connect to ES with curl -v http://1.2.3.4:9200 from docker host?

  • Expire in 0 ms for 6 (transfer 0x556d57526f50)
  • Trying 95.217.86.222...
  • TCP_NODELAY set
  • Expire in 200 ms for 4 (transfer 0x556d57526f50)
  • Connected to 1.2.3.4 (1.2.3.4) port 9200 (#0)

GET / HTTP/1.1 Host: 1.2.3.4:9200 User-Agent: curl/7.64.0 Accept: /

< HTTP/1.1 200 OK < content-type: application/json; charset=UTF-8 < content-length: 534 < { "name" : "ex51ssd71", "cluster_name" : "elasticsearch", "cluster_uuid" : "OEwRwzolQw-9Yyo2iLe9Ag", "version" : { "number" : "7.5.1", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96", "build_date" : "2019-12-16T22:57:37.835892Z", "build_snapshot" : false, "lucene_version" : "8.3.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

shettypriy avatar Apr 08 '20 20:04 shettypriy

@shettypriy

when trying to connect to the container using the command 'docker attach continerid', it hangs and I am unable to login to attach to the container

Please test with docker exec -it <name> sh

daichi703n avatar Apr 09 '20 10:04 daichi703n