History is not accessible by user

classic Classic list List threaded Threaded
4 messages Options
| Threaded
Open this post in threaded view
|

History is not accessible by user

Maximilian Friedersdorff


--------------------------------------------------------------------
Un o’r 4 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2016)
www.aber.ac.uk

Top 4 UK university and best in Wales for student satisfaction
(National Student Survey 2016)
www.aber.ac.uk


Hi,

I'm currently trying to install a galaxy instance for production.
Eventually that will involve proxying through apache but for the moment
I'm testing by accessing http://localhost:8080 directly.

When I load the front page, I get the following error:

{
  "agent": "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0",
  "url": "http://localhost:8080/galax/galaxy/api/histories/1cd8e2f6b131e891?keys=size%2Cnon_ready_jobs",
  "options": {
    "parse": true,
    "data": "keys=size%2Cnon_ready_jobs",
    "emulateHTTP": false,
    "emulateJSON": false,
    "textStatus": "error",
    "errorThrown": "Forbidden"
  },
  "xhr": {
    "readyState": 4,
    "responseText": "{\"err_msg\": \"History is not accessible by user\", \"err_code\": 403002}",
    "responseJSON": {
      "err_msg": "History is not accessible by user",
      "err_code": 403002
    },
    "status": 403,
    "statusText": "Forbidden",
    "responseHeaders": {
      "Server": "PasteWSGIServer/0.5 Python/2.7.5\r",
      "Date": "Wed, 30 Nov 2016 16:17:11 GMT\r",
      "x-frame-options": "SAMEORIGIN\r",
      "Content-Type": "application/json\r",
      "Cache-Control": "max-age=0,no-cache,no-store\r",
      "Connection": "close\r"
    }
  },
  "source": {
    "model_class": "History",
    "id": "1cd8e2f6b131e891",
    "name": "Unnamed history",
    "state": "new",
    "deleted": false,
    "importable": false,
    "create_time": "2016-11-30T16:17:11",
    "contents_url": "/galaxy/api/histories/1cd8e2f6b131e891/contents",
    "size": 0,
    "user_id": null,
    "username_and_slug": null,
    "annotation": null,
    "state_details": {
      "paused": 0,
      "ok": 0,
      "failed_metadata": 0,
      "upload": 0,
      "discarded": 0,
      "running": 0,
      "setting_metadata": 0,
      "error": 0,
      "new": 0,
      "queued": 0,
      "empty": 0
    },
    "empty": true,
    "update_time": "2016-11-30T16:17:11",
    "tags": [],
    "genome_build": "?",
    "slug": null,
    "url": "/galaxy/api/histories/1cd8e2f6b131e891",
    "state_ids": {
      "paused": [],
      "ok": [],
      "failed_metadata": [],
      "upload": [],
      "discarded": [],
      "running": [],
      "setting_metadata": [],
      "error": [],
      "new": [],
      "queued": [],
      "empty": []
    },
    "published": false,
    "purged": false,
    "nice_size": "0 b"
  },
  "user": {
    "id": null,
    "username": "(anonymous user)",
    "email": "",
    "total_disk_usage": 0,
    "nice_total_disk_usage": "0 bytes",
    "quota_percent": null,
    "is_admin": false
  }
}


I'm not sure what to make of that.

Galaxy is running as it's own user and group, in a subdirectory of the
home directory of that user.  File permissions are sufficiently
permissive.  It is connecting to a mysql database `galaxy' as a user
that has ALL PRIVILEGES on `galaxy'.* tables.

It is galaxy version 16.07, running on CentOS7.2 if it matters.

I've been battling with SELinux to give apache sufficient permissions to
act as a proxy for galaxy, but this issue is (I think) separate from that.

Thanks

Max

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

signature.asc (463 bytes) Download Attachment
| Threaded
Open this post in threaded view
|

Re: History is not accessible by user

Hans-Rudolf Hotz
Hi Max

This does look bizarre indeed. I have no answer, and I can just
recommend a few things to test:


- delete your cookies

- how do you authenticate your users? can you log in as someone else?
what happens if you set 'require_login = False'

- what happens if you simplify your installation: i.e. switch back to
the built in SQlite database


Regards, Hans-Rudolf

PS: ....and a completely unrelated piece of advice: Once you have fixed
this issue, I strongly recommend switching to PostgreSQL.






On 11/30/2016 05:25 PM, Maximilian Friedersdorff wrote:

>
>
> Hi,
>
> I'm currently trying to install a galaxy instance for production.
> Eventually that will involve proxying through apache but for the moment
> I'm testing by accessinghttp://localhost:8080  directly.
>
> When I load the front page, I get the following error:
>
> {
>    "agent": "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0",
>    "url":"http://localhost:8080/galax/galaxy/api/histories/1cd8e2f6b131e891?keys=size%2Cnon_ready_jobs",
>    "options": {
>      "parse": true,
>      "data": "keys=size%2Cnon_ready_jobs",
>      "emulateHTTP": false,
>      "emulateJSON": false,
>      "textStatus": "error",
>      "errorThrown": "Forbidden"
>    },
>    "xhr": {
>      "readyState": 4,
>      "responseText": "{\"err_msg\": \"History is not accessible by user\", \"err_code\": 403002}",
>      "responseJSON": {
>        "err_msg": "History is not accessible by user",
>        "err_code": 403002
>      },
>      "status": 403,
>      "statusText": "Forbidden",
>      "responseHeaders": {
>        "Server": "PasteWSGIServer/0.5 Python/2.7.5\r",
>        "Date": "Wed, 30 Nov 2016 16:17:11 GMT\r",
>        "x-frame-options": "SAMEORIGIN\r",
>        "Content-Type": "application/json\r",
>        "Cache-Control": "max-age=0,no-cache,no-store\r",
>        "Connection": "close\r"
>      }
>    },
>    "source": {
>      "model_class": "History",
>      "id": "1cd8e2f6b131e891",
>      "name": "Unnamed history",
>      "state": "new",
>      "deleted": false,
>      "importable": false,
>      "create_time": "2016-11-30T16:17:11",
>      "contents_url": "/galaxy/api/histories/1cd8e2f6b131e891/contents",
>      "size": 0,
>      "user_id": null,
>      "username_and_slug": null,
>      "annotation": null,
>      "state_details": {
>        "paused": 0,
>        "ok": 0,
>        "failed_metadata": 0,
>        "upload": 0,
>        "discarded": 0,
>        "running": 0,
>        "setting_metadata": 0,
>        "error": 0,
>        "new": 0,
>        "queued": 0,
>        "empty": 0
>      },
>      "empty": true,
>      "update_time": "2016-11-30T16:17:11",
>      "tags": [],
>      "genome_build": "?",
>      "slug": null,
>      "url": "/galaxy/api/histories/1cd8e2f6b131e891",
>      "state_ids": {
>        "paused": [],
>        "ok": [],
>        "failed_metadata": [],
>        "upload": [],
>        "discarded": [],
>        "running": [],
>        "setting_metadata": [],
>        "error": [],
>        "new": [],
>        "queued": [],
>        "empty": []
>      },
>      "published": false,
>      "purged": false,
>      "nice_size": "0 b"
>    },
>    "user": {
>      "id": null,
>      "username": "(anonymous user)",
>      "email": "",
>      "total_disk_usage": 0,
>      "nice_total_disk_usage": "0 bytes",
>      "quota_percent": null,
>      "is_admin": false
>    }
> }
>
>
> I'm not sure what to make of that.
>
> Galaxy is running as it's own user and group, in a subdirectory of the
> home directory of that user.  File permissions are sufficiently
> permissive.  It is connecting to a mysql database `galaxy' as a user
> that has ALL PRIVILEGES on `galaxy'.* tables.
>
> It is galaxy version 16.07, running on CentOS7.2 if it matters.
>
> I've been battling with SELinux to give apache sufficient permissions to
> act as a proxy for galaxy, but this issue is (I think) separate from that.
>
> Thanks
>
> Max
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: History is not accessible by user

Maximilian Friedersdorff


--------------------------------------------------------------------
Un o’r 4 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2016)
www.aber.ac.uk

Top 4 UK university and best in Wales for student satisfaction
(National Student Survey 2016)
www.aber.ac.uk


Hans-Rudolf Hotz writes:

> - delete your cookies

That seems to have done the trick. Very Strange...

> - what happens if you simplify your installation: i.e. switch back to
> the built in SQlite database

There was no change in behaviour if I switched back to the SQLite db
after previously using MySQL.  However a fresh clone, with otherwise
identical settings, had no issues when using SQLite.


In either case, clearing cookies (or rather all history) seems to have
solved the problem.  I'm guessing there was a strange interaction
between data in the saved cookies (presumably containing session info
for a now non-existant user), the history system and MySQL.  Oh well.

> PS: ....and a completely unrelated piece of advice: Once you have fixed
> this issue, I strongly recommend switching to PostgreSQL.

I gather SQLAlchemy prefers this!  What kind of issues can I expect when
using MySQL?

Many Thanks

Max

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

signature.asc (463 bytes) Download Attachment
| Threaded
Open this post in threaded view
|

MySQL versus PostgreSQL - was: History is not accessible by user

Hans-Rudolf Hotz


On 12/01/2016 12:08 PM, Maximilian Friedersdorff wrote:

>
>> >PS: ....and a completely unrelated piece of advice: Once you have fixed
>> >this issue, I strongly recommend switching to PostgreSQL.
 >
> I gather SQLAlchemy prefers this!  What kind of issues can I expect when
> using MySQL?


As far as I am aware, there are no current (unsolvable) issues with
MySQL. Since all the development is done with PostgreSQL, this might
change in the future.

Hans-Rudolf
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/