Open zhongkai1010 opened 6 years ago
http://docs.supersocket.net/v1-6/en-US/SuperSocket-Basic-Configuration
Please check the section SuperSocket Windows Service Configuration
, have you configured the service name?
`
` Did not read the configuration content
http://docs.supersocket.net/v1-6/en-US/Start-SuperSocket-by-Configuration
Have you read this section?
SuperSocket.SocketService.exe, the Running Container provided by SuperSocket
@kerryjiang I have tried to install the demo https://github.com/kerryjiang/SuperSocket/tree/v1.6/QuickStart/Basic/TelnetServer_StartByConfig as a windows service, but I encounter another problem The modified config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="superSocket" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine"/>
</configSections>
<appSettings>
<add key="ServiceName" value="SupperSocketService"/>
</appSettings>
<superSocket>
<servers>
<server name="TelnetServer"
serverType="SuperSocket.QuickStart.TelnetServer_StartByConfig.TelnetServer, SuperSocket.QuickStart.TelnetServer_StartByConfig"
ip="Any" port="2020"
maxConnectionNumber="100">
</server>
</servers>
</superSocket>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<runtime>
<gcServer enabled="true" />
</runtime>
</configuration>
.\SuperSocket.SocketService.exe -i
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe assembly's progress.
The file is located at C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog.
Installing assembly 'C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe
logfile = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog
SupperSocketService
Installing service SupperSocketService...
Creating EventLog source SupperSocketService in log Application...
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe assembly's progress.
The file is located at C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog.
Rolling back assembly 'C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe
logfile = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog
Restoring event log to previous state for source SupperSocketService.
An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.
The Rollback phase completed successfully.
The transacted install has completed.
@zhongkai1010 Could you please test the demo project?
正在安装程序集“D:\projects\Github\SuperSocket\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe”。 受影响的参数是: logtoconsole = assemblypath = D:\projects\Github\SuperSocket\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe logfile = D:\projects\Github\SuperSocket\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog 正在安装服务 SupperSocketService... 已成功安装服务 SupperSocketService。
Has been successfully installed, thank you
@zhongkai1010 I have no idea how could you make it work, I encounter the different problem.
@zhongkai1010 Finally, I make it works. Please don't forget to close this issue.
~\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug [v1.6 ≡ +3 ~3 -0 !]> .\SuperSocket.SocketService.exe -i
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe assembly's progress.
The file is located at C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog.
Installing assembly 'C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe
logfile = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog
SupperSocketService
Installing service SupperSocketService...
Service SupperSocketService has been successfully installed.
Creating EventLog source SupperSocketService in log Application...
The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe assembly's progress.
The file is located at C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog.
Committing assembly 'C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.exe
logfile = C:\Users\clu\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug\SuperSocket.SocketService.InstallLog
The Commit phase completed successfully.
The transacted install has completed.
~\source\repos\GitHub\KerryJiang\SuperSocket-v1.6\QuickStart\Basic\TelnetServer_StartByConfig\bin\Debug [v1.6 ≡ +3 ~3 -0 !]> Get-Service SupperSocketService
Status Name DisplayName
------ ---- -----------
Stopped SupperSocketSer... SupperSocketService
From what I can see, the Windows Service configuration XML needs to be in SuperSocket.SocketService.exe.config, and not MyProjectName.exe.config.
上次我也遇到这样的问题,最后还是解决了。是否也有跟系统的权限有关系?
正在开始安装的“安装”阶段。 查看日志文件的内容以获得 D:\projects\OneWork\OneWork.Learn\SuperSocket\TestSuperSocket\bin\Debug\SuperSocket.SocketService.exe 程序集的进度。 该文件位于 D:\projects\OneWork\OneWork.Learn\SuperSocket\TestSuperSocket\bin\Debug\SuperSocket.SocketService.InstallLog。
在“安装”阶段发生异常。 System.InvalidOperationException: 无法创建 SuperSocket.SocketService.SocketServiceInstaller 安装程序类型的实例。 引发了内部异常 System.Reflection.TargetInvocationException,错误消息如下: 调用的目标发生了异常。。 引发了内部异常 System.ArgumentException,错误消息如下: 服务名 包含无效字符、为空或者过长(最大长度 = 80)。。
正在开始安装的“回退”阶段。 查看日志文件的内容以获得 D:\projects\OneWork\OneWork.Learn\SuperSocket\TestSuperSocket\bin\Debug\SuperSocket.SocketService.exe 程序集的进度。 该文件位于 D:\projects\OneWork\OneWork.Learn\SuperSocket\TestSuperSocket\bin\Debug\SuperSocket.SocketService.InstallLog。 在 System.Configuration.Install.AssemblyInstaller 安装程序的“回退”阶段发生异常。 System.InvalidOperationException: 无法创建 SuperSocket.SocketService.SocketServiceInstaller 安装程序类型的实例。 引发了内部异常 System.Reflection.TargetInvocationException,错误消息如下: 调用的目标发生了异常。。 引发了内部异常 System.ArgumentException,错误消息如下: 服务名 包含无效字符、为空或者过长(最大长度 = 80)。。 在安装的“回退”阶段发生异常。将忽略该异常并继续回退。但是,在完成回退后计算机可能无法完全还原到它的初始状态。
“回退”阶段已成功完成。
已完成事务处理安装。