Skip to content

Instantly share code, notes, and snippets.

@dkounal
Created October 26, 2022 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkounal/63adc5a6f3c30107688b0c01c26c29a9 to your computer and use it in GitHub Desktop.
Save dkounal/63adc5a6f3c30107688b0c01c26c29a9 to your computer and use it in GitHub Desktop.
C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src>Project05HttpDaemon /install
20221026 07522436 ! info SetThreadName 5710=Main
20221026 07522437 ! info Daemon exe run /install
20221026 07522437 ! info mormot.core.os.TServiceController(027d084e56b0) CreateService('Project05HttpDaemon','Project05HttpDaemon','C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe')
20221026 07522437 ! trace mormot.core.os.TServiceController(027d084e56b0) GetState(Project05HttpDaemon)=Stopped
20221026 07522437 ! debug mormot.core.os.TServiceController(027d084e56b0) Install(Project05HttpDaemon)=Stopped
Project05HttpDaemon
---------------------
Successfully executed [/install] (Install) on Service 'Project05HttpDaemon'
20221026 07522437 ! info Daemon exe leave
C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src>net start Project05HttpDaemon
The Project05HttpDaemon service is starting........
The Project05HttpDaemon service could not be started.
More help is available by typing NET HELPMSG 3523.
C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src>Project05HttpDaemon /uninstall
20221026 07531720 ! info SetThreadName 3300=Main
20221026 07531720 ! info Daemon exe run /uninstall
Project05HttpDaemon
---------------------
Successfully executed [/uninstall] (Uninstall) on Service 'Project05HttpDaemon'
20221026 07531721 ! info Daemon exe leave
C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src>Project05HttpDaemon
20221026 07532302 ! info SetThreadName 4e88=Main
20221026 07532302 ! info Daemon exe run
20221026 07532302 ! debug mormot.core.os.TServiceSingle(023f5ff2b7f0) Create: Project05HttpDaemon (Project05HttpDaemon) running as [C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe 0.0.0.0 (2022-10-26 10:38:25)]
20221026 07532302 ! EXCOS EExternalException (05) [Main] at 7fff70e6fb0c
Project05HttpDaemon
---------------------
Try with one of the switches:
Project05HttpDaemon /console -c /verbose /help -h /version
/install /uninstall /start /stop /state
20221026 07532302 ! info Daemon exe leave
C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src>Project05HttpDaemon
20221026 07533251 ! info SetThreadName 5548=Main
20221026 07533251 ! info Daemon exe run
20221026 07533251 ! debug mormot.core.os.TServiceSingle(02bbf410b7f0) Create: Project05HttpDaemon (Project05HttpDaemon) running as [C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe 0.0.0.0 (2022-10-26 10:38:25)]
20221026 07533251 ! EXCOS EExternalException (05) [Main] at 7fff70e6fb0c
Project05HttpDaemon
---------------------
Try with one of the switches:
Project05HttpDaemon /console -c /verbose /help -h /version
/install /uninstall /start /stop /state
20221026 07533251 ! info Daemon exe leave
@dkounal
Copy link
Author

dkounal commented Oct 26, 2022

20221026 07522436 ! info SetThreadName 5710=Main
20221026 07522437 ! info Daemon exe run /install
20221026 07522437 ! info mormot.core.os.TServiceController(027d084e56b0) CreateService('Project05HttpDaemon','Project05HttpDaemon','C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe')
20221026 07522437 ! trace mormot.core.os.TServiceController(027d084e56b0) GetState(Project05HttpDaemon)=Stopped
20221026 07522437 ! debug mormot.core.os.TServiceController(027d084e56b0) Install(Project05HttpDaemon)=Stopped
20221026 07522437 ! info Daemon exe leave

@dkounal
Copy link
Author

dkounal commented Oct 26, 2022

