Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2018-08-16 15:48:18.880756 [discovery|box|VT-R0|config] UNHANDLED EXCEPTION (2018-08-16 15:48:15.922579)
- PROCESS: ./services/discovery/service.py
- VERSION: 15.05.1+microservices.10507.067dd9ac
- BRANCH: microservices CHANGESET: 067dd9ac
- ERROR FINGERPRINT: 3b7c41d7-6405-5431-92f4-33fba7d914a4
- WORKING DIRECTORY: /var/opt/noc
- EXCEPTION: <type 'exceptions.Exception'> Cannot publish: 599 Connection reset while sending request
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: ../../../opt/noc/core/service/pub.py (Line: 35)
- Function: pub
- 28 method="POST",
- 29 body=data if raw else ujson.dumps(data),
- 30 connect_timeout=config.nsqd.connect_timeout,
- 31 request_timeout=config.nsqd.request_timeout
- 32 )
- 33 if code != 200:
- 34 metrics["error", ("type", "nsq_pub_error_code %s" % code)] += 1
- 35 ==> raise Exception("Cannot publish: %s %s" % (code, body))
- Variables:
- body = 'Connection reset while sending request'
- code = 599
- raw = False
- url = 'http://IP сервера:4151/pub'
- topic = 'mailsender'
- headers = {}
- data =
- {'address': u'Ivan@mail.ru',
- 'attachments': [],
- 'body': u'Здесь был боьшой конфиг'
- 'subject': u'VT-R0 config has been changed'}
- ------------------------------------------------------------------------
- File: ../../../opt/noc/main/models/notificationgroup.py (Line: 165)
- Function: send_notification
- 158 address, method)
- 159 pub(
- 160 topic,
- 161 {
- 162 "address": address,
- 163 "subject": subject,
- 164 "body": body,
- 165 ==> "attachments": attachments or []
- 166 }
- 167 )
- 168
- 169 def notify(self, subject, body, link=None, attachments=None):
- 170 """
- 171 Send message to active members
- Variables:
- body =
- 'body': u'Здесь был боьшой конфиг'
- attachments = None
- topic = 'mailsender'
- address = u'Ivan@mail.ru'
- cls = <class 'noc.main.models.notificationgroup.NotificationGroup'>
- method = u'mail'
- subject = u'VT-R0 config has been changed'
- ------------------------------------------------------------------------
- File: ../../../opt/noc/main/models/notificationgroup.py (Line: 220)
- Function: group_notify
- 213 ngs.add((method, params))
- 214 lang[(method, params)] = l
- 215 for method, params in ngs:
- 216 cls.send_notification(
- 217 method,
- 218 params,
- 219 cls.get_effective_message(subject, lang[(method, params)]),
- 220 ==> cls.get_effective_message(body, lang[(method, params)])
- 221 )
- 222
- 223
- 224 class NotificationGroupUser(models.Model):
- 225 class Meta:
- 226 verbose_name = "Notification Group User"
- Variables:
- lang =
- {(u'mail', u'Ivan@mail.ru'): 'en-us',
- ('mail', u'Ivan2@mail.ru'): u'ru'}
- body =
- {'en-us': 'Конфиг'
- g = <NotificationGroup: Admin>
- l = u'ru'
- delay = None
- tag = None
- params = u'Ivan@mail.ru'
- groups = set([<NotificationGroup: Admin>])
- ngs =
- set([(u'mail', u'Ivan@mail.ru'),
- ('mail', u'Ivan2@mail.ru')])
- link = None
- cls = <class 'noc.main.models.notificationgroup.NotificationGroup'>
- method = u'mail'
- subject = {'en-us': u'VT-R0 config has been changed'}
- ------------------------------------------------------------------------
- File: ../../../opt/noc/sa/models/managedobject.py (Line: 894)
- Function: event
- 887 if not tag and event_id in (
- 888 self.EV_ALARM_CLEARED,
- 889 self.EV_ALARM_COMMENTED,
- 890 self.EV_ALARM_REOPENED,
- 891 self.EV_ALARM_RISEN) and "alarm" in data:
- 892 tag = "alarm:%s" % data["alarm"].id
- 893 NotificationGroup.group_notify(
- 894 ==> groups, subject=subject, body=body, delay=delay, tag=tag)
- 895 # Schedule FTS reindex
- 896 if event_id in (
- 897 self.EV_CONFIG_CHANGED, self.EV_VERSION_CHANGED
- 898 ):
- 899 TextIndex.update_index(ManagedObject, self)
- 900
- Variables:
- body =
- u'Конфиг'
- event_id = 'config_changed'
- self = <ManagedObject: VT-R0>
- o = <ObjectNotification: VLG_ALL, Admin>
- selectors = [1, 2]
- delay = None
- tag = None
- groups = set([<NotificationGroup: Admin>])
- data =
- {'config': u' Конфиг'
- 'diff': u'Диф конфига'
- 'is_new': False,
- 'object': <ManagedObject: VT-R0>}
- subject = u'VT-R0 config has been changed'
- ------------------------------------------------------------------------
- File: ../../../opt/noc/sa/models/managedobject.py (Line: 1004)
- Function: notify_config_changes
- 997 """
- 998 self.event(
- 999 self.EV_CONFIG_CHANGED,
- 1000 {
- 1001 "object": self,
- 1002 "is_new": is_new,
- 1003 "config": data,
- 1004 ==> "diff": diff
- 1005 }
- 1006 )
- 1007
- 1008 def write_config(self, data):
- 1009 """
- 1010 Save config to GridVCS
- Variables:
- diff =
- u'Конфиг'
- self = <ManagedObject: VT-R0>
- data =
- u'Конфиг'
- is_new = False
- ------------------------------------------------------------------------
- File: ../../../opt/noc/sa/models/managedobject.py (Line: 981)
- Function: save_config
- 974 tofile=os.path.join("b", self.name.encode("utf8"))
- 975 ))
- 976 if changed:
- 977 # Notify changes
- 978 self.notify_config_changes(
- 979 is_new=is_new,
- 980 data=data,
- 981 ==> diff=diff
- 982 )
- 983 # Save config
- 984 self.write_config(data)
- 985 # Apply mirroring settings
- 986 self.mirror_config(data, changed)
- 987 # Run config validation
- Variables:
- new_data =
- u'Конфиг'
- old_data =
- u'Конфиг'
- self = <ManagedObject: VT-R0>
- changed = True
- is_new = False
- diff =
- u'Конфиг'
- data =
- u'Конфиг'
- ------------------------------------------------------------------------
- File: ../../../opt/noc/services/discovery/jobs/box/config.py (Line: 23)
- Function: handler
- 16 """
- 17 name = "config"
- 18 required_script = "get_config"
- 19
- 20 def handler(self):
- 21 self.logger.info("Checking config")
- 22 result = self.object.scripts.get_config()
- 23 ==> self.object.save_config(result)
- Variables:
- self =
- <noc.services.discovery.jobs.box.config.ConfigCheck object at 0x7f0a5ba91050>
- result =
- u' Конфиг'
- ------------------------------------------------------------------------
- File: ../../../opt/noc/services/discovery/jobs/base.py (Line: 449)
- Function: run
- 442 self.required_script)
- 443 return
- 444 # Check required capabilities
- 445 if not self.has_required_capabilities():
- 446 return
- 447 # Run check
- 448 try:
- 449 ==> self.handler()
- 450 except RPCRemoteError as e:
- 451 self.logger.error(
- 452 "RPC Remote error (%s): %s",
- 453 e.remote_code, e)
- 454 if e.remote_code:
- 455 message = "Remote error code %s" % e.remote_code
- Variables:
- span = <noc.core.span.Span object at 0x7f0a5ba09e50>
- self =
- <noc.services.discovery.jobs.box.config.ConfigCheck object at 0x7f0a5ba91050>
- e = Exception('Cannot publish: 599 Connection reset while sending request',)
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement