can't create user on a new instance

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

can't create user on a new instance

Rui Wang
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Rui Wang
Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Qiang Gu
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Marius van den Beek
Hi Rui,

The session token is used to prevent certain kinds of attacks. Your browser may still have a session token for the old instance. You can delete the cookies for this address in your browser and you should be issued a new and valid token.

Hope that helps,
Marius

On Thu, Oct 11, 2018, 7:12 AM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui
___________________________________________________________
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/

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Rui Wang
In reply to this post by Qiang Gu
Hi Qiang,

Thanks so much for the email. The default sqlite seems to be the same. I spent some time with the kickstart. That would be fantastic if it works...sadly it failed on me. :-( Let me make some more effort on that. Btw, do you have a better version of the instructions for the kickstart?

Cheers,
Rui

On Wed, Oct 10, 2018 at 10:12 PM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Rui Wang
In reply to this post by Marius van den Beek
Hi Marius,

Thanks for your suggestion! I tried it with a different browser that never accessed galaxy, but it still gave me the same message. :-( Any thoughts?

Cheers,
Rui

On Wed, Oct 10, 2018 at 11:25 PM Marius van den Beek <[hidden email]> wrote:
Hi Rui,

The session token is used to prevent certain kinds of attacks. Your browser may still have a session token for the old instance. You can delete the cookies for this address in your browser and you should be issued a new and valid token.

Hope that helps,
Marius

On Thu, Oct 11, 2018, 7:12 AM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui
___________________________________________________________
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/

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Rui Wang
In reply to this post by Qiang Gu
Hi Qiang,

I looked at the postgres, here is the ownership info:

bioinfoadmin=> \l
                                     List of databases
     Name     |    Owner     | Encoding |   Collate   |    Ctype    |   Access privileges
--------------+--------------+----------+-------------+-------------+-----------------------
 bioinfoadmin | bioinfoadmin | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 citation     | bioinfoadmin | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres     | postgres     | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0    | postgres     | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
              |              |          |             |             | postgres=CTc/postgres
 template1    | postgres     | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
              |              |          |             |             | postgres=CTc/postgres
(5 rows)

Does this look okay to you? the db bioinfoadmin is the one that is set in the galaxy config, and it's owned by
the user bioinfoadmin which is used to start galaxy.

Thanks,
Rui

On Wed, Oct 10, 2018 at 10:12 PM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/
| Threaded
Open this post in threaded view
|

Re: can't create user on a new instance

Rui Wang
In reply to this post by Rui Wang
Hey Folks,

When I used the kickstart, I hit this always:

TASK [galaxyprojectdotorg.galaxy-os : Update APT cache] *************************************************************************
 [WARNING]: sftp transfer mechanism failed on [localhost]. Use ANSIBLE_DEBUG=1 to see detailed information

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to update apt cache."}

Have you seen this before? If you do, please give me a hand. :)

Thanks,
Rui

On Fri, Oct 12, 2018 at 2:17 PM Rui Wang <[hidden email]> wrote:
Hi Qiang,

Let me try that. I think the postgres might be contaminated by the attempt to use kickstart. During that it modify the config of postgres permissions and it took me a while to clean those to get postgres working again(which may or may not really clean the change completely). 

I'll get back to you on this. Also I'll let you know my attempts on the kickstart. The problem was with the updater. :-(

Thanks,
Rui

On Fri, Oct 12, 2018 at 12:23 PM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Galaxy will use the default sqlite if you comment out the db setting the config file (`config/galaxy.yml`). You mean the sqlite works the same as the postgresql, which doesn't allow you to create users? 
If that's the case, try `git clone` a new galaxy repo, in the galaxy folder, `git checkout remotes/original/release_18.05`, `git checkout -b release_18.05`, `./run.sh`. 
Basically, I would like to make the sqlite working first, then switch to postgresql.  The above-mentioned steps may help identify the hidden issue.

Good luck!

-Qiang



From: Rui Wang [[hidden email]]
Sent: Friday, October 12, 2018 1:01 AM
To: Qiang Gu
Cc: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Qiang,

Thanks so much for the email. The default sqlite seems to be the same. I spent some time with the kickstart. That would be fantastic if it works...sadly it failed on me. :-( Let me make some more effort on that. Btw, do you have a better version of the instructions for the kickstart?

Cheers,
Rui

On Wed, Oct 10, 2018 at 10:12 PM Qiang Gu <[hidden email]> wrote:
Hi Rui,

Does the default database sqlite work for you? I guess there is certain mis-configuration in your
postgresql settings or certain element in the config/galaxy.yml file is broken. Try to enter your postgresql database in terminal using the same login info and create a table to make sure you have proper privileges.
Alternatively, using GalaxyKickStart (https://github.com/ARTbio/GalaxyKickStart) to deploy a server
isn't that difficult and a postgresql database comes with it by default. Good luck!

Thanks,

-Qiang
  

From: galaxy-dev [[hidden email]] on behalf of Rui Wang [[hidden email]]
Sent: Wednesday, October 10, 2018 9:30 PM
To: [hidden email]
Subject: Re: [galaxy-dev] can't create user on a new instance

Hi Folks,

I still could not create new user account with the same error message. Has anyone happened to see this before?

Cheers,
Rui

On Tue, Oct 9, 2018 at 5:48 PM Rui Wang <[hidden email]> wrote:
Hey Folks,

I just installed a new 18.05 instance with a new postgresql db created. However, the UI doesn't allow me to create any user. After I provided all input information, it says 

galaxy.web.framework.webapp WARNING 2018-10-09 17:28:35,735 [p:32925,w:1,m:0] [uWSGIWorker1Core2] Wrong session token found, denying request

in the server log. Btw, I enabled 'allow to create user' and admin user list is empty.

I looked into it, and it's a function in lib/galaxy/web/framework/webapp.py:

    def check_csrf_token(self):
        session_csrf_token = self.request.params.get("session_csrf_token", None)
        problem = False
        if not session_csrf_token:
            log.warning("No session_csrf_token set, denying request.")
            problem = True
        elif session_csrf_token != self.session_csrf_token:
            log.warning("Wrong session token found, denying request.")
            problem = True

        if problem:
            return self.show_warn_message("Failed to authorize action.")

Could someone give me a hand? :-)

Cheers,
Rui

___________________________________________________________
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/