• we tried creating local administrator account in both the servers and now it is working fine.
    but
    after stopping the primary services still the secondary database isn't synchronized and I am getting the below error:-

    Msg 976, Level 14, State 2, Line 1

    The target database, 'db1', is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group. For more information, see the ALTER AVAILABILITY GROUP statement in SQL Server Books Online.

    Msg 208, Level 16, State 1, Line 3

    Invalid object name 'test'.