215 Star 1.7K Fork 397

GVPFastTunnel / FastTunnel

 / 详情

请问做成linux(centos7)的服务怎么搞,想做成服务+自启,我试过,一直没搞起来,望指教

Backlog
Opened this issue  
2021-04-14 17:45
[Unit]
Description=fastTunnel
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking

ExecStart=/opt/FastTunnel.Client/FastTunnel.Client
ExecStop=/opt/FastTunnel.Client/stop.sh
PrivateTmp=true

[Install]
WantedBy=multi-user.target

systemctl start fastTunnel.service 报异常

[root@localhost FastTunnel.Client]# journalctl -xe
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at FastTunnel.Client.Program.Run(IServiceProvider servicesProvider)
4月 14 17:13:55 localhost.localdomain FastTunnel.Client[4503]: at FastTunnel.Client.Program.Main(String[] args)
4月 14 17:13:55 localhost.localdomain systemd[1]: fastTunnel.service: control process exited, code=killed status=6
4月 14 17:13:55 localhost.localdomain systemd[1]: Failed to start fastTunnel.
-- Subject: Unit fastTunnel.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fastTunnel.service has failed.
-- 
-- The result is failed.
4月 14 17:13:55 localhost.localdomain systemd[1]: Unit fastTunnel.service entered failed state.
4月 14 17:13:55 localhost.localdomain systemd[1]: fastTunnel.service failed.
4月 14 17:13:55 localhost.localdomain polkitd[694]: Unregistered Authentication Agent for unix-process:4496:402885 (system bus name :1.61, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale zh_CN.UTF-8) (disconnected from bus)
4月 14 17:15:20 localhost.localdomain polkitd[694]: Registered Authentication Agent for unix-process:4594:411530 (system bus name :1.62 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale zh_C
4月 14 17:15:20 localhost.localdomain systemd[1]: Starting fastTunnel...
-- Subject: Unit fastTunnel.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fastTunnel.service has begun starting up.
4月 14 17:15:20 localhost.localdomain FastTunnel.Client[4600]: 2021/04/14 17:15:20.621|DEBUG|===== FastTunnel Client Start =====
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: 2021/04/14 17:15:21.472|ERROR|Stopped program because of exception Object reference not set to an instance of an object.
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at FastTunnel.Client.Program.implementationFactory(IServiceProvider arg)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProvider
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at FastTunnel.Client.Program.Run(IServiceProvider servicesProvider)
4月 14 17:15:21 localhost.localdomain FastTunnel.Client[4600]: at FastTunnel.Client.Program.Main(String[] args)
4月 14 17:15:21 localhost.localdomain systemd[1]: fastTunnel.service: control process exited, code=killed status=6
4月 14 17:15:21 localhost.localdomain systemd[1]: Failed to start fastTunnel.
-- Subject: Unit fastTunnel.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fastTunnel.service has failed.
-- 
-- The result is failed.
4月 14 17:15:21 localhost.localdomain systemd[1]: Unit fastTunnel.service entered failed state.
4月 14 17:15:21 localhost.localdomain systemd[1]: fastTunnel.service failed.
4月 14 17:15:21 localhost.localdomain polkitd[694]: Unregistered Authentication Agent for unix-process:4594:411530 (system bus name :1.62, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale zh_CN.UTF-8) (disconnected from bus)
4月 14 17:24:01 localhost.localdomain anacron[3815]: Job `cron.daily' started
4月 14 17:24:01 localhost.localdomain run-parts(/etc/cron.daily)[5066]: starting logrotate
4月 14 17:24:01 localhost.localdomain run-parts(/etc/cron.daily)[5071]: finished logrotate
4月 14 17:24:01 localhost.localdomain run-parts(/etc/cron.daily)[5073]: starting man-db.cron
4月 14 17:24:04 localhost.localdomain run-parts(/etc/cron.daily)[15101]: finished man-db.cron
4月 14 17:24:04 localhost.localdomain anacron[3815]: Job `cron.daily' terminated
lines 2289-2349/2349 (END)

Comments (1)

jjcbcjh created任务
jjcbcjh set related repository to FastTunnel/FastTunnel
Expand operation logs

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
768739 hgui 1578932418
C#
1
https://gitee.com/Hgui/FastTunnel.git
git@gitee.com:Hgui/FastTunnel.git
Hgui
FastTunnel
FastTunnel

Search

141041 ab9339c7 1850385 141043 25c028d5 1850385