License Type | SaaS & On-Premise |
Agent Mode | Assess & Protect |
Main Product Category | Ruby Agent |
Sub Category | Installation |
Objective
At times the bundled service within the Ruby Agent may fail to start either because of an environmental anomaly or a defect within the agent. If the bundled service fails, the agent will subsequently fail as well. Using the standalone service executable that is pulled down and stored in your home Ruby directory is a valid workaround.
Process
1. Navigate to $USER_HOME/.rvm/gems/ruby-2.x.x/gems/contrast-agent-3.x.x/service_executables/{mac|linux|windows}/
2. Place a contrast_security.yaml
file in the directory filled in with your credentials as well as the host and port you'd like the service to run on. Should look something like this:
api: url: https://app.contrastsecurity.com/Contrast api_key: <redacted> service_key: <redacted> user_name: <redacted> agent: service: logger: path: contrast_service.log level: ERROR host: 127.0.0.1 port: 30555
3. Run the service executable $ ./contrast-service
4. Navigate to the directory containing your application, and edit the contrast_security.yaml in there to line up with the host and port you established in step 2.
5. Start the application, which should now be successfully connected to the service.