20221026 07524524 ! info SetThreadName 5488=Main
20221026 07524524 ! info Daemon exe run
20221026 07524524 ! debug mormot.core.os.TServiceSingle(02ee3d43b7f0) Create: Project05HttpDaemon (Project05HttpDaemon) running as [C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe 0.0.0.0 (2022-10-26 10:38:25)]
20221026 07524524 " info SetThreadName 50ec=ServiceProc
20221026 07524524 " trace mormot.core.os.TServiceSingle(02ee3d43b7f0) ServiceProc: ArgCount=1 ServiceSingle={"TServiceSingle(02ee3d43b7f0)":{ServiceName:"Project05HttpDaemon",DisplayName:"Project05HttpDaemon",ServiceType:272,StartType:2}}
20221026 07524524 " trace mormot.core.os.TServiceSingle(02ee3d43b7f0) Project05HttpDaemon ReportStatus(0,0)=Starting
20221026 07524524 " EXCOS EAccessViolation (c0000005) [ServiceProc] at 7fff73074fe4
20221026 07524524 " EXCOS EExternalException (06) [ServiceProc] at 7fff70e6fb0c
20221026 07524524 " OSERR mormot.core.os.TServiceSingle(02ee3d43b7f0) Project05HttpDaemon ReportStatus(0,0)=Starting SetServiceStatus() failed "Ο δείκτης χειρισμού δεν είναι έγκυρος" (6)
20221026 07524524 " + Project05HttpDaemon.TSampleDaemon(02ee3d4644a0).
20221026 07524524 " + mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0).DBOpen Project05HttpDaemon.db
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 179us Project05HttpDaemon.db PRAGMA page_size=4096 = true
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 300us Project05HttpDaemon.db PRAGMA cache_size=10000 = true
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 69us Project05HttpDaemon.db select count(*) from sqlite_master = true
20221026 07524524 " DB mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) "C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.db" database file (12 KB) opened with PageSize=4096 CacheSize=10000 (39 MB)
20221026 07524524 " - 00.001.547
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 3us Project05HttpDaemon.db PRAGMA synchronous=0 = true
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 4us Project05HttpDaemon.db PRAGMA locking_mode=EXCLUSIVE; = true
20221026 07524524 " SQL mormot.db.raw.sqlite3.TSqlDatabase(02ee3d42cfa0) 89us Project05HttpDaemon.db returned 1 rows SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%';
20221026 07524524 " DB mormot.orm.sqlite3.TRestOrmServerDB(02ee3d3b3d50) CreateMissingTables on {"TSqlDatabase(02ee3d42cfa0)":{FileName:"C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.db",UseCache:true,UseCacheSize:16777216,CacheSize:10000,PageSize:4096,PageCount:3,FileSize:12288,WALMode:false,Synchronous:"smOff",LockingMode:"lmExclusive",OpenV2Flags:6,BackupBackgroundInProcess:false,SQLite3Library:{"TSqlite3LibraryStatic(02ee3d388130)":{Version:"TSqlite3LibraryStatic 3.39.4 with internal MM"}}}}
20221026 07524524 " DB mormot.orm.sqlite3.TRestOrmServerDB(02ee3d3b3d50) GetTables=["Sample"]
20221026 07524524 " + mormot.rest.http.server.TRestHttpServer(02ee3da58d40).Create useHttpApiRegisteringURI (secNone) on port 11111
20221026 07524524 " http mormot.rest.http.server.TRestHttpServer(02ee3da58d40) http.sys registration of http://+:11111/root
20221026 07524524 # info SetThreadName 5acc=HttpSrv 11111root THttpApiSrv
20221026 07524524 # trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=5acc 'HttpSrv 11111root THttpApiSrv' ThreadCount=1
20221026 07524524 $ info SetThreadName 2af8=HttpSrv 11111root THttpApiSrv
20221026 07524524 $ trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=2af8 'HttpSrv 11111root THttpApiSrv' ThreadCount=2
20221026 07524524 % info SetThreadName 34d4=HttpSrv 11111root THttpApiSrv
20221026 07524524 % trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=34d4 'HttpSrv 11111root THttpApiSrv' ThreadCount=3
20221026 07524524 & info SetThreadName 332c=HttpSrv 11111root THttpApiSrv
20221026 07524524 & trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=332c 'HttpSrv 11111root THttpApiSrv' ThreadCount=4
20221026 07524524 ' info SetThreadName 4508=HttpSrv 11111root THttpApiSrv
20221026 07524524 ' trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=4508 'HttpSrv 11111root THttpApiSrv' ThreadCount=5
20221026 07524524 ( info SetThreadName 177c=HttpSrv 11111root THttpApiSrv
20221026 07524524 ( trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=177c 'HttpSrv 11111root THttpApiSrv' ThreadCount=6
20221026 07524524 ) info SetThreadName 17b0=HttpSrv 11111root THttpApiSrv
20221026 07524524 ) trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=17b0 'HttpSrv 11111root THttpApiSrv' ThreadCount=7
20221026 07524524 * info SetThreadName 21b8=HttpSrv 11111root THttpApiSrv
20221026 07524524 * trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=21b8 'HttpSrv 11111root THttpApiSrv' ThreadCount=8
20221026 07524524 + info SetThreadName 26d4=HttpSrv 11111root THttpApiSrv
20221026 07524524 + trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=26d4 'HttpSrv 11111root THttpApiSrv' ThreadCount=9
20221026 07524524 , info SetThreadName 0924=HttpSrv 11111root THttpApiSrv
20221026 07524524 , trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=0924 'HttpSrv 11111root THttpApiSrv' ThreadCount=10
20221026 07524524 - info SetThreadName 3b60=HttpSrv 11111root THttpApiSrv
20221026 07524524 - trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=3b60 'HttpSrv 11111root THttpApiSrv' ThreadCount=11
20221026 07524524 . info SetThreadName 5b80=HttpSrv 11111root THttpApiSrv
20221026 07524524 . trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=5b80 'HttpSrv 11111root THttpApiSrv' ThreadCount=12
20221026 07524524 / info SetThreadName 48b0=HttpSrv 11111root THttpApiSrv
20221026 07524524 / trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=48b0 'HttpSrv 11111root THttpApiSrv' ThreadCount=13
20221026 07524524 0 info SetThreadName 17b4=HttpSrv 11111root THttpApiSrv
20221026 07524524 0 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=17b4 'HttpSrv 11111root THttpApiSrv' ThreadCount=14
20221026 07524524 1 info SetThreadName 3140=HttpSrv 11111root THttpApiSrv
20221026 07524524 1 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=3140 'HttpSrv 11111root THttpApiSrv' ThreadCount=15
20221026 07524524 2 info SetThreadName 4744=HttpSrv 11111root THttpApiSrv
20221026 07524524 2 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=4744 'HttpSrv 11111root THttpApiSrv' ThreadCount=16
20221026 07524524 3 info SetThreadName 5920=HttpSrv 11111root THttpApiSrv
20221026 07524524 4 info SetThreadName 4d4c=HttpSrv 11111root THttpApiSrv
20221026 07524524 3 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=5920 'HttpSrv 11111root THttpApiSrv' ThreadCount=17
20221026 07524524 4 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=4d4c 'HttpSrv 11111root THttpApiSrv' ThreadCount=18
20221026 07524524 5 info SetThreadName 0c98=HttpSrv 11111root THttpApiSrv
20221026 07524524 5 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=0c98 'HttpSrv 11111root THttpApiSrv' ThreadCount=19
20221026 07524524 6 info SetThreadName 4ff4=HttpSrv 11111root THttpApiSrv
20221026 07524524 6 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=4ff4 'HttpSrv 11111root THttpApiSrv' ThreadCount=20
20221026 07524524 7 info SetThreadName 1ab8=HttpSrv 11111root THttpApiSrv
20221026 07524524 7 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=1ab8 'HttpSrv 11111root THttpApiSrv' ThreadCount=21
20221026 07524524 8 info SetThreadName 1858=HttpSrv 11111root THttpApiSrv
20221026 07524524 8 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=1858 'HttpSrv 11111root THttpApiSrv' ThreadCount=22
20221026 07524524 9 info SetThreadName 26b0=HttpSrv 11111root THttpApiSrv
20221026 07524524 9 trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=26b0 'HttpSrv 11111root THttpApiSrv' ThreadCount=23
20221026 07524524 : info SetThreadName 32a0=HttpSrv 11111root THttpApiSrv
20221026 07524524 ; info SetThreadName 3248=HttpSrv 11111root THttpApiSrv
20221026 07524524 ; trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=3248 'HttpSrv 11111root THttpApiSrv' ThreadCount=24
20221026 07524524 : trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=32a0 'HttpSrv 11111root THttpApiSrv' ThreadCount=25
20221026 07524524 < info SetThreadName 06f4=HttpSrv 11111root THttpApiSrv
20221026 07524524 < trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=06f4 'HttpSrv 11111root THttpApiSrv' ThreadCount=26
20221026 07524524 = info SetThreadName 0348=HttpSrv 11111root THttpApiSrv
20221026 07524524 > info SetThreadName 4bec=HttpSrv 11111root THttpApiSrv
20221026 07524524 = trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=0348 'HttpSrv 11111root THttpApiSrv' ThreadCount=27
20221026 07524524 > trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=4bec 'HttpSrv 11111root THttpApiSrv' ThreadCount=28
20221026 07524524 ? info SetThreadName 119c=HttpSrv 11111root THttpApiSrv
20221026 07524524 ? trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=119c 'HttpSrv 11111root THttpApiSrv' ThreadCount=29
20221026 07524524 @ info SetThreadName 46a4=HttpSrv 11111root THttpApiSrv
20221026 07524524 @ trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=46a4 'HttpSrv 11111root THttpApiSrv' ThreadCount=30
20221026 07524524 " http mormot.rest.http.server.TRestHttpServer(02ee3da58d40) {"THttpApiServer(02ee3d3c2800)":{ApiVersion:"HTTP API 2.0",ServerName:"mORMot2 (Win)",ProcessName:"root",Cloned:false,RegisteredUrl:"http://+:11111/root/",MaxBandwidth:4294967295,MaxConnections:4294967295}} initialized for root
20221026 07524524 " - 00.002.149
20221026 07524524 " info HttpServer started at Port: 11111
20221026 07524524 " - 00.004.238
20221026 07524524 " trace mormot.core.os.TServiceSingle(02ee3d43b7f0) Project05HttpDaemon ReportStatus(0,0)=Running
20221026 07524524 A info SetThreadName 1e98=HttpSrv 11111root THttpApiSrv
20221026 07524524 " EXCOS EAccessViolation (c0000005) [ServiceProc] at 7fff73074fe4
20221026 07524524 A trace server.TSampleServer(02ee3daa6ac0) BeginCurrentThread(THttpApiServer) root=root ThreadID=1e98 'HttpSrv 11111root THttpApiSrv' ThreadCount=31
20221026 07524524 " EXCOS EExternalException (06) [ServiceProc] at 7fff70e6fb0c

