[Openstack] Fwd: Unable to upload a file into OpenStack Swift because of "[Errno 13] Permission denied"
Christian Baun
christianbaun at web.de
Wed May 24 12:47:07 UTC 2017
Hello all,
I tried again to install Swift only ontop of a Raspberry Pi 3 with
Rapbian and I followed this time the instructions "SAIO - Swift All In
One"
https://docs.openstack.org/developer/swift/development_saio.html
The installation went well and the service is running, but I still
cannot upload files into the service. The error message is still this
one on client side:
Object PUT failed:
http://10.0.0.253:8080/v1/AUTH_test/s3perf-testbucket/testfiles/s3perf-testfile1.txt
503 Service Unavailable [first 60 chars of response]
<html><h1>Service Unavailable</h1><p>The server is currently
and this one inside the file storage1.error:
May 24 13:15:15 raspberrypi object-server: ERROR __call__ error with PUT
/sdb1/484/AUTH_test/s3perf-testbucket/testfiles/s3perf-testfile1.txt :
#012Traceback (most recent call last):#012 File
"/home/pi/swift/swift/obj/server.py", line 1105, in __call__#012 res =
getattr(self, req.method)(req)#012 File
"/home/pi/swift/swift/common/utils.py", line 1626, in _timing_stats#012
resp = func(ctrl, *args, **kwargs)#012 File
"/home/pi/swift/swift/obj/server.py", line 814, in PUT#012
writer.put(metadata)#012 File "/home/pi/swift/swift/obj/diskfile.py",
line 2561, in put#012 super(DiskFileWriter, self)._put(metadata,
True)#012 File "/home/pi/swift/swift/obj/diskfile.py", line 1566, in
_put#012 tpool_reraise(self._finalize_put, metadata, target_path,
cleanup)#012 File "/home/pi/swift/swift/common/utils.py", line 3536, in
tpool_reraise#012 raise resp#012IOError: [Errno 13] Permission denied
(txn: txdfe3c7f704be4af8817b3-0059256b43)
I tried the installation instructions inside virtual machine with
Ubuntu 14.04 and there is no problem. The service runs and I can
upload files without any error.
Has anybody here an idea how to locate the root cause of this issue
and how to fix it?
Best Regards
Christian
---------- Forwarded message ----------
From: Christian Baun <christianbaun at web.de>
Date: 2017-05-10 20:03 GMT+02:00
Subject: Unable to upload a file into OpenStack Swift because of
"[Errno 13] Permission denied"
To: openstack at lists.openstack.org
Hello,
Creating and erasing buckets (containers) in my single node Swift only
installation works well, but any attempt to upload a file causes just
an error message.
$ tail -f /var/log/swift/storage1.error
...
May 9 14:03:10 raspberrypi object-server: ERROR __call__ error with
PUT /d1/237/AUTH_test/s3perf/s3perf-testfile1.txt : #012Traceback
(most recent call last):#012 File
"/home/pi/swift/swift/obj/server.py", line 1105, in __call__#012
res = getattr(self, req.method)(req)#012 File
"/home/pi/swift/swift/common/utils.py", line 1626, in
_timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File
"/home/pi/swift/swift/obj/server.py", line 814, in PUT#012
writer.put(metadata)#012 File "/home/pi/swift/swift/obj/diskfile.py",
line 2561, in put#012 super(DiskFileWriter, self)._put(metadata,
True)#012 File "/home/pi/swift/swift/obj/diskfile.py", line 1566, in
_put#012 tpool_reraise(self._finalize_put, metadata, target_path,
cleanup)#012 File "/home/pi/swift/swift/common/utils.py", line 3536,
in tpool_reraise#012 raise resp#012IOError: [Errno 13] Permission
denied (txn: txb986cc22c54f426c8289b-005911affd)
I have started Swift as user pi and assigned these folders to this user:
$ sudo chown pi:pi /etc/swift
$ sudo chown -R pi:pi /mnt/sdb1/*
$ sudo chown -R pi:pi /var/cache/swift
$ sudo chown -R pi:pi /var/run/swift
sdb1 is a loopback device with the XFS file system.
I deployed Swift this way:
https://github.com/christianbaun/s3perf/wiki/Swift-on-a-Raspberry-Pi-3-with-Raspbian-%28Debian-Jessie-8.0%29
I wonder why creating buckets (containers) works well, but the upload
of a file fails because of "Permission denied".
$ sudo swift-ring-builder /etc/swift/account.builder
/etc/swift/account.builder, build version 2
256 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00
balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 0
(0:00:00 remaining)
The overload factor is 0.00% (0.000000)
Ring file /etc/swift/account.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name
weight partitions balance flags meta
0 1 1 127.0.0.1:6012 127.0.0.1:6012 d1
1.00 256 0.00
$ sudo swift-ring-builder /etc/swift/container.builder
/etc/swift/container.builder, build version 2
256 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00
balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 0
(0:00:00 remaining)
The overload factor is 0.00% (0.000000)
Ring file /etc/swift/container.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name
weight partitions balance flags meta
0 1 1 127.0.0.1:6011 127.0.0.1:6011 d1
1.00 256 0.00
$ sudo swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 2
256 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00
balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 0
(0:00:00 remaining)
The overload factor is 0.00% (0.000000)
Ring file /etc/swift/object.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name
weight partitions balance flags meta
0 1 1 127.0.0.1:6010 127.0.0.1:6010 d1
1.00 256 0.00
$ nmap localhost -p 6010,6011,6012,8080,22
...
PORT STATE SERVICE
22/tcp open ssh
6010/tcp open x11
6011/tcp open unknown
6012/tcp open unknown
8080/tcp open http-proxy
What can i do to find the root cause of this issue and fix it?
Best Regards
Christian
More information about the Openstack
mailing list