After upgrade from 6.1.8 to 7.5.6 all logins fail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qpoint
    Member
    • Aug 2021
    • 39

    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.​
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1655

    #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

    • qpoint
      Member
      • Aug 2021
      • 39

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

      Comment

      • yuri
        Member
        • Mar 2014
        • 8846

        #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
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8846

          #5
          Or better, try to restore the 'passwordSalt' from the config of the backup.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • yuri
            Member
            • Mar 2014
            • 8846

            #6
            Maybe it tried to create config-internal.php (and move some parameters there), but failed for some reason. Have never encountered it.
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • qpoint
              Member
              • Aug 2021
              • 39

              #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

              • yuri
                Member
                • Mar 2014
                • 8846

                #8
                Maybe it's a maintenance mode enabled in the config.
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8846

                  #9
                  I believe I remember I read about such a problem somewhere before.
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  • yuri
                    Member
                    • Mar 2014
                    • 8846

                    #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
                    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                    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.
                  • qpoint
                    Member
                    • Aug 2021
                    • 39

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

                    Comment

                    • yuri
                      Member
                      • Mar 2014
                      • 8846

                      #12
                      Maybe it's not v7.5 now. The similar issue from the topic I references is on v7.1 with newer PHP.
                      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                      Comment

                      • qpoint
                        Member
                        • Aug 2021
                        • 39

                        #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

                        • yuri
                          Member
                          • Mar 2014
                          • 8846

                          #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
                          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                          Comment

                          • yuri
                            Member
                            • Mar 2014
                            • 8846

                            #15
                            And this: https://forum.espocrm.com/forum/deve...ays-use-latest
                            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                            Comment

                            Working...