Ask Your Question
0

0-byte proxy.log

asked 2011-10-18 21:07:44 -0500

kenneth-jiang gravatar image

Installed swift 1.4.3 on Ubuntu 11.04. But after proxy-server is started, I can only see 0-byte /var/log/swift/proxy.log.

While /var/log/swift/proxy.err contains only:

Oct 18 03:49:05 kens-lab2 proxy-server Started child 17276 Oct 18 03:49:05 kens-lab2 proxy-server Started child 17277 Oct 18 03:49:05 kens-lab2 proxy-server Started child 17278 ...

When swift-proxy-server was started, it printed out a warning message that I'm not sure is significant:

/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py:8: UserWarning: Module netifaces was already imported from /usr/lib/pymodules/python2.6/netifaces.so, but /usr/lib/pymodules/python2.6 is being added to sys.path

My configuration is below:

cat /etc/swift/proxy-server.conf

[DEFAULT]

Enter these next two values if using SSL certifications

cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key bind_port = 9080 workers = 8 user = swift set log_level = DEBUG set log_facility = LOG_LOCAL1

[pipeline:main]

keep swauth in the line below if you plan to use swauth for authentication

pipeline = healthcheck cache tempauth proxy-server

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

[filter:tempauth] use = egg:swift#tempauth user_admin_admin = admin .admin .reseller_admin user_test_tester = testing .admin user_test2_tester2 = testing2 .admin user_test_tester3 = testing3

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

[filter:cache] use = egg:swift#memcache memcache_servers = 10.244.196.230:11211

cat /etc/rsyslog.d/10-swift.conf

Uncomment the following to have a log containing all logs together

#local1,local2,local3,local4,local5.* /var/log/swift/all.log

Uncomment the following to have hourly proxy logs for stats processing

#$template HourlyProxyLog,"/var/log/swift/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%" #local1.*;local1.!notice ?HourlyProxyLog

local1.;local1.!notice /var/log/swift/proxy.log local1.notice /var/log/swift/proxy.error local1. ~

local2.;local2.!notice /var/log/swift/storage1.log local2.notice /var/log/swift/storage1.error local2. ~

local3.;local3.!notice /var/log/swift/storage2.log local3.notice /var/log/swift/storage2.error local3. ~

local4.;local4.!notice /var/log/swift/storage3.log local4.notice /var/log/swift/storage3.error local4. ~

local5.;local5.!notice /var/log/swift/storage4.log local5.notice /var/log/swift/storage4.error local5. ~

Your comments/suggestions are appreciated!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2012-03-12 15:33:35 -0500

Ok. So what is the resolution or workaround for this? Thanks

edit flag offensive delete link more
0

answered 2011-10-19 17:40:46 -0500

kenneth-jiang gravatar image

I just found out why: it never got a chance to hit any code that'd generate log entry other than "notice", which goes to proxy.error.

But the reason why it didn't hit any real code probably indicated a bug: From command line I used "curl" to send an http, as opposed to https request. This generated an exception at /usr/lib/pymodules/python2.6/eventlet/wsgi.py:606. However, for some reason that I didn't have time to dig out, eventlet swallowed that exception, never sent back a single byte of response, nor did it close the connection.

To make it worse, at /usr/lib/pymodules/python2.6/swift/common/wsgi.py:222, a NullLogger() was passed to wsgi.server, therefore eventlet didn't get any chance to log what happened, which made an otherwise-straightforward problem very hard to trace.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-10-18 21:07:44 -0500

Seen: 206 times

Last updated: Mar 12 '12