Question: Cannot login or create history - 'AttributeError: 'NoneType' object has no attribute 'current_history''
0
gravatar for wtchen
4.3 years ago by
wtchen0
United States
wtchen0 wrote:

There is an installation of Galaxy on a server cluster instance. I am unable to login or create a new history. I'm not sure what could be causing this. Presumably some Python object was not created somewhere, causing some history operations to fail.

From main.log, I see this stack trace:

galaxy.web.framework ERROR 2014-08-04 15:32:24,952 Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/home/galaxygalaxy-dist/lib/galaxy/web/framework/__init__.py", line 331, in decorator
    rval = func( self, trans, *args, **kwargs)
  File "/home/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/api/histories.py", line 110, in show
    history = trans.get_history( create=True )
  File "/home/galaxy/galaxy-dist/lib/galaxy/web/framework/__init__.py", line 1017, in get_history
    history = self.new_history()
  File "/home/galaxy/galaxy-dist/lib/galaxy/web/framework/__init__.py", line 1073, in new_history
    self.galaxy_session.current_history = history
AttributeError: 'NoneType' object has no attribute 'current_history'

From the web UI:

user
quota_percent
null
nice_total_disk_usage
0 bytes
total_disk_usage
0
id
null
username
(anonymous user)
email
 
is_admin
false
sourceCurrentHistoryPanel()xhr
readyState
4
responseText
{"err_msg": "Uncaught exception in exposed API method:", "err_code": 0}
responseJSON
err_msg
Uncaught exception in exposed API method:
err_code
0
status
500
statusText
Internal Server Error
responseHeaders
Date
Mon, 04 Aug 2014 22:32:24 GMT
Cache-Control
max-age=0,no-cache,no-store
Server
PasteWSGIServer/0.5 Python/2.6.6
Connection
close
Transfer-Encoding
Identity
Content-Type
application/json
options


historyIdcurrenthistory

 

I would appreciate if someone can give me some insight about how to fix this. Thanks!

galaxy • 2.4k views
ADD COMMENTlink modified 4.3 years ago by Jennifer Hillman Jackson25k • written 4.3 years ago by wtchen0

What browser are you using?  Any javascript errors in the web console?

And what does your server configuration look like?  Are you talking directly to the galaxy server, or is there a proxy in the mix somewhere?

It looks like your session isn't being established or isn't persistent.

ADD REPLYlink written 4.3 years ago by Dannon Baker3.7k

Checking the console in Chrome, I don't see any errors.

There is a proxy set up. From the universe.wsgi:

........

[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /galaxy2

........

[app:main]

...

filter-with = proxy-prefix

..........

The dots are ellipses indicating other text in between.

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by wtchen0

To cut potential issues out of the loop, can you try connecting to the galaxy server directly (bypassing the proxy) with a browser and see if you can log in?

ADD REPLYlink written 4.3 years ago by Dannon Baker3.7k

I have tried connected directly. Same problem it seems.

ADD REPLYlink written 4.3 years ago by wtchen0
0
gravatar for Jennifer Hillman Jackson
4.3 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Hi,

You'll need to use an account, generate an API key (User -> Preferences -> Manage your API keys), then use that when making calls.

Instructions: http://wiki.galaxyproject.org/CloudMan/CustomizeGalaxyCloud

More help can be found in the wiki in the "Admin" section.

Hopefully this helps. Jen, Galaxy team

ADD COMMENTlink written 4.3 years ago by Jennifer Hillman Jackson25k

The problem is that I'm unable to log in to any account, so I'm not able to access the API keys.

The installation is a copy of the official Galaxy repository. As far as I know, I'm not using CloudMan or anything like that.

ADD REPLYlink written 4.3 years ago by wtchen0
0
gravatar for Jennifer Hillman Jackson
4.3 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Oh sorry, I misunderstood that you were working on a local. You are the admin? And have configured for a production instance (created a galaxy user, added yourself as an admin user, migrated to Postgres, etc.)? Seems most likely if running in on a cluster, but is good to double check. 
http://wiki.galaxyproject.org/Admin/Config/Performance/ProductionServer
http://wiki.galaxyproject.org/Admin/Interface

Your admin account should be here in the universe.wsgi.ini file:

# Administrative users - set this to a comma-separated list of valid Galaxy
# users (email addresses).  These users will have access to the Admin section
# of the server, and will have access to create users, groups, roles,
# libraries, and more.  For more information, see:
#   https://wiki.galaxyproject.org/Admin/Interface
#admin_users = None            <<< ADD email HERE

You should at least be able to register your admin account, regardless of other changes. Registering a general account is active by default (as is anonymous UI access). Registering is under the "User" menu. Is this the function that is not working for you? For your admin, or general accounts, or both? Was the universe.wsgi.ini file altered? When did you download Galaxy? Was it from the release (galaxy-dist) or the development (galaxy-central) repository? Have you upgraded it since the original download and followed any release-specific upgrade instructions provided in the News Brief (if a full release)? I only ask so that it is clearer what baseline you are working from.

These sections in particular are where to look to ensure that non-admin registration is active:

# Force everyone to log in (disable anonymous access).
#require_login = False

# Allow unregistered users to create new accounts (otherwise, they will have to
# be created by an admin).
#allow_user_creation = True

There are more complex ways to manage access (described in the Admin wiki pages). Quotas, registration confirmation, authentication, permissions/actions to grant accounts, and the like. But those are secondary - and may only be important if you are hosting your Galaxy publicly and/or for others to access. Let's get basic login resolved first!

Thanks, Jen, Galaxy team

 

ADD COMMENTlink written 4.3 years ago by Jennifer Hillman Jackson25k

Thank you so much for your help! I tried adding a user under the user menu, but I am unable to log in. I type in the credentials, click login, and it just goes back to the home page.

I have edited universe.wsgi. I have only changed the port for the server to broadcast on and the database info, and allowing users to create their own accounts. Basically the standard set up.

The distribution I am using is the latest one from galaxy-dist. As you might guess, I only installed it very recently. It was patched for the security update last week.

ADD REPLYlink written 4.3 years ago by wtchen0

Thanks for the quick feedback, this will help us troubleshoot (in the morning). Meanwhile, a bit more info would be helpful: are you able to create an account for your admin account, the one specified in unverse_wsgi.ini (User -> Register)? Also, just to check, after making any edits to the the unverse_wsgi.ini file, you restart Galaxy, correct? Thanks! Jen, Galaxy team

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by Jennifer Hillman Jackson25k

I was able to finish the account creation process, but I was not able to login. The account was probably created and stored in the database, since I am unable to reuse the same email when I try to create a new account.

Yes, I did restart Galaxy after editing universe.wsgi.ini.

ADD REPLYlink written 4.3 years ago by wtchen0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 166 users visited in the last hour