• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    [SOLVED] Changing Admin passwd leads to "Timeout trying to lock table "USERS"; SQL statement:"

    User help
    3
    7
    2.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mircsiczM
      mircsicz
      last edited by mircsicz

      I've just changed the admin passwd on a new installation.

      When trying to relogin I see this in the log's

      SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]
      
      org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?)]; Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren
      Timeout trying to lock table "USERS"; SQL statement:
      SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]; nested exception is org.h2.jdbc.JdbcSQLException: Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren
      Timeout trying to lock table "USERS"; SQL statement:
      SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]
      

      And the UI shows:

      An error occurred while logging in - Internal Server Error
      
      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by phildunlap

        Huh. Well, I guess you should probably post SELECT * FROM USERS and post that from the h2-web-console.sh (disinfect whatever personal data is there) or move your existing Mango/databases/mah2.h2.db with Mango off and then start Mango on a fresh database. Or perhaps their were other errors in your bootup.

        1 Reply Last reply Reply Quote 0
        • Jared WiltshireJ
          Jared Wiltshire
          last edited by

          @mircsicz Were you using the H2 web console at the time? It's possibly related to that.

          Developer at Radix IoT

          1 Reply Last reply Reply Quote 0
          • mircsiczM
            mircsicz
            last edited by mircsicz

            @phildunlap There's no user other than admin... And as this is only a side effect and a testing setup I prefer to focus on the XML import... But I'll look into it as soon as the import work's

            @Jared-Wiltshire No, I've a tmux session on the server where I start and stop the H2-web-console.sh script... And while changing that passwd it was definetly off!

            1 Reply Last reply Reply Quote 0
            • mircsiczM
              mircsicz
              last edited by mircsicz

              I did another test:

              • created another superadmin user
              • changed "admin" passwd
              • tried to relogin with both user's

              both failed and the error in the log is:

                 org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER=org.springframework.web.context.request.async.WebAsyncManager@4ef58d08
                 javax.servlet.error.status_code=500
                 javax.servlet.error.exception_type=class org.springframework.dao.CannotAcquireLockException
                 javax.servlet.http.HttpServletResponse=org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper@28c26f74
                 _csrf=org.springframework.security.web.csrf.DefaultCsrfToken@12b6570
                 javax.servlet.error.message=org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?)]; Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren
              Timeout trying to lock table "USERS"; SQL statement:
              SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]; nested exception is org.h2.jdbc.JdbcSQLException: Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren
              Timeout trying to lock table "USERS"; SQL statement:
              SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]
              

              Resetting the admin passwd in H2-web-console and all is fine again:

              UPDATE USERS SET PASSWORD = '{NONE}admin' WHERE USERNAME = 'admin'
              
              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                Well so it does. This was a bug with changing the password of the current user getting a database transaction stuck. This has been fixed and an update is released. Thanks for bringing this to our attention.

                1 Reply Last reply Reply Quote 0
                • mircsiczM
                  mircsicz
                  last edited by

                  I Installed the update and can approve that changing the passwd now works for me ;-)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post