@dkounal
Copy link
Author

dkounal commented Oct 26, 2022

20221026 07531720 ! info SetThreadName 3300=Main
20221026 07531720 ! info Daemon exe run /uninstall
20221026 07531721 ! info Daemon exe leave

@dkounal
Copy link
Author

dkounal commented Oct 26, 2022

20221026 07532302 ! info SetThreadName 4e88=Main
20221026 07532302 ! info Daemon exe run
20221026 07532302 ! debug mormot.core.os.TServiceSingle(023f5ff2b7f0) Create: Project05HttpDaemon (Project05HttpDaemon) running as [C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe 0.0.0.0 (2022-10-26 10:38:25)]
20221026 07532302 ! EXCOS EExternalException (05) [Main] at 7fff70e6fb0c
20221026 07532302 ! info Daemon exe leave

@dkounal
Copy link
Author

dkounal commented Oct 26, 2022

20221026 07533251 ! info SetThreadName 5548=Main
20221026 07533251 ! info Daemon exe run
20221026 07533251 ! debug mormot.core.os.TServiceSingle(02bbf410b7f0) Create: Project05HttpDaemon (Project05HttpDaemon) running as [C:\delphi\Github\mORMot2\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src\Project05HttpDaemon.exe 0.0.0.0 (2022-10-26 10:38:25)]
20221026 07533251 ! EXCOS EExternalException (05) [Main] at 7fff70e6fb0c
20221026 07533251 ! info Daemon exe leave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment