Advertisement
Guest User

Untitled

a guest
Jan 27th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. TASK [post : migrate ch db] 06:26
  2. fatal: [noc-n01]: FAILED! => {
  3. "changed": true,
  4. "cmd": [
  5. "./noc",
  6. "migrate-ch",
  7. "--host",
  8. "127.0.0.1"
  9. ],
  10. "delta": "0:00:00.481109",
  11. "end": "2018-01-27 17:57:25.544547",
  12. "rc": 2,
  13. "start": "2018-01-27 17:57:25.063438"
  14. }
  15.  
  16. STDOUT:
  17.  
  18. Ensuring Dictionary database
  19. 2018-01-27 14:57:25,498 [noc.core.debug] UNHANDLED EXCEPTION (2018-01-27 14:57:25.367804)
  20. BRANCH: feature/microservices TIP: e9bde34e0007
  21. PROCESS: ./commands/migrate-ch.py
  22. ERROR FINGERPRINT: a2b26b8c-58cd-5ed5-819b-e1910e203f39
  23. WORKING DIRECTORY: /opt/noc
  24. EXCEPTION: <class 'noc.core.clickhouse.error.ClickhouseError'> 599: Connection refused
  25. START OF TRACEBACK
  26. ------------------------------------------------------------------------
  27. File: core/clickhouse/connect.py (Line: 66)
  28. Function: execute
  29. 59 body=post,
  30. 60 user=self.user,
  31. 61 password=self.password,
  32. 62 connect_timeout=config.clickhouse.connect_timeout,
  33. 63 request_timeout=config.clickhouse.request_timeout
  34. 64 )
  35. 65 if code != 200:
  36. 66 ==> raise ClickhouseError("%s: %s" % (code, body))
  37. 67 return [
  38. 68 row.split("\t") for row in body.splitlines()
  39. 69 ]
  40. 70
  41. 71 def ensure_db(self):
  42. 72 self.execute(
  43. Variables:
  44. body = 'Connection refused'
  45. qs = []
  46. code = 599
  47. nodb = True
  48. url = 'http://127.0.0.1:8123/?'
  49. self = <noc.core.clickhouse.connect.ClickhouseClient object at 0x2e575d0>
  50. args = None
  51. q = <function q at 0x359f8c0>
  52. headers = {}
  53. sql = None
  54. post = 'CREATE DATABASE IF NOT EXISTS dictionaries ENGINE = Dictionary'
  55. ------------------------------------------------------------------------
  56. File: commands/migrate-ch.py (Line: 61)
  57. Function: create_dictionaries_db
  58. 54 :return:
  59. 55 """
  60. 56 self.print("Ensuring database")
  61. 57 self.connect.ensure_db()
  62. 58
  63. 59 def create_dictionaries_db(self):
  64. 60 self.print("Ensuring Dictionary database")
  65. 61 ==> self.connect.execute(post="CREATE DATABASE IF NOT EXISTS dictionaries ENGINE = Dictionary", nodb=True)
  66. 62
  67. 63
  68. 64 if __name__ == "__main__":
  69. 65 Command().run()
  70. Variables:
  71. self = <__main__.Command object at 0x359ccd0>
  72. ------------------------------------------------------------------------
  73. File: commands/migrate-ch.py (Line: 35)
  74. Function: handle
  75. 28 help="ClickHouse port"
  76. 29 )
  77. 30
  78. 31 def handle(self, host=None, port=None, *args, **options):
  79. 32 self.host = host or None
  80. 33 self.port = port or None
  81. 34 self.connect()
  82. 35 ==> self.create_dictionaries_db()
  83. 36 self.ensure_db()
  84. 37 changed = ensure_bi_models(connect=self.connect)
  85. 38 changed |= ensure_pm_scopes(connect=self.connect)
  86. 39 if changed:
  87. 40 self.print("CHANGED")
  88. 41 else:
  89. Variables:
  90. self = <__main__.Command object at 0x359ccd0>
  91. host = '127.0.0.1'
  92. args = ()
  93. options = {}
  94. port = None
  95. ------------------------------------------------------------------------
  96. File: core/management/base.py (Line: 75)
  97. Function: run_from_argv
  98. 68 enable_profiling = cmd_options.pop("enable_profiling", False)
  99. 69 show_metrics = cmd_options.pop("show_metrics", False)
  100. 70 if enable_profiling:
  101. 71 # Start profiler
  102. 72 import yappi
  103. 73 yappi.start()
  104. 74 try:
  105. 75 ==> return self.handle(*args, **cmd_options) or 0
  106. 76 except CommandError as e:
  107. 77 self.print(str(e))
  108. 78 return 1
  109. 79 except KeyboardInterrupt:
  110. 80 self.print("Ctrl+C")
  111. 81 return 3
  112. Variables:
  113. parser =
  114. ArgumentParser(prog='migrate-ch.py', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  115. loglevel = 'info'
  116. enable_profiling = False
  117. args = ()
  118. cmd_options = {'host': '127.0.0.1', 'port': None}
  119. argv = ['--host', '127.0.0.1']
  120. self = <__main__.Command object at 0x359ccd0>
  121. show_metrics = False
  122. options = Namespace(host='127.0.0.1', port=None)
  123. ------------------------------------------------------------------------
  124. END OF TRACEBACK
  125.  
  126.  
  127. MSG:
  128.  
  129. non-zero return code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement