<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #929: Handle the case when the licenses service is down better</title>
    <link>http://localhost/ticket/929</link>
    <description>&lt;p&gt;
I'm using v 1.3.1a and get a lot of "&lt;a class="missing wiki"&gt;WebApp?&lt;/a&gt; Error: &amp;lt;type 'exceptions.Exception'&amp;gt;: Couldn't connect to licenses service: &amp;lt;urlopen error (104, 'Connection reset by peer')&amp;gt;" error messages.
&lt;/p&gt;
&lt;pre class="wiki"&gt;Module ckan.forms.package:87 in build_package_form
&amp;lt;&amp;lt;      # Options/settings
           builder.set_field_option('name', 'validate', package_name_validator)
           builder.set_field_option('license_id', 'dropdown', {'options':[('', None)] + model.Package.get_license_options()})
           builder.set_field_option('state', 'dropdown', {'options':model.State.all})
           builder.set_field_option('notes', 'textarea', {'size':'60x15'})
&amp;gt;&amp;gt;  builder.set_field_option('license_id', 'dropdown', {'options':[('', None)] + model.Package.get_license_options()})
Module ckan.model.package:283 in get_license_options
&amp;lt;&amp;lt;      @classmethod
           def get_license_options(self):
               register = self.get_license_register()
               return [(l.title, l.id) for l in register.values()]
&amp;gt;&amp;gt;  register = self.get_license_register()
Module ckan.model.package:278 in get_license_register
&amp;lt;&amp;lt;      def get_license_register(self):
               if not hasattr(self, '_license_register'):
                   self._license_register = LicenseRegister()
               return self._license_register
&amp;gt;&amp;gt;  self._license_register = LicenseRegister()
Module ckan.model.license:46 in __init__
&amp;lt;&amp;lt;              from licenses.service import LicensesService2
                   self.service = LicensesService2(group_url)
                   entity_list = self.service.get_licenses()
               else:
                   from licenses import Licenses
&amp;gt;&amp;gt;  entity_list = self.service.get_licenses()
Module licenses.service:44 in get_licenses
&amp;lt;&amp;lt;          except Exception, inst:
                   msg = "Couldn't connect to licenses service: %s" % inst
                   raise Exception, msg
               try:
                   licenses = loads(response_body)
&amp;gt;&amp;gt;  raise Exception, msg
Exception: Couldn't connect to licenses service: &amp;lt;urlopen error (104, 'Connection reset by peer')&amp;gt;
&lt;/pre&gt;</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/929</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>thejimmyg</dc:creator>

      <pubDate>Mon, 14 Feb 2011 12:21:28 GMT</pubDate>
      <title>priority, summary changed</title>
      <link>http://localhost/ticket/929#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/929#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;priority&lt;/strong&gt;
                changed from &lt;em&gt;awaiting triage&lt;/em&gt; to &lt;em&gt;minor&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;summary&lt;/strong&gt;
                changed from &lt;em&gt;Exception: Couldn't connect to licenses service&lt;/em&gt; to &lt;em&gt;Handle the case when the licenses service is down better&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The licenses service was down, it is back up now. We should be able to cope with this situation better though. Renaming the ticket.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>rgrp</dc:creator>

      <pubDate>Fri, 11 Mar 2011 10:53:02 GMT</pubDate>
      <title>owner, milestone set</title>
      <link>http://localhost/ticket/929#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/929#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              set to &lt;em&gt;rgrp&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                set to &lt;em&gt;ckan-v1.4&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>rgrp</dc:creator>

      <pubDate>Fri, 11 Mar 2011 10:54:44 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/929#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/929#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I'm closing this ticket as a) most systems should install the licenses package (and hence have the licenses locally) and b) licenses service has now moved to s3 so should be very robust (see &lt;a class="closed ticket" href="http://localhost/ticket/973" title="enhancement: Document license configuration and license system. (closed: fixed)"&gt;ticket:973&lt;/a&gt; and &lt;a class="ext-link" href="http://knowledgeforge.net/okfn/tasks/ticket/605"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://knowledgeforge.net/okfn/tasks/ticket/605&lt;/a&gt;)
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>