Issue Details (XML | Word | Printable)

Key: CORE-4899
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

GFIX -online: message "IProvider::attachDatabase failed when loading mapping cache" appears in Classic (only) if access uses remote protocol

Created: 03/Aug/15 10:58 PM   Updated: 24/Aug/15 03:51 PM
Component/s: GFIX
Affects Version/s: 3.0 RC1
Fix Version/s: 3.0 RC1

QA Status: Done successfully
Test Specifics: Architecture (SS/CS) specific


 Description  « Hide
Following batch:
0) reads argument %1, which can be:
*** SS_30 -- if we check 3.0 SuperServer
** SC_30 -- for 3.0 SuperClassic
** CS_30 --for pure 3.0 Classic server
(default value = 'SS_30' -- SuperServer)
1) creates database with name derived from this batch own name + suffix, using appropriate FB instance (SS/SC/CS)
2) moves this database to full shutdown
3) attempts to return database to online state using REMOTE access
4) moves database again to offline
5) attempts to return database to online state using LOCAL access

Also, after on each step it gathers info from database header and extract from it only two lines - with database name and its attributes.

Text:

=== begin of batch `shutdown-online.bat` ===
@echo off

setlocal

@rem remove any occurrence of FB home from path:
set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM

set fbarch=%1
if .%1.==.. set fbarch=SS_30

if /i .%fbarch%.==.SS_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30sS
  set fbport=3333
)
if /i .%fbarch%.==.CS_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30Cs
   set fbport=3329
)
if /i .%fbarch%.==.SC_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30Sc
  set fbport=3330
)

set dbpath=%~dp0
set dbname=%~n0.fdb.tmp

del %dbpath%%dbname% 2>nul
echo create database 'localhost/%fbport%:%dbpath%%dbname%' user 'SYSDBA' password 'masterkey'; show version; | %fbhome%\isql -q
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password masterkey | findstr /i "%dbname% attributes"


@rem --------------------------------------------------------

@echo on
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password masterkey -shut full -force 0
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password masterkey | findstr /i "%dbname% attributes"
@echo off

@rem --------------------------------------------------------

@echo on
@echo.
@echo Return to ONLINE - attempt to use remote access:
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password masterkey -online
@echo off
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password masterkey | findstr /i "%dbname% attributes"

@rem --------------------------------------------------------

@echo.
@echo Again move in shutdown mode.
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password masterkey -shut full -force 0 1>nul 2>&1
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password masterkey | findstr /i "%dbname% attributes"

@rem --------------------------------------------------------
@echo on
@echo.
@echo Return to ONLINE - attempt to use local access:
%fbhome%\gfix %dbpath%%dbname% -user SYSDBA -password masterkey -online
@echo off
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password masterkey | findstr /i "%dbname% attributes"

del %dbpath%%dbname% 2>nul
=== end of batch `shutdown-online.bat` ===

All three architectures were checked on WI-V3.0.0.31981.

Result for SS_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gstat localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user SYSDBA -pa
ssword masterkey | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -online
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write


(i.e. all fine - the're no errors occur)


Result for SC_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gstat localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user SYSDBA -pa
ssword masterkey | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -online
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

(also all fine, no errors)


Result for CS_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gstat localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user SYSDBA -pa
ssword masterkey | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -online
database C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP shutdown
-IProvider::attachDatabase failed when loading mapping cache
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes force write


Messages in Classic differ from other two architectures here:
. . .
Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -passwo
rd masterkey -online
database C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP shutdown
-IProvider::attachDatabase failed when loading mapping cache
. . .

PS. I have no guess what is correct in above text: maybe it is Classic behave like it was intended and SS & SC are wrong ?

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Simonov Denis added a comment - 04/Aug/15 01:39 PM
Did you change the parameter ServerMode in firebird.conf under each architecture?

Pavel Zotov added a comment - 04/Aug/15 01:44 PM
I have three FB instances (CS/SC/SS), each live in separate folder. And of course, their `firebird.conf` files differ in this value.

Alexander Peshkov added a comment - 18/Aug/15 03:07 PM
In cases when authentication is possible without maps that can't be currently read from shutdown database attach() error is ignored. In case when authentication fails (no context) an error message about failed access to maps is added to make conditions better understood by user.