Re: [islandora] MicroServices

67 views
Skip to first unread message

Steve Sonnenberg

unread,
May 18, 2012, 12:37:41 AM5/18/12
to isla...@googlegroups.com
Hi Team,

I've been trying to get MicroServices to work on the Islandora_VM 12.1 using the sample plugin, but am running into a simple authorization failure.

The islandora_microservices.cfg file has a username/password fedoraAdmin,password are these the wrong credentials?

My islandora_microservices.log file shows:

[May/18/2012:01:55:56] DEBUG root Trying GET on /fedora/objects/islandora:361/datastreams?format=text%2Fxml
[May/18/2012:01:55:56] DEBUG root Trying GET on /fedora/objects/islandora:361/datastreams/RELS-EXT?validateChecksum=false&format=text%2Fxml
[May/18/2012:01:55:56] ERROR stomp.py An unhandled exception was encountered in the stomp receiver loop
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/stomp.py-3.0.2-py2.6.egg/stomp/connect.py", line 541, in __receiver_loop
    self.__notify(frame_type, headers, body)
  File "/usr/lib/python2.6/site-packages/stomp.py-3.0.2-py2.6.egg/stomp/connect.py", line 510, in __notify
    notify_func(headers, body)
  File "/opt/islandora_microservices/islandora_listener.py", line 185, in on_message
    content_models = self._get_fedora_content_models(obj)
  File "/opt/islandora_microservices/islandora_listener.py", line 142, in _get_fedora_content_models
    ds = obj['RELS-EXT']
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/object.py", line 50, in __getitem__
    ds = RELSEXTDatastream(dsid, self)
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/datastream.py", line 106, in __init__
    super(RELSEXTDatastream, self).__init__(dsid, object)
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/datastream.py", line 33, in __init__
    self.dsid)
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/client.py", line 131, in getDatastreamProfile
    response = request.submit(format=u'text/xml')
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/wadl.py", line 80, in submit
    method=self.method.name)
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/connection.py", line 80, in open
    return check_response_status(self.conn.getresponse())
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/connection.py", line 107, in check_response_status
    raise ex
FedoraConnectionException: HTTP code=401, Reason=Unauthorized, body=Fedora: 401

Thanks!

--
Steve Sonnenberg

Richard Wincewicz

unread,
May 18, 2012, 3:15:56 AM5/18/12
to isla...@googlegroups.com
Hi Steve

Assuming you've not changed the default Fedora credentials on the VM then the username will be fedoraAdmin and the password will be islandora. To confirm this (or to change these to something a little more secure) you can view/edit the the file /usr/local/fedora/server/config/fedora-users.xml

Richard


--
You received this message because you are subscribed to the Google Groups "islandora" group.
To post to this group, send email to isla...@googlegroups.com.
To unsubscribe from this group, send email to islandora+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/islandora?hl=en.

Steve Sonnenberg

unread,
May 18, 2012, 10:19:42 AM5/18/12
to isla...@googlegroups.com
Thanks Richard, I no longer get the 401 error.
During an ingest of a simple image, I get the following:

[May/18/2012:10:09:59] DEBUG IslandoraListener:Stomp destination: /topic/fedora.apim.update
[May/18/2012:10:09:59] DEBUG IslandoraListener:Stomp pid: islandora:365
[May/18/2012:10:09:59] DEBUG IslandoraListener:Stomp priority: 4
[May/18/2012:10:09:59] DEBUG IslandoraListener:Stomp message-id: ID:islandora-45283-1337288366801-2:0:1:1:5
[May/18/2012:10:09:59] DEBUG IslandoraListener:Stomp <?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fedora-types="http://www.fedora.info/definitions/1/0/types/">
  <id>urn:uuid:62b5452c-7c6c-4322-8849-9ab3d39a85c1</id>
  <updated>2012-05-18T12:39:59.550Z</updated>
  <author>
    <name>admin</name>
    <uri>http://localhost:8080/fedora</uri>
  </author>
  <title type="text">ingest</title>
  <category term="Fedora Object Ingested" scheme="fedora-types:logMessage" label="xsd:string"></category>
  <category term="info:fedora/fedora-system:FOXML-1.1" scheme="fedora-types:format" label="xsd:string"></category>
  <summary type="text">islandora:365</summary>
  <content type="text">islandora:365</content>
  <category term="3.4.2" scheme="info:fedora/fedora-system:def/view#version"></category>
  <category term="info:fedora/fedora-system:ATOM-APIM-1.0" scheme="http://www.fedora.info/definitions/1/0/types/formatURI"></category>
</entry>
[May/18/2012:10:09:59] DEBUG root Trying GET on /fedora/objects/islandora:365?format=text%2Fxml
[May/18/2012:10:09:59] ERROR root Got an Exception in open

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/fcrepo-1.1-py2.6.egg/fcrepo/connection.py", line 80, in open
    return check_response_status(self.conn.getresponse())
  File "/usr/lib/python2.6/httplib.py", line 990, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
    raise BadStatusLine(line)
BadStatusLine
[May/18/2012:10:09:59] DEBUG root Trying GET on /fedora/objects/islandora:365?format=text%2Fxml
[May/18/2012:10:09:59] DEBUG root Trying GET on /fedora/objects/islandora:365/datastreams?format=text%2Fxml
[May/18/2012:10:09:59] DEBUG root Trying GET on /fedora/objects/islandora:365/datastreams/RELS-EXT?validateChecksum=false&format=text%2Fxml
[May/18/2012:10:09:59] DEBUG root Trying GET on /fedora/objects/islandora:365/datastreams/RELS-EXT/content
[May/18/2012:10:09:59] INFO IslandoraListener.sample_plugin {   'args': [   {   'name': 'logMessage',
                    'type': 'string',
                    'value': 'Fedora Object Ingested'},
                {   'name': 'format',
                    'type': 'string',
                    'value': 'info:fedora/fedora-system:FOXML-1.1'}],
    'author': 'admin',
    'content_models': ['islandora:sp_basic_image'],
    'dsid': None,
    'id': 'urn:uuid:62b5452c-7c6c-4322-8849-9ab3d39a85c1',
    'method': 'ingest',
    'pid': 'islandora:365',
    'return': 'islandora:365',
    'updated': datetime.datetime(2012, 5, 18, 12, 39, 59, 550000),
    'uri': 'http://localhost:8080/fedora'}
[May/18/2012:10:09:59] INFO IslandoraListener.sample_plugin islandora:365

When I enter that URL in my browser I get back a valid objectProfile (in XML)

Is there additional logging that I can enable on the server side?

Thanks
--
Steve Sonnenberg

Richard Wincewicz

unread,
May 18, 2012, 10:27:21 AM5/18/12
to isla...@googlegroups.com
DEBUG is the highest level of logging you can set but you can put your own logging statements into the plugin. Adding logging.debug() lines to output more variables can help a lot when you're trying to work out what's going on.
One thing you might want to try is changing the url to /fedora/objects/islandora:365?format=xml if you are just after the XML.

Richard

John

unread,
Sep 11, 2012, 6:00:36 PM9/11/12
to isla...@googlegroups.com, richard....@googlemail.com
Has anyone managed to resolve this issue.  I am having the same problems setting up microservices. 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages