Windows firewall logging. Log file is always blank
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.
Related videos on Youtube
NeoVe
Updated on September 18, 2022Comments
-
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 thesii_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 about 12 yearsTry 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 about 12 years@joeqwerty I have access to that server only thru RDP. Will I save access if I restart firewall service?
-
Admin about 12 yearsYou 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 almost 8 yearsCan you show your definition for
self.sii_xml_request
. When this error is raised it is because that attribute is returningTrue
orFalse
and you are trying to calllen()
on it which doesn't work for booleans. You need to make sure thatself.sii_xml_request
always returns a string (if that is what you want it to return) -
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 ifself.sii_xml_request
returnsFalse
; if it ever returnsTrue
it will fail in the same way. -
elethan almost 8 yearsPossible duplicate of TypeError: object of type 'bool' has no len() - Odoo v9
-
NeoVe almost 8 yearsHi, no, it is not a duplicate, it is another case, similar though, ok, let me try, Thank You
-
NeoVe almost 8 yearsHi, no, it doesn't work , gosh, it's really weird...
-
NeoVe almost 8 yearsSame error :( ...
-
elethan almost 8 yearsDid you change it in every place where you are calling
len()
of that object? You will need to do that for sure. -
NeoVe almost 8 years@elethan yes, I've edited my question with the current code, the error comes on 'response' line
-
George Daramouskas almost 8 yearsPost your stack trace please
-
-
kseen about 12 yearsOf course, I did set "Log dropped packets" and "Log successful connections".
-
user64141 over 9 yearsJacob, you are a Windows god. I totally missed that.
-
kseen almost 8 yearsI haven't tried anything besides of Notepad. Notepad was showing empty file.
-
NeoVe almost 8 yearsThank 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 almost 8 yearsGoing to try again, with first solution, sorry, I'll write back ASAP