[ckan-dev] Unable to Upload Files to S3

Gerald Rich gerald.a.rich at gmail.com
Sat Apr 13 17:58:22 UTC 2013


Thanks Vitor,

Sorry for the delay. Switching jobs soon! Here's the information you
requested.

   - Ubuntu 10.04 Lucid (EC2 instance ami-3693a542)


   - CKAN 1.8


   - Package install that Apache


   - The error log is a little long. Anything in particular I can grep?


   - pip freeze output: distribute==0.6.10 /n wsgiref==0.1.2



On Tue, Apr 9, 2013 at 5:39 PM, Vitor Baptista <vitor at vitorbaptista.com>wrote:

> Hi Gerald,
>
> Not even local storage worked out? Strange... Could you send the debug
> info specified in that SO answer?
>
>
>>    - What operating system you're using
>>
>>
>>    - What version of CKAN you're using
>>
>>
>>    - How you have deployed CKAN (package install or source install?
>>    Apache webserver or paster development install?)
>>
>>
>>    - Your CKAN ini file (with any sensitive details removed)
>>
>>
>>    - Any errors you get from CKAN, either from the terminal where you're
>>    running paster serve ...or, if you're running CKAN with Apache, from
>>    a log file such as/var/log/apache2/YOURSITE.error.log. If you can get
>>    us a full Python traceback, this is usually the most useful thing.
>>
>>
>>    - The output of the pip freeze command when run in your CKAN
>>    virtualenv.
>>
>>
> Thanks,
> Vítor Baptista.
>
> 2013/4/9 Gerald Rich <gerald.a.rich at gmail.com>
>
>>
>> Hi Vitor,
>>
>> Yes I am. I tried switching to local storage and tried for follow along
>> with this Stack Overflow post, but that didn't help either.
>>
>>
>> http://stackoverflow.com/questions/13971622/error-when-trying-to-upload-a-file-to-ckan-failed-to-get-credentials-for-stora?rq=1
>>
>> Thanks for responding!
>>
>> Gerald
>>
>
>


-- 
*Gerald Rich*
about.me/geraldrich
(713) 516-5935
@gerald_rich <https://twitter.com/#!/Gerald_Rich>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130413/6abd04d6/attachment-0001.html>
-------------- next part --------------
?#
# ckan - Pylons configuration
#
# The %(here)s variable will be replaced with the parent directory of this file
#
[DEFAULT]
debug = true
email_to = root
smtp_server = localhost
error_email_from = ckan-std at ip-10-226-51-132

