On 11.06.2017 07:57, Justin DynamicD wrote: > I'm unable to start an msproxy service on a Windows 2012R2 box. > > After following the documentation on installing ruby, compiling, and > finally getting to the point where I can successfully run ruby > bin\smart-proxy, I attempted to create a service yet I don't seem to be > able to. > > I've used both the register-service.rb as well as new-service powershell > cmdlets to manually create a service.
Keep in mind you might have some permission issues. You are starting smart-proxy most likely as domain admin for testing? If you want to run smart-proxy with DNS and/or DHCP, and your proxy needs to connect to the network. I've created a special user for that purpose, you'll want this user to be member of DHCP Administrators and DNS Administrators at least. Then, test this user by: runas /user=<doamin>\<smartproxyuser> cmd And use this terminal to run smart proxy. Once all checks out, smart proxy should run. Take care it can read settings and write log files ect. Our Service command line: C:\Ruby200-x64\bin\ruby -C c:/TheForeman/smart-proxy "c:\TheForeman\smart-proxy\bin\smart-proxy-win-service" There was an issue with the service, IIRC it needs to be called via bundle exec, starting with 1.14. > > Both create a service that never properly starts, nor generates any logs. > Manually running as a local user will generate a log that simply dumps: > > 2017-06-10 22:52:19 -0700 Service is initializing > 2017-06-10 22:52:22 -0700 Daemon failure: Service_Main thread exited > abnormally > C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/win32-service-0.8.8/lib/win32/daemon.rb:280:in > > `mainloop' > C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/win32-service-0.8.8/lib/win32/daemon.rb:215:in > > `mainloop' > C:/Program Files/Foreman-SmartProxy/bin/smart-proxy-win-service:39:in > `<main>' > > Again, running smart-proxy works just fine, only the service fails. > > Anyone able to get the win proxy to actually work? Side thought: what a > horrific install process, why isn't this just a choco package and module > ... so it can be installed/configured via puppet like the rest of foreman? Indeed, it is - I think PR's are welcome! Our smart-proxy is running fine since I use foreman - all versions from 1.8. > > -- Daniel Helgenberger (helge000) [email protected] -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
