Virtuoso Windows service not getting created - windows-services

As per the instructions in virtuoso-t --help:
To create a windows service 'MyService' using the configuration file c:\database\virtuoso.ini:
virtuoso-t +service create +instance MyService +configfile c:\database\virtuoso.ini
I ran
virtuoso-t +service create +instance my-virtuoso +configfile D:\SOFT\Virtuoso\database\my-virtuoso.ini
got
[Using my-virtuoso.ini in D:\SOFT\Virtuoso\database]
The Virtuoso_my-virtuoso service has been registered
and is associated with the executable d:\soft\virtuoso\bin\virtuoso-t.exe
Service not showing in Windows services and not accessible on the port.
Is there a way to register a Virtuoso service on Windows 7?
BTW, OpenLink people (as I am pretty sure you are reading this), your instructions say To create a windows service 'MyService' but the result of the command run reports equivalent to Virtuoso_MyService. Might want to correct that in your next release, in addition to the actual service creation or maybe the instructions.

Thanks for the flag on the incorrect -? output. There are a few things that have changed and not been reflected properly there. That will be fixed.
One of these is that you should find the Service is listed in the control panel as OpenLink Virtuoso Server [MyService], which Windows knows as Virtuoso_MyService, and Virtuoso knows as MyService -- so the -? output should show --
To start this service in the command-line, use
sc start Virtuoso_MyService
or
virtuoso-t +service start +instance MyService
To work with this service in the Services or Component Services control panel, look for OpenLink Virtuoso Server [MyService].
Creating the Service does not start it; that's why it's not listening.
I have tested and confirmed all of the above on Windows 7, with both Open Source and Commercial Edition builds of version 7.2.4.2 (07.20.3217).

Related

How to make a Docker Container interact with a software inside the Host Machine through Console Commands?

I have built a working application that communicates with IBM Doors through console commands like this one:
"C:\Program Files\IBM\Rational\DOORS\9.7\\bin\doors.exe" -dxl "string parameter = \"PARAMETER\";#include <file.dxl>" -f "%TEMP%" -b "doNothing.dxl" -d PORT#HOST -user USER -password PASSWORD
The problem is that I need to containerize this application. My plan is to containerize the application and use the IBM Doors client that is installed inside the Container Host Machine, since I don't know how to containerize IBM Doors for Windows which is the one I have the licence for.
I had no problem containerizing the applicaton but I dont know how to make the container interact with IBM Doors without altering the application source code.
The application needs to use console commands, like the one above, to communicate with the IBM Doors Client and Database. IBM Doors needs to be able to access the container file system to write and read files.
I know for sure that I need to use Volumes but I dont know how to make that configuration and I didn't find any similar cases to mine.
Is this even possible? If not, how should I tackle this problem?
Thank you for your time.

How to Configure the Windows Service Release Tasks like Install TopShelf Windows Service in VSTS?

I am working on DevOps with VSTS. I created the simple windows service application using VS2015 for that I configured the release definition in VSTS by adding this tasks through this Windows Service Release Tasks.
I configured the Start Windows Services, Install (TopShelf) Windows Service and Stop Windows Services tasks successfully.
Configuration of Install (TopShelf) Windows Service
During release the above Stop and Install tasks are run successfully but Start task failed with the following error.
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: No such services: FirstService
Because the Install(TopShelf) Windows Service task will not be installed an windows service in machine. But it simply succeded.
I have the few questions like
what is the difference between Install(TopShelf) Windows Service and Install and Start Windows Service VSTS release tasks.
If I used the Install(TopShelf) Windows Service task, It works only if you have already existing windows service is running in virtual machine otherwise it will failed. But if I used the Install and Start Windows Service task, It will be installed new windows service in virtual machine. But I am unable to give Displayname and Description of the installed windows service.
They are two extensions created by 3rd party. So you can search them in the VSTS Marketplace and get the detailed information for them.
For your question:
Install(TopShelf) Windows Service
This is used to install Topshelf service which created with Topshelf framework.
Install and Start Windows Service
This is used to install the general Windows Service via Power-Shell or InstallUtli.
So if you just create a general Windows Service from VS. You should use the second one.
And usually, to set the Display Name and Description for a Windows Service, you need to do it in your code. Please refer to this question for details: What's the best way to set a windows service description in .net.

Windows Service doesn't start automatically

I have a windows service written in .Net 3.5 set to be automatically start, but it wouldn't start when system reboots.
As I understand, it may be caused by my service's dependency aren't started when the services tries to start. I don't know what my service depends on. I tried the workaround by adding windows print spooler as one of my service's dependencies, since print spooler is one of the services start quite late during the boot-up. Well, the work around doesn't work neither.
I'm using windows server 2003 r2. so the "delayed automatically restart" option is not available to me. and I can't use windows server 2008 just for this.
I'm out of ideas at the moment. Any suggestion would be appreciated.
A few suggestions to try out:
Check the system even logs
Add logging to your service, e.g. to system event log or use log4net
Strip the service down to a single message in the start-up or create a new stripped-down minimal service with as little dependencies as possible. See whether this starts
Check under which account your service is running and whether this account has the permission to "Run As A Service"

How to install a Windows service created in VC++ 6.0

I have a windows NT service (Maths.exe) created in VC++ 6.0.
I don't have the source code or Visual studio 6.0 installed on my machine.
Can anyone please let me know the command using which I can install the service in Service Control Manager (invoked using service.msc).
I want to control (start, stop) the service manually.
Thanks in advance.
To install a service, you can use the sc utility. The steps are:
Copy the executable and all its dependencies into a directory (%SYSTEMROOT%\System32 is perfectly valid).
Run as administrator of the computer the command:
sc create MathsService binPath= %SYSTEMROOT%\System32\Maths.exe type= own type= interact start= demand DisplayName= "My fabulous Maths service"
Where MathsService is the name of the service, the argument to binPath is the binary location and DisplayName argument is the name that shows on services.msc. The argument to start can be boot (not suitable for a service), system (not suitable for a service), auto (autostart), demand (on demand start, you have to start your service manually) or disabled (service will not start even manually).
In this example, i use type= own type= interact. This allows the service to interact with the desktop (for TCP/IP communications, for example).
Complete reference of sc sintaxis is available running sc. Also check http://support.microsoft.com/kb/251192

Uninstall before installing a windows service

I am reading about how you can create an .exe that will install a windows service to the server.
Say I already have the windows service installed and I want to perform an update. Is there a way for the installer to uninstall (stop the service, delete it, uninstall it) the currently running service and then install the updated version?
Don't be that drastic -- if possible, just stop the service, replace the files you need to, and then (optionally) restart the service.
If you delete the service from the SCM, you lose any post-install configuration done by the user -- custom logon credentials, the settings that dictate what to do when the service crashes, etc.
You shouldn't need to create an exe to do this, the "sc" command can uninstall, update, and install services on Windows for you. See:
Using SC.EXE to Develop Windows NT Services
How to create a Windows service by using Sc.exe
If you still really want to do this by creating your own executable you certainly can, if you can let us know what language you're working in code samples can be provided.

Resources