Stream: pascal
Topic: server updates
Jose Costa Teixeira (Oct 02 2018 at 14:32):
I think the server command line syntax changed... what is the basic command line to get the server running locally ?
I noticed something that looks like a bug
Jose Costa Teixeira (Oct 02 2018 at 14:43):
issue:
search for patients, click on a link to one of the results. The link is {base}/r4/entry/1 but should be {base/r4/Patient/1 .
Jose Costa Teixeira (Oct 02 2018 at 14:46):
first guess: could it be FHIR.Server.XhtmlComp.pas line 455?
(e.fhirType vs e.resource.fhirType)
Grahame Grieve (Oct 02 2018 at 16:16):
I thought I just fixed that
Grahame Grieve (Oct 02 2018 at 16:16):
-cmd exec
Jose Costa Teixeira (Oct 02 2018 at 16:18):
you fixed line 450 recently indeed, but not line 455
Jose Costa Teixeira (Oct 02 2018 at 16:19):
Jose Costa Teixeira (Oct 02 2018 at 16:20):
i'm on it
Jose Costa Teixeira (Oct 02 2018 at 16:20):
btw, where is / how to configure the server endpoint?
Jose Costa Teixeira (Oct 02 2018 at 16:21):
/open no longer works
Jose Costa Teixeira (Oct 02 2018 at 16:24):
and -cmd remount fails
Grahame Grieve (Oct 02 2018 at 17:00):
why does it fail?
Jose Costa Teixeira (Oct 02 2018 at 17:05):
9:04:33 00:00:00 FHIR Service 1.0.200. Using ini file C:\HL7\fhir4Server\fhirserver.ini with stack dumps on
19:04:33 00:00:00 EFslException: unknown version
(0000000003BB4241){FHIRServer.exe} [0000000003FB5241] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService17UnInstallDatabaseEN6System13UnicodeStringE + $1C1
(0000000003BAB892){FHIRServer.exe} [0000000003FAC892] JclDebug._ZN8Jcldebug17TJclStackInfoListC3EbiPvbS1_ + $82
(0000000003BAD740){FHIRServer.exe} [0000000003FAE740] JclDebug._ZN8Jcldebug21GetExceptionStackInfoEPN6System16TExceptionRecordE + $160
(0000000000049307){FHIRServer.exe} [000000000044A307] System.SysUtils._ZN6System8Sysutils9Exception16RaisingExceptionEPNS_16TExceptionRecordE + $27
(0000000000049C0B){FHIRServer.exe} [000000000044AC0B] System.SysUtils._ZN6System8Sysutils17RaiseExceptObjectEPNS_16TExceptionRecordE + $2B
(0000000000011566){FHIRServer.exe} [0000000000412566] System._ZN6System14_RaiseAtExceptEPNS_7TObjectEPv + $E6
(00000000000115B1){FHIRServer.exe} [00000000004125B1] System._ZN6System12_RaiseExceptEPNS_7TObjectE + $11
(0000000003BB4241){FHIRServer.exe} [0000000003FB5241] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService17UnInstallDatabaseEN6System13UnicodeStringE + $1C1
(0000000003BAEF4D){FHIRServer.exe} [0000000003FAFF4D] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel17ExecuteFhirServerEv + $67D
Jose Costa Teixeira (Sep 06 2019 at 05:07):
server does not compile since yesterday's update. Is it me?
Grahame Grieve (Sep 06 2019 at 05:09):
hmm why not?
Grahame Grieve (Sep 06 2019 at 05:09):
should do know - I just did a full release
Jose Costa Teixeira (Sep 06 2019 at 05:09):
ok let me restart ide and rebuild
Jose Costa Teixeira (Sep 06 2019 at 05:11):
ok it's linking
Jose Costa Teixeira (Sep 06 2019 at 05:12):
false alarm, sorry
Grahame Grieve (Sep 06 2019 at 05:12):
np. I think I missed something yesterday
Grahame Grieve (Sep 06 2019 at 05:13):
I found a bug where the DB connection class was allowing re-use with out proper clean up, so I've added an assertion that this doesn't happen anymore, and also that proper clean up does happen. Let me know if it fires anywhere
Jose Costa Teixeira (Sep 06 2019 at 05:14):
ok so my command line is this
-cmd remount -debug -ini "C:\HL7\fhir4Server\fhirserver.ini" -password DBroot123 -endpoint open
Jose Costa Teixeira (Sep 06 2019 at 05:14):
and it breaks with this:
Jose Costa Teixeira (Sep 06 2019 at 05:14):
07:13:35 00:00:00 Connect to dbr4 (mysql://jctasus.local/fhirDB)
07:13:35 00:00:00 mount endpoint dbr4
07:13:36 00:00:00 EODBC: [Microsoft][ODBC Driver Manager] Function sequence error
(0000000000C47864){FHIRServer.exe} [0000000001048864] FHIR.Database.ODBC.Objects._ZN4Fhir8Database4Odbc7Objects17TODBCErrorHandler10RaiseErrorEPNS2_11TODBCObjectEs (Line 2990, "FHIR.Database.ODBC.Objects.pas" + 18) + $0
(0000000004226A52){FHIRServer.exe} [0000000004627A52] JclDebug._ZN8Jcldebug17TJclStackInfoListC3EbiPvbS1_ (Line 5377, "JclDebug.pas" + 2) + $0
(00000000042289F3){FHIRServer.exe} [00000000046299F3] JclDebug._ZN8Jcldebug21GetExceptionStackInfoEPN6System16TExceptionRecordE (Line 7219, "JclDebug.pas" + 39) + $3B
(00000000000497D7){FHIRServer.exe} [000000000044A7D7] System.SysUtils._ZN6System8Sysutils9Exception16RaisingExceptionEPNS_16TExceptionRecordE + $27
(000000000004A0DB){FHIRServer.exe} [000000000044B0DB] System.SysUtils._ZN6System8Sysutils17RaiseExceptObjectEPNS_16TExceptionRecordE + $2B
(0000000000011566){FHIRServer.exe} [0000000000412566] System._ZN6System14_RaiseAtExceptEPNS_7TObjectEPv + $E6
(00000000000115B1){FHIRServer.exe} [00000000004125B1] System._ZN6System12_RaiseExceptEPNS_7TObjectE + $11
(0000000000C47864){FHIRServer.exe} [0000000001048864] FHIR.Database.ODBC.Objects._ZN4Fhir8Database4Odbc7Objects17TODBCErrorHandler10RaiseErrorEPNS2_11TODBCObjectEs (Line 2990, "FHIR.Database.ODBC.Objects.pas" + 18) + $0
(0000000000C47CE3){FHIRServer.exe} [0000000001048CE3] FHIR.Database.ODBC.Objects._ZN4Fhir8Database4Odbc7Objects8TOdbcEnv15TerminateHandleEv (Line 3102, "FHIR.Database.ODBC.Objects.pas" + 8) + $0
(0000000000C47A37){FHIRServer.exe} [0000000001048A37] FHIR.Database.ODBC.Objects._ZN4Fhir8Database4Odbc7Objects8TOdbcEnvD0Ev (Line 3036, "FHIR.Database.ODBC.Objects.pas" + 6) + $0
(000000000000F078){FHIRServer.exe} [0000000000410078] System._ZN6System7TObject4FreeEv + $18
(0000000000C643EE){FHIRServer.exe} [00000000010653EE] FHIR.Database.ODBC._ZN4Fhir8Database4Odbc15TKDBOdbcManagerD0Ev (Line 880, "FHIR.Database.ODBC.pas" + 4) + $0
(00000000002871A9){FHIRServer.exe} [00000000006881A9] FHIR.Support.Base._ZN4Fhir7Support4Base10TFslObject4FreeEv (Line 765, "FHIR.Support.Base.pas" + 8) + $10
(000000000422F814){FHIRServer.exe} [0000000004630814] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService15InstallDatabaseEN6System13UnicodeStringENS0_11Dbinstaller26TFHIRInstallerSecurityModeE (Line 981, "FHIR.Server.Kernel.pas" + 84) + $14
(0000000000010FF9){FHIRServer.exe} [0000000000411FF9] System._ZN6System23_DelphiExceptionHandlerEPNS_16TExceptionRecordEyPvS2_ + $589
(00000000000A37FF){ntdll.dll } [00007FFC294747FF] Unknown function at __chkstk + $19F
(000000000000500C){ntdll.dll } [00007FFC293D600C] RtlUnwindEx + $51C
(0000000000010E59){FHIRServer.exe} [0000000000411E59] System._ZN6System23_DelphiExceptionHandlerEPNS_16TExceptionRecordEyPvS2_ + $3E9
(00000000000A377F){ntdll.dll } [00007FFC2947477F] Unknown function at __chkstk + $11F
(0000000000003BEF){ntdll.dll } [00007FFC293D4BEF] Unknown function at RtlWalkFrameChain + $14BF
(00000000000A24EE){ntdll.dll } [00007FFC294734EE] KiUserExceptionDispatcher + $2E
(0000000000038129){KERNELBASE.dll} [00007FFC26219129] RaiseException + $69
(00000000042181DB){FHIRServer.exe} [00000000046191DB] JclHookExcept._ZN13Jclhookexcept20HookedRaiseExceptionEjjjPNS_19TExceptionArgumentsE (Line 380, "JclHookExcept.pas" + 14) + $0
(0000000000011586){FHIRServer.exe} [0000000000412586] System._ZN6System14_RaiseAtExceptEPNS_7TObjectEPv + $106
(00000000000115F8){FHIRServer.exe} [00000000004125F8] System._ZN6System11_RaiseAgainEv + $38
(000000000079D6AE){FHIRServer.exe} [0000000000B9E6AE] FHIR.Database.Manager._ZN4Fhir8Database7Manager11TKDBManager13GetConnectionEN6System13UnicodeStringE (Line 1390, "FHIR.Database.Manager.pas" + 23) + $5
(000000000422F5C0){FHIRServer.exe} [00000000046305C0] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService15InstallDatabaseEN6System13UnicodeStringENS0_11Dbinstaller26TFHIRInstallerSecurityModeE (Line 953, "FHIR.Server.Kernel.pas" + 56) + $13
(000000000422A293){FHIRServer.exe} [000000000462B293] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel17ExecuteFhirServerEv (Line 249, "FHIR.Server.Kernel.pas" + 75) + $0
(0000000004235CD0){FHIRServer.exe} [0000000004636CD0] FHIRServer._ZN10Fhirserver14initializationEv (Line 400, "FHIRServer.dpr" + 11) + $5
(0000000000016974){KERNEL32.DLL} [00007FFC28F27974] BaseThreadInitThunk + $14
(0000000000069271){ntdll.dll } [00007FFC2943A271] RtlUserThreadStart + $21
EODBC: [Microsoft][ODBC Driver Manager] Function sequence error
Jose Costa Teixeira (Sep 06 2019 at 05:15):
i think it is something in odbc but the ODBC manager says connection is ok. any idea what to try next?
Grahame Grieve (Sep 06 2019 at 05:18):
well, the stack is trash - probably not a debug build? can you run that under the debugger and paste the stack here?
Grahame Grieve (Sep 06 2019 at 05:19):
function sequence error means trying to access a result set when there isn't one available or similar
Jose Costa Teixeira (Sep 06 2019 at 05:20):
? this is what I am doing
Jose Costa Teixeira (Sep 06 2019 at 05:20):
Jose Costa Teixeira (Sep 06 2019 at 05:21):
then i do Run (F9)
Jose Costa Teixeira (Sep 06 2019 at 05:21):
let me see where it breaks
Jose Costa Teixeira (Sep 06 2019 at 05:29):
fails here:
FHIRServer.Kernel function TFHIRService.InstallDatabase
...
try
conn := db.GetConnection('setup');
Jose Costa Teixeira (Sep 06 2019 at 05:30):
then in
function TKDBManager.GetConnection(const AUsage: String): TKDBConnection;
Jose Costa Teixeira (Sep 06 2019 at 05:30):
try result := ConnectionFactory;
Jose Costa Teixeira (Sep 06 2019 at 05:30):
but ConnectionFactory is nil
Grahame Grieve (Sep 06 2019 at 05:32):
what's the stack at that point?
Jose Costa Teixeira (Sep 06 2019 at 05:34):
FHIR.Database.Manager.TKDBManager.GetConnection('setup')
FHIR.Server.Kernel.TFHIRService.InstallDatabase('open',ismUnstated)
FHIR.Server.Kernel.ExecuteFhirServer
FHIRServer.FHIRServer
Grahame Grieve (Sep 06 2019 at 05:39):
line 953 in FHIR.Server.Kernel ?
Jose Costa Teixeira (Sep 06 2019 at 05:39):
yes
Grahame Grieve (Sep 06 2019 at 05:39):
what does the fhirserver.ini say?
Grahame Grieve (Sep 06 2019 at 05:39):
for database?
Grahame Grieve (Sep 06 2019 at 05:41):
nut connectionFactory can't be nil - it's an abstract method. ...
Jose Costa Teixeira (Sep 06 2019 at 05:42):
[database]
type=mysql
server=jctasus.local
database=fhirDB
username=sa
password=pass
driver=MySQL ODBC 8.0 Unicode Driver
[databases]
dbr4= server: jctasus.local; database: fhirDB; username: sa; password: DBroot123; type: mysql; driver: "MySQL ODBC 8.0 Unicode Driver"; when-testing: true
Jose Costa Teixeira (Sep 06 2019 at 05:42):
let me see if using another ODBC connector works
Jose Costa Teixeira (Sep 06 2019 at 05:44):
well, that's embarrassing..
Jose Costa Teixeira (Sep 06 2019 at 05:44):
it seemed to work
Jose Costa Teixeira (Sep 06 2019 at 05:45):
what is the command line to run the server?
-cmd run?
Grahame Grieve (Sep 06 2019 at 05:45):
-cmd exec I think
Jose Costa Teixeira (Sep 06 2019 at 05:46):
it's good, i think
only complains at
Unable to load package hl7.fhir.core v 4.0.0 as it doesn't exist
Jose Costa Teixeira (Sep 06 2019 at 05:47):
what is easiest way to get this package? toolkit?
Grahame Grieve (Sep 06 2019 at 05:47):
you can install it if you run the server cmd -manager
Grahame Grieve (Sep 06 2019 at 05:47):
the packages..find packages
Jose Costa Teixeira (Sep 06 2019 at 05:51):
neat, did not know that this had a manager gui.
Jose Costa Teixeira (Sep 06 2019 at 05:53):
07:52:11 00:00:09 .. Load Package hl7.fhir.org#4.0.0
07:52:14 00:00:12 EDefinitionException: Unknown base profile: "http://hl7.org/fhir/StructureDefinition/Composition"
Jose Costa Teixeira (Sep 06 2019 at 05:53):
why is this? shold i do a remount after i install the package?
Jose Costa Teixeira (Sep 06 2019 at 05:58):
i did remount, still same issue
Grahame Grieve (Sep 06 2019 at 05:59):
don't know. that's odd
Grahame Grieve (Sep 06 2019 at 05:59):
what's the stack when it raises that?
Jose Costa Teixeira (Sep 06 2019 at 06:00):
(0000000002AB9480){FHIRServer.exe} [0000000002EBA480] FHIR.R4.Profiles._ZN4Fhir2R48Profiles20TBaseWorkerContextR411SeeResourceEPNS0_9Resources13TFhirResourceE (Line 1858, "FHIR.R4.Profiles.pas" + 9) + $0
(0000000004226A52){FHIRServer.exe} [0000000004627A52] JclDebug._ZN8Jcldebug17TJclStackInfoListC3EbiPvbS1_ (Line 5377, "JclDebug.pas" + 2) + $0
(00000000042289F3){FHIRServer.exe} [00000000046299F3] JclDebug._ZN8Jcldebug21GetExceptionStackInfoEPN6System16TExceptionRecordE (Line 7219, "JclDebug.pas" + 39) + $3B
(00000000000497D7){FHIRServer.exe} [000000000044A7D7] System.SysUtils._ZN6System8Sysutils9Exception16RaisingExceptionEPNS_16TExceptionRecordE + $27
(000000000004A0DB){FHIRServer.exe} [000000000044B0DB] System.SysUtils._ZN6System8Sysutils17RaiseExceptObjectEPNS_16TExceptionRecordE + $2B
(0000000000011566){FHIRServer.exe} [0000000000412566] System._ZN6System14_RaiseAtExceptEPNS_7TObjectEPv + $E6
(00000000000115B1){FHIRServer.exe} [00000000004125B1] System._ZN6System12_RaiseExceptEPNS_7TObjectE + $11
(0000000002AB9480){FHIRServer.exe} [0000000002EBA480] FHIR.R4.Profiles._ZN4Fhir2R48Profiles20TBaseWorkerContextR411SeeResourceEPNS0_9Resources13TFhirResourceE (Line 1858, "FHIR.R4.Profiles.pas" + 9) + $0
(0000000003C51BEC){FHIRServer.exe} [0000000004052BEC] FHIR.Server.ValidatorR4._ZN4Fhir6Server11Validatorr426TFHIRServerWorkerContextR411SeeResourceEPNS_2R49Resources13TFhirResourceE (Line 211, "FHIR.Server.ValidatorR4.pas" + 29) + $13
(0000000002AB92A5){FHIRServer.exe} [0000000002EBA2A5] FHIR.R4.Profiles._ZN4Fhir2R48Profiles20TBaseWorkerContextR411seeResourceEPNS_4Base7Objects14TFHIRResourceVE (Line 1827, "FHIR.R4.Profiles.pas" + 2) + $0
(000000000052BE02){FHIRServer.exe} [000000000092CE02] FHIR.Base.Factory._ZN4Fhir4Base7Factory29TFHIRWorkerContextWithFactory16loadResourceJsonEN6System13UnicodeStringES4_PNS3_7Classes7TStreamE (Line 404, "FHIR.Base.Factory.pas" + 7) + $0
(00000000005F8E62){FHIRServer.exe} [00000000009F9E62] FHIR.Cache.PackageManager._ZN4Fhir5Cache14Packagemanager19TFHIRPackageManager11loadPackageEN6System13UnicodeStringES4_PNS_7Support4Base13TFslStringSetEU9__closurePFvS4_S4_PNS3_7Classes7TStreamEEU9__closurePFvPNS3_7TObjectEibS4_E (Line 726, "FHIR.Cache.PackageManager.pas" + 20) + $0
(0000000003A262E1){FHIRServer.exe} [0000000003E272E1] FHIR.Server.Database._ZN4Fhir6Server8Database25TFHIRNativeStorageService10InitialiseEv (Line 5471, "FHIR.Server.Database.pas" + 139) + $0
(000000000422EAD0){FHIRServer.exe} [000000000462FAD0] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService20InitialiseRestServerENS_4Base7Objects12TFHIRVersionE (Line 871, "FHIR.Server.Kernel.pas" + 51) + $0
(000000000422B7DA){FHIRServer.exe} [000000000462C7DA] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel12TFHIRService8CanStartEv (Line 453, "FHIR.Server.Kernel.pas" + 14) + $0
(00000000039C0C51){FHIRServer.exe} [0000000003DC1C51] FHIR.Support.Service._ZN4Fhir7Support7Service14TSystemService15InternalExecuteEv (Line 381, "FHIR.Support.Service.pas" + 3) + $14
(00000000039C0920){FHIRServer.exe} [0000000003DC1920] FHIR.Support.Service._ZN4Fhir7Support7Service14TSystemService14ConsoleExecuteEv (Line 312, "FHIR.Support.Service.pas" + 8) + $0
(000000000422A500){FHIRServer.exe} [000000000462B500] FHIR.Server.Kernel._ZN4Fhir6Server6Kernel17ExecuteFhirServerEv (Line 288, "FHIR.Server.Kernel.pas" + 114) + $C
(0000000004235CD0){FHIRServer.exe} [0000000004636CD0] FHIRServer._ZN10Fhirserver14initializationEv (Line 400, "FHIRServer.dpr" + 11) + $5
(0000000000016974){KERNEL32.DLL} [00007FFC28F27974] BaseThreadInitThunk + $14
(0000000000069271){ntdll.dll } [00007FFC2943A271] RtlUserThreadStart + $21
Grahame Grieve (Sep 06 2019 at 06:11):
oh
Grahame Grieve (Sep 06 2019 at 06:50):
alright, try that change
Jose Costa Teixeira (Sep 06 2019 at 07:07):
works
Jose Costa Teixeira (Sep 06 2019 at 07:07):
now only one issue, i guess it is on me:
Jose Costa Teixeira (Sep 06 2019 at 07:08):
which of these should I keep?
; fhir ini file, and documentation [database] type=mysql server=jctasus.local database=fhirDB username=sa password=passs driver=MySQL ODBC 5.3 Unicode Driver [databases] dbr4= server: jctasus.local; database: fhirDB; username: sa; password: pass; type: mysql; driver: "MySQL ODBC 5.3 Unicode Driver"; when-testing: true
Grahame Grieve (Sep 06 2019 at 07:09):
[databases]
Jose Costa Teixeira (Sep 06 2019 at 07:19):
now remount is failing.
I just deleted the DB, will start a clean one
Grahame Grieve (Sep 06 2019 at 07:20):
how is it failing?
Jose Costa Teixeira (Sep 06 2019 at 07:34):
"unknown version"
Jose Costa Teixeira (Sep 06 2019 at 07:35):
[databases] dbr4= server: jctasus.local; database: fhirDB; username: sa; password: DBroot123; type: mysql; driver: "MySQL ODBC 5.3 Unicode Driver"; when-testing: true [endpoints] r4= path: /r4; validate: true; database: dbr4; version: r4 ;open= path: /r4; validate: true; database: dbr4; version: r4
before I had 2 endpoints on the same place which i guess messed up my db. but the server was working
Jose Costa Teixeira (Sep 06 2019 at 07:36):
now I want to remount this and I get that error
Grahame Grieve (Sep 06 2019 at 07:36):
where is that error?
Jose Costa Teixeira (Sep 06 2019 at 07:36):
uninstallDatabase
Jose Costa Teixeira (Sep 06 2019 at 07:37):
oh wait but the database is empty - just emptied it
Jose Costa Teixeira (Sep 06 2019 at 07:37):
i will try with a mount only
Jose Costa Teixeira (Sep 06 2019 at 07:39):
also fails
Jose Costa Teixeira (Sep 06 2019 at 07:45):
details := FIni.endpoints[name]; ... else if details['version'] = 'r4' then v := fhirVersionRelease4 else raise EFslException.Create('unknown version '+details['version']);
Jose Costa Teixeira (Sep 06 2019 at 07:46):
at this point, details['version'] is ''
Jose Costa Teixeira (Sep 06 2019 at 07:46):
my ini says
[endpoints]
r4= path: /r4; validate: true; database: dbr4; version: r4
Jose Costa Teixeira (Sep 06 2019 at 08:02):
ok, got it. I was using r4 as endpoint, but in the command line i was saying -endpoint open.
Sorry, my bad.
Jose Costa Teixeira (Sep 06 2019 at 09:24):
Jose Costa Teixeira (Sep 06 2019 at 09:25):
this is my out-of-the-box capstatement. Does this mean I cannot post anything? (because I tried and it failed). How to fix this?
Grahame Grieve (Sep 06 2019 at 11:57):
well, it's in the types table. I don't know why the install did read only
Last updated: Apr 12 2022 at 19:14 UTC