[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000

[app:main]
use = egg:ckan
full_stack = true
cache_dir = /var/lib/ckan/std/data
beaker.session.key = ckan
beaker.session.secret = [redacted]
app_instance_uuid = {f5964be1-1539-4edf-8c71-d3dec32d253f}

# List the names of CKAN extensions to activate.
# Note: This line is required to be here for packaging, even if it is empty.
ckan.plugins = stats

# If you'd like to fine-tune the individual locations of the cache data dirs
# for the Cache data, or the Session saves, un-comment the desired settings
# here:
#beaker.cache.data_dir = %(here)s/data/cache
#beaker.session.data_dir = %(here)s/data/sessions

# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
set debug = false

# Specify the database for SQLAlchemy to use:
# * Postgres is currently required for a production CKAN deployment
# * Sqlite (memory or file) can be used as a quick alternative for testing
sqlalchemy.url = postgresql://std:8vhVDezaoZ@localhost/std
#sqlalchemy.url = sqlite:///
#sqlalchemy.url = sqlite:///%(here)s/somedb.db

## Datastore
## Uncommment to set the datastore urls
#ckan.datastore.write_url = postgresql://ckanuser:pass@localhost/ckantest
#ckan.datastore.read_url = postgresql://readonlyuser:pass@localhost/ckantest

# repoze.who config
who.config_file = /etc/ckan/std/who.ini
who.log_level = warning
who.log_file = %(cache_dir)s/who_log.ini

# Location of RDF versions of datasets
#rdf_packages = http://semantic.ckan.net/record/

# Location of licenses group (defaults to cached local version of ckan group)
#licenses_group_url = http://licenses.opendefinition.org/licenses/groups/ckan.json

# Dataset form to use
package_form = standard

# Hide certain extras fields from dataset read form:
# package_hide_extras = for_search_index_only

# API configuration
#apikey_header_name = X-CKAN-API-Key

## extra places to look for templates and public files (comma separated lists)
## any templates/files found will override correspondingly named ones in
## ckan/templates/ and ckan/public
## (e.g. to override main layout template layout.html or add extra css files)
# extra_template_paths = %(here)s/my-templates
# extra_public_paths = %(here)s/my-public

# Dataset form integration
#package_edit_return_url = http://another.frontend/dataset/<NAME>
#package_new_return_url = http://another.frontend/dataset/<NAME>


# Turn on messaging with carrot, default to false
#ckan.async_notifier = true
# Messaging module used by carrot:
# * pyamqplib - AMQP (e.g. for RabbitMQ)
# * queue - native Python Queue (debugging and tests only)
#carrot_messaging_library = pyamqplib

## Perform search just using database (rather than use e.g. solr).
## In this setup search is crude and limited .e.g no full-text search, no faceting ...
## However, very useful for getting up and running quickly with CKAN 
# ckan.simple_search = 1

## Title of site (using in several places including templates and <title> tag
ckan.site_title = City of Houston Data Portal

## Logo image to use on the home page
ckan.site_logo = https://s3.amazonaws.com/codeforhouston.com/images/houstonseal.png

## Site tagline / description (used on front page)
ckan.site_description = 

## Used in creating some absolute urls (such as rss feeds, css files) and 
## dump filenames
ckan.site_url = http://data.codeforhouston.com

## Favicon (default is the CKAN software favicon)
ckan.favicon = https://s3.amazonaws.com/codeforhouston.com/images/houstonseal.ico

## The gravatar default to use.  This can be any of the pre-defined strings
## as defined on http://en.gravatar.com/site/implement/images/ (e.g. "identicon"
## or "mm").  Or it can be a url, e.g. "http://example.com/images/avatar.jpg"
ckan.gravatar_default = identicon

## Solr support
solr_url = http://127.0.0.1:8983/solr

## Automatic indexing. Make all changes immediately available via the search
## after editing or creating a dataset. Default is true. If for some reason
## you need the indexing to occur asynchronously, set this option to 0.
# ckan.search.automatic_indexing = 1

## An 'id' for the site (using, for example, when creating entries in a common search index) 
## If not specified derived from the site_url
ckan.site_id = std

## API url to use (e.g. in AJAX callbacks)
## Enable if the API is at a different domain
# ckan.api_url = http://www.ckan.net

## html content to be inserted just before </head> tag (e.g. extra stylesheet)
## NB: can use html e.g. <strong>blah</strong>
## NB: can have multiline strings just indent following lines
ckan.template_head_end = <link rel="stylesheet" href="https://s3.amazonaws.com/codeforhouston.com/css/style.css" type="text/css"> 

## html content to be inserted just before </body> tag (e.g. google analytics code)
## NB: can use html e.g. <strong>blah</strong>
## NB: can have multiline strings just indent following lines
# ckan.template_footer_end = 

# These three settings (ckan.log_dir, ckan.dump_dir and ckan.backup_dir) are
# all used in cron jobs, not in CKAN itself. CKAN logging is configured 
# in the logging configuration below
# Directory for logs (produced by cron scripts associated with ckan)
ckan.log_dir = %(here)s/log
# Directory for JSON/CSV dumps (must match setting in apache config)
ckan.dump_dir = /var/lib/ckan/std/static/dump
# Directory for SQL database backups
ckan.backup_dir = %(here)s/backup

# Default authorizations for new domain objects
#ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["reader"]}
#ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
#ckan.default_roles.System = {"visitor": ["reader"], "logged_in": ["editor"]}
#ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["reader"]}

## Ckan public and private recaptcha keys [localhost]
#ckan.recaptcha.publickey = 
#ckan.recaptcha.privatekey = 

# Locale/languages
ckan.locale_default = en
#ckan.locales_offered = 
# Languages are grouped by percentage of strings in CKAN 1.8 translated
# (those with 100% first, then those with >=80%, then >=50%, then <50%) and
# within these groups roughly sorted by number of worldwide native speakers
# according to Wikipedia.
ckan.locale_order = en es pt_BR ja fr it ko_KR cs_CZ ca fi el sv sr sr at latin no sk ru de pl nl bg hu sa sl lv
ckan.locales_filtered_out = pt_BR ja fr it ko_KR cs_CZ ca fi el sv sr sr at latin no sk ru de pl nl bg hu sa sl lv ro sq lt sr_Latn

## Atom Feeds
#
# Settings for customising the metadata provided in
# atom feeds.
#
# These settings are used to generate the <id> tags for both feeds
# and entries. The unique <id>s are created following the method
# outlined in http://www.taguri.org/  ie - they generate tagURIs, as specified
# in http://tools.ietf.org/html/rfc4151#section-2.1 :
#
# <id>tag:thedatahub.org,2012:/feeds/group/933f3857-79fd-4beb-a835-c0349e31ce76</id>
#
# Each component has the corresponding settings:
#
#   "thedatahub.org" is ckan.feeds.authority_name
#   "2012"           is ckan.feeds.date
#

# Leave blank to use the ckan.site_url config value, otherwise set to a
# domain or email address that you own.  e.g. thedatahub.org or
# admin at thedatahub.org
ckan.feeds.authority_name =

# Pick a date of the form "yyyy[-mm[-dd]]" during which the above domain was
# owned by you.
ckan.feeds.date = 2012

# If not set, then the value in `ckan.site_id` is used.
ckan.feeds.author_name =

# If not set, then the value in `ckan.site_url` is used.
ckan.feeds.author_link =

## File Store
#
# CKAN allows users to upload files directly to file storage either on the local
# file system or to online  storage like Amazon S3 or Google Storage.
#
# If you are using local file storage, remember to set ckan.site_url.
#
# To enable cloud storage (Google or S3), first run: pip install boto
#
# @see http://docs.ckan.org/en/latest/filestore.html

# 'Bucket' to use for file storage
ckan.storage.bucket = houston-datasets

# To enable local file storage:
#ofs.impl = pairtree
#ofs.storage_dir = /mnt/datalocale

# To enable Google cloud storage:
#ofs.impl = google
#ofs.gs_access_key_id =
#ofs.gs_secret_access_key =

# To enable S3 cloud storage:
ofs.impl = s3
ofs.aws_access_key_id = AKIAJUDRG7DMIZE3WFEQ
ofs.aws_secret_access_key = [redacted]

## ===================================
## Extensions

## Config option to enable the (1 day) cache for stats
## Default (if not defined) is True as stats computations are intensive
# ckanext.stats.cache_enabled = True

# Logging configuration
[loggers]
keys = root, ckan, ckanext

[handlers]
keys = console, file

[formatters]
keys = generic

[logger_root]
level = WARNING
handlers = console, file

[logger_ckan]
level = INFO
handlers = console, file
qualname = ckan
propagate = 0

[logger_ckanext]
level = DEBUG
handlers = console, file
qualname = ckanext
propagate = 0

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_file]
class = logging.handlers.RotatingFileHandler
formatter = generic
level = NOTSET
args = ("/var/log/ckan/std/std.log", "a", 20000000, 9)

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s


More information about the ckan-dev mailing list