swauth-prep error

Asked by kihyeok

my proxy-server.conf

[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
pipeline = catch_errors cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:swauth]
use:egg:swauth#swauth
set log_name = swauth
super_admin_key = swauthkey
default_swift_cluster = local#https://xxx.xxx.xxx.218:8080/v1

[filter:cache]
use = egg:swift#memcache
memcache_servers = xxx.xxx.xxx.218:11211

[filter:catch_errors]
use = egg:swift#catch_errors

swauth-prep -K key -A https://xxx.xxx.xxx.218:8080/v1

Traceback (most recent call last):
  File "/usr/local/bin/swauth-prep", line 5, in <module>
    pkg_resources.run_script('swauth==1.0.3.dev', 'swauth-prep')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/swauth-1.0.3.dev-py2.7.egg/EGG-INFO/scripts/swauth-prep", line 56, in <module>
    ssl=(parsed.scheme == 'https'))
  File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py", line 168, in http_connect_raw
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1158, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 285, in wrap_socket
    return GreenSSLSocket(sock, *a, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 46, in __init__
    super(GreenSSLSocket, self).__init__(sock.fd, *args, **kw)
  File "/usr/lib/python2.7/ssl.py", line 134, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 193, in do_handshake
    super(GreenSSLSocket, self).do_handshake)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 77, in _call_trampolining
    return func(*a, **kw)
  File "/usr/lib/python2.7/ssl.py", line 296, in do_handshake
    self._sslobj.do_handshake()
socket.error: [Errno 104] Connection reset by peer

please my problem answer ㅠㅠ

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marcelo Martins (btorch) said :
#1

try "swauth-prep -K swauthkey -A https://xxx.xxx.xxx.218:8080/auth/"

Revision history for this message
kihyeok (kkh1049) said :
#2

Dear, Marcelo Martins

Thank you for replying on.

As you told me, I typed the instruction but the following is the log.

swauth-prep -K swauthkey -A https://xxx.xxx.xxx.218:8080/auth/

Traceback (most recent call last):
  File "/usr/local/bin/swauth-prep", line 5, in <module>
    pkg_resources.run_script('swauth==1.0.3.dev', 'swauth-prep')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/swauth-1.0.3.dev-py2.7.egg/EGG-INFO/scripts/swauth-prep", line 56, in <module>
    ssl=(parsed.scheme == 'https'))
  File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py", line 168, in http_connect_raw
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1158, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 285, in wrap_socket
    return GreenSSLSocket(sock, *a, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 46, in __init__
    super(GreenSSLSocket, self).__init__(sock.fd, *args, **kw)
  File "/usr/lib/python2.7/ssl.py", line 134, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 193, in do_handshake
    super(GreenSSLSocket, self).do_handshake)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 77, in _call_trampolining
    return func(*a, **kw)
  File "/usr/lib/python2.7/ssl.py", line 296, in do_handshake
    self._sslobj.do_handshake()
socket.error: [Errno 104] Connection reset by peer

Revision history for this message
yaguang wang (ywang19) said :
#3

As you are using https, just change the port from 8080 to 443 and try again.

Revision history for this message
kihyeok (kkh1049) said :
#4

Dear, amwang

Thank you for replying on

but, that's same problem...

swauth-prep -K swauthkey -A https://xxx.xxx.xxx.218:443/auth/

Traceback (most recent call last):
  File "/usr/local/bin/swauth-prep", line 5, in <module>
    pkg_resources.run_script('swauth==1.0.3.dev', 'swauth-prep')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/swauth-1.0.3.dev-py2.7.egg/EGG-INFO/scripts/swauth-prep", line 56, in <module>
    ssl=(parsed.scheme == 'https'))
  File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py", line 168, in http_connect_raw
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1158, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 285, in wrap_socket
    return GreenSSLSocket(sock, *a, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 46, in __init__
    super(GreenSSLSocket, self).__init__(sock.fd, *args, **kw)
  File "/usr/lib/python2.7/ssl.py", line 134, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 193, in do_handshake
    super(GreenSSLSocket, self).do_handshake)
  File "/usr/lib/python2.7/dist-packages/eventlet/green/ssl.py", line 77, in _call_trampolining
    return func(*a, **kw)
  File "/usr/lib/python2.7/ssl.py", line 296, in do_handshake
    self._sslobj.do_handshake()
socket.error: [Errno 104] Connection reset by peer

------------------------------------------------------------------------
swift@proxy-218:/etc/swift$ cat proxy-server.conf
[DEFAULT]
cert_file = /etc/swift/cert.crt
key_file = /etc/swift/cert.key
bind_port = 443
workers = 8
user = swift

[pipeline:main]
pipeline = catch_errors cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:swauth]
use:egg:swauth#swauth
set log_name = swauth
super_admin_key = swauthkey
default_swift_cluster = local#https://xxx.xxx.xxx.218:443/v1

[filter:cache]
use = egg:swift#memcache
memcache_servers = xxx.xxx.xxx.218:11211

Revision history for this message
Marcelo Martins (btorch) said :
#5

Stop all services. Make sure they all indeed have stopped and there is nothing else listening on each of the ports.

Remove SSL so that you can troubleshoot this and once you have things working you can add it.

Then start all the services again. Make sure that the proxy services and the other services are responding properly by doing a healthcheck call to each IP:PORT. Ex: curl -i http://PROXY_IP:PROXY_PORT/healthcheck

Then, try the swauth-prep again, make sure to also check not only the proxy logs but also the account, container, object logs.

------------------------------------------------------------------------
swift@proxy-218:/etc/swift$ cat proxy-server.conf
[DEFAULT]
#cert_file = /etc/swift/cert.crt
#key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
pipeline = catch_errors cache swauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true

[filter:swauth]
use:egg:swauth#swauth
set log_name = swauth
super_admin_key = swauthkey
default_swift_cluster = local#https://xxx.xxx.xxx.218:8080/v1

[filter:cache]
use = egg:swift#memcache
memcache_servers = xxx.xxx.xxx.218:11211

Can you help with this problem?

Provide an answer of your own, or ask kihyeok for more information if necessary.

To post a message you must log in.