Hi Pat, I have managed to find a solution to the 4D Service.
Recap of the problem : When the data files are sitting on a repository different from the 4D Server and structure files, running the database application as a Windows service will fail. The Windows log event will indicate an error with Event ID 9 - Can’t open database. I surmised that the issue resulted from the Windows service not being able to locate the data file when started. How it was solved … Map the network drive that contains the 4D data files (so that it’s always available when the 4D Server is rebooted. Define the 4D service and specify the log-on user using the same administrator account as per the log-in administrator account for the 4D Server. Start up 4D Server as a direct app and point the to the data file on the network drive. Register the 4D Service. Most critically, the path on the 4D Service has to be modified. On definition, the path only points to the 4D Server app on C drive and the the 4D structure files, not the data files. So I ran RegEdit to edit the registry and change the path to the Windows Service to the 4D Link link created in step 3. The path on the Windows Service would be as follows : C:\Program Files\4D\4D v17.2\4D Server\4D Server.exe -s "C:\Users\UserName\AppData\Roaming\4D Server\Favorites v17\Local\ApplicationDbv17.4Dlink” With this, the service ran happily (ever after?) Regards, Ronnie > On 16 Oct 2019, at 5:00 PM, Pat Bensky <pben...@gmail.com> wrote: > > I wonder if, when it's running as a service, the network drive doesn't get > mounted fast enough when the 4D server is rebooted, so it can't find the data > file? > > Can the network drive be permanently mounted? > > PB > > On Wed, 16 Oct 2019 at 09:50, Tarawerkz <ron...@tarawerkz.com > <mailto:ron...@tarawerkz.com>> wrote: > Hi Pat, > > On the 1st initial login, we have to select it to tell 4D Server where the > data file is. > The data file sits in a repository which has been mapped as a network drive > to automatically mount when the 4D Server is rebooted. > > On subsequent login attempts, 4D Server opens the data file automatically. > > Regards, > Ronnie > Tarawerkz > > > > >> On 16 Oct 2019, at 4:33 PM, Pat Bensky <pben...@gmail.com >> <mailto:pben...@gmail.com>> wrote: >> >> If you start the 4D server manually, does it automatically find the correct >> data file (on another repository) or do you have to select it? >> >> On Wed, 16 Oct 2019 at 09:25, Tarawerkz <ron...@tarawerkz.com >> <mailto:ron...@tarawerkz.com>> wrote: >> Hi Pat, >> >> I’m already using the Log On as account feature (under the Log In tab). >> >> Actually, I’ve tested the service with the structure and data files residing >> in the same directory (as per usual default implementation) and that WORKS ! >> >> It’s only when I pull the data files out to another repository that the >> service fails. >> Somehow the Windows service path only traps the path to the 4D Server >> application and the structure files, NOT the data file (which it assumes to >> be beside it in the same directory?). >> >> Regards, >> Ronnie >> Tarawerkz >> >> >> >> >>> On 16 Oct 2019, at 4:07 PM, 4d_tech-requ...@lists.4d.com >>> <mailto:4d_tech-requ...@lists.4d.com> wrote: >>> >>> Subject: Re: 4Dv17 as a Windows Service >>> Message-ID: >>> <canebdtodj-1+1vm5zgiesxkb0rcq7vkb0znxuogszzryive...@mail.gmail.com >>> <mailto:canebdtodj-1+1vm5zgiesxkb0rcq7vkb0znxuogszzryive...@mail.gmail.com>> >>> Content-Type: text/plain; charset="UTF-8" >>> >>> Ronnie, >>> Please see the message "SOLVED: Can't run as a service on Windows 2016 (or >>> later)" - the info might be helpful to you. I realise you're on 2012, not >>> 2016, but I suspect the same issue may apply. >>> HTH >>> >>> Pat >> >> >> >> -- >> ************************************************* >> CatBase - Top Dog in Data Publishing >> tel: +44 (0) 207 118 7889 >> w: http://www.catbase.com <http://www.catbase.com/> >> skype: pat.bensky >> ************************************************* > > > > -- > ************************************************* > CatBase - Top Dog in Data Publishing > tel: +44 (0) 207 118 7889 > w: http://www.catbase.com <http://www.catbase.com/> > skype: pat.bensky > ************************************************* ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************