Hi, I use this approach to send my emails by msmtp
. Without VPN and firewall running, this approach work very well. However, after I setup VPN and firewall, these errors are reported by oauth2.py
:
Traceback (most recent call last):
File "/home/marcelo/bin/OAuth2/oauth2.py", line 347, in <module>
main(sys.argv)
File "/home/marcelo/bin/OAuth2/oauth2.py", line 307, in main
options.refresh_token)
File "/home/marcelo/bin/OAuth2/oauth2.py", line 238, in RefreshToken
response = urllib.urlopen(request_url, urllib.urlencode(params)).read()
File "/usr/lib/python2.7/urllib.py", line 89, in urlopen
return opener.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 217, in open
return getattr(self, name)(url, data)
File "/usr/lib/python2.7/urllib.py", line 445, in open_https
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 1078, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 894, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 856, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1295, in connect
HTTPConnection.connect(self)
File "/usr/lib/python2.7/httplib.py", line 833, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known
I'm suspect that VPN or Firewall are blocking oauth2.py
.
The script will converse with Google and generate an oauth request token, access token, a refresh token, and some metadata about the tokens. The access token can be used until it expires. If it is expired, outh2token script generate a valid token for that credential.
For debug, I need to know how port outh2.py
and outh2token
use. Could you point me out? Or maybe there are others issues?
There is a way to debug this issue? How?
Thank you