Announcement

Collapse
No announcement yet.

After upgrade from 6.1.8 to 7.5.6 all logins fail

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • After upgrade from 6.1.8 to 7.5.6 all logins fail

    Am using docker and compose. Did an update to v7.5.6, usual docker steps- set the image version, pull, up.
    Get the login screen, but cannot log with any user. Turned on DEBUG in the logger.
    Code:
    [2023-10-22 14:31:00] INFO: AUTH: Trying to login as user 'billr' which is not active. [] []
    It thinks all users are inactive.
    Turned on 'sql' => true, but no queries are showing in the espo log.

    Viewed the database, and "user" table is fine, is_active=1.
    The table "auth_log_record" is getting updated with login attempts and shows denial reason of INACTIVE_USER.

    Tried the documented suggestions for php rebuild.php, php clear_cache.php, but no change in behavior.

    data/config/php still looks ok. Saw mention of the use of config-internal.php as of 7.0. This is not present on my system, is this a factor?

    I'm out of ideas. Appreciate any suggestions.

    The compose file, in case it helps.
    Code:
      espocrm:
        image: espocrm/espocrm:7.5.6
        container_name: espocrm
        environment:
          ESPOCRM_DATABASE_HOST: db:3306
          ESPOCRM_DATABASE_NAME: espocrm_db
          ESPOCRM_DATABASE_USER: espocrm_user
          ESPOCRM_DATABASE_PASSWORD: SECRET
          ESPOCRM_ADMIN_USERNAME: admin
          ESPOCRM_ADMIN_PASSWORD: SECRET
          ESPOCRM_SITE_URL: "http://localhost:8080"
        restart: always
        depends_on:
          - db
    
        ports:
          - 8080:80
        volumes:
          - /dockerdata/espocrm:/var/www/html
    Using a bind mount for convenience in backup and accessing with VSCode remote.​

  • #2
    In database table "user" there is the field is_active, which has the values true=active, 0=inactive. So set this field in database to 1

    Comment


    • #3
      Thanks for the suggestion, but yes, this field is currently 1 for all active users. No active user can log in.

      Comment


      • #4
        Maybe the config file somehow got removed, resulting in the passwordSalt being lost.

        You can set passwords for specific users via CLI https://docs.espocrm.com/administrat...-user-password

        Comment


        • #5
          Or better, try to restore the 'passwordSalt' from the config of the backup.

          Comment


          • #6
            Maybe it tried to create config-internal.php (and move some parameters there), but failed for some reason. Have never encountered it.

            Comment


            • #7
              I checked the passwordSalt and other items in config early on. Confirmed it is still correct in data/config.php. Checked it against several backups too.

              I was afraid to manually set a password, but perhaps I can try setting it the same and see if hash changes.

              Of note, it is failing in application/Espo/Core/Authentication/Authentication.php
              Code:
              protected function processUserCheck(User $user, ?AuthLogRecord $authLogRecord) : bool
              {
              if (!$user->isActive()) {​
              ...
              Drilling down through the various parent classes, at application/Espo/ORM/BaseEntity.php
              it is trying to look up a field by name 'isActive'.

              This is as far as I've gotten so far.

              Can config-internal.php be created manually? And if so, is the format/contents the same as config/php?


              Comment


              • #8
                Maybe it's a maintenance mode enabled in the config.

                Comment


                • #9
                  I believe I remember I read about such a problem somewhere before.

                  Comment


                  • #10
                    There is a problem with my espocrm installation I have been running for many years without problems: recently I cannot login to my website. I enter the correct credentials, then I get a 401 unauthorized (F12 developer options). The errormessage on the webpage is: Invalid username/password. There is NO errormessage about this

                    Comment


                    • yuri
                      yuri commented
                      Editing a comment
                      What PHP version? If it's too new, downgrade to the version which existed when EspoCRM v7.5 was released.

                  • #11
                    Worth checking...but is ok.
                    Code:
                    'maintenanceMode' => false,

                    Comment


                    • #12
                      Maybe it's not v7.5 now. The similar issue from the topic I references is on v7.1 with newer PHP.

                      Comment


                      • #13
                        It's a docker deployment. The 7.5.6 image comes with PHP 8.1.23.
                        Confirmed it by exec'g into container and it shows: PHP 8.1.23 (cli) (built: Sep 7 2023 06:29:35) (NTS).

                        This is a change from php 7.x in the prior container.

                        Config.php still shows the pre-upgrade version though:
                        Code:
                          'version' => '6.1.8',
                        I'll look over the post you sent.

                        Comment


                        • #14
                          I think you need to run upgrade. I'm not well familiar with all details how Espo works on Docker though. See https://forum.espocrm.com/forum/deve...n-environments

                          Comment


                          • #15
                            And this: https://forum.espocrm.com/forum/deve...ays-use-latest

                            Comment

                            Working...
                            X