Windows firewall logging. Log file is always blank

4,366

Solution 1

There are 3 profiles available (domain/private/public). You can view which is "active" on the top node "Windows Firewall with Advanced Security" of the MMC. Please ensure the profile that is active is the one you enabled and configure the firewall logging for. You can configure the settings the same for all 3 profiles or have a unique configuration for each.

Solution 2

In my case, it happened after promoting a Windows 2012R2 as a Domain Controller.

Adding the NT SERVICE\MPSSVC account with Full Controll permissions on the C:\Windows\System32\LogFiles\Firewall folder and restarting the server solved my problem.

Share:
4,366

Related videos on Youtube

NeoVe
Author by

NeoVe

Updated on September 18, 2022

Comments

  • NeoVe
    NeoVe almost 2 years

    I still have this error on another part of the code:

    class invoice(models.Model):
    _inherit = "account.invoice"
    
    @api.multi
    def send_xml_file(self):
        # haciendolo para efacturadelsur solamente por ahora
        host = 'https://www.efacturadelsur.cl'
        post = '/ws/DTE.asmx' # HTTP/1.1
        url = host + post
        _logger.info('URL to be used %s' % url)
        # client = Client(url)
        # _logger.info(client)
        _logger.info('len (como viene): %s' % len(self.sii_xml_request))
    
        response = pool.urlopen('POST', url, headers={
            'Content-Type': 'application/soap+xml',
            'charset': 'utf-8',
            'Content-Length': len(
                self.sii_xml_request)}, body=self.sii_xml_request)
    
        _logger.info(response.status)
        _logger.info(response.data)
        self.sii_xml_response = response.data
        self.sii_result = 'Enviado'
    

    Before in my previous question the error was solved on this line:

    _logger.info('len (como viene): %s' % (len(self.sii_xml_request) if self.sii_xml_request else '')
    

    Now I have it again on the next one, I've tried with a conditional like before, but I still can't solve it, must be related to syntax or something, the error is on this sentence:

            response = pool.urlopen('POST', url, headers={
            'Content-Type': 'application/soap+xml',
            'charset': 'utf-8',
            'Content-Length': len(
                self.sii_xml_request)}, body=self.sii_xml_request)
    

    Specifically on self.sii_xml_request)}, body=self.sii_xml_request) there's the sii_xml_request object again, I think is just a matter to add the conditional, since the field is empty...

    But I still can't make it work properly, is this solvable in a similar fashion as my previous question?

    Thanks in advance!

    EDIT

    It is not a duplicate since this is another line of code, and a very very similar way to solve it won't apply here, it is a slightly different syntax.

    SECOND EDIT

    This is how it looks right now, the conditional is on every len of this function

    @api.multi
    def send_xml_file(self):
        # haciendolo para efacturadelsur solamente por ahora
        host = 'https://www.efacturadelsur.cl'
        post = '/ws/DTE.asmx' # HTTP/1.1
        url = host + post
        _logger.info('URL to be used %s' % url)
        # client = Client(url)
        # _logger.info(client)
        _logger.info('len (como viene): %s' % len(self.sii_xml_request)if self.sii_xml_request else '')
        #if self.sii_xml_request:
        response = pool.urlopen('POST', url, headers={
            'Content-Type': 'application/soap+xml',
            'charset': 'utf-8',
            'Content-Length': (len(
                self.sii_xml_request) if self.sii_xml_request else '')}, body=self.sii_xml_request)
        #else ''(len(self.sii_xml_request) if self.sii_xml_request else '') 
    
        _logger.info(response.status)
        _logger.info(response.data)
        self.sii_xml_response = response.data
        self.sii_result = 'Enviado'
    
    • Admin
      Admin about 12 years
      Try stopping and restarting the Windows Firewall service. Then try accessing the server from another machine via RDP, UNC, etc. and then check the firewall log.
    • Admin
      Admin about 12 years
      @joeqwerty I have access to that server only thru RDP. Will I save access if I restart firewall service?
    • Admin
      Admin about 12 years
      You may lose your connection for a minute but you should be able to reconnect. From the Services applet, select the service, then click the restart button. This will stop then restart the service.
    • elethan
      elethan almost 8 years
      Can you show your definition for self.sii_xml_request. When this error is raised it is because that attribute is returning True or False and you are trying to call len() on it which doesn't work for booleans. You need to make sure that self.sii_xml_request always returns a string (if that is what you want it to return)
    • elethan
      elethan almost 8 years
      (New comment because old one is too old to edit). (len(self.sii_xml_request) if self.sii_xml_request else '') would probably work in this case too, but ONLY if self.sii_xml_request returns False; if it ever returns True it will fail in the same way.
    • elethan
      elethan almost 8 years
    • NeoVe
      NeoVe almost 8 years
      Hi, no, it is not a duplicate, it is another case, similar though, ok, let me try, Thank You
    • NeoVe
      NeoVe almost 8 years
      Hi, no, it doesn't work , gosh, it's really weird...
    • NeoVe
      NeoVe almost 8 years
      Same error :( ...
    • elethan
      elethan almost 8 years
      Did you change it in every place where you are calling len() of that object? You will need to do that for sure.
    • NeoVe
      NeoVe almost 8 years
      @elethan yes, I've edited my question with the current code, the error comes on 'response' line
    • George Daramouskas
      George Daramouskas almost 8 years
      Post your stack trace please
  • kseen
    kseen about 12 years
    Of course, I did set "Log dropped packets" and "Log successful connections".
  • user64141
    user64141 over 9 years
    Jacob, you are a Windows god. I totally missed that.
  • kseen
    kseen almost 8 years
    I haven't tried anything besides of Notepad. Notepad was showing empty file.
  • NeoVe
    NeoVe almost 8 years
    Thank You elethan, but now, ´line 108, in send_xml_file response = pool.urlopen('POST', url, headers={ TypeError: object of type 'bool' has no len()´ :''(
  • NeoVe
    NeoVe almost 8 years
    Going to try again, with first solution, sorry, I'll write back ASAP