If you cannot start up the Link Agent or have trouble running tests over mabl Link, this article offers steps to troubleshoot and isolate the issue.
To get started, choose the issue that you're experiencing:
- Can't start the Link Agent
- Link Agent isn't connecting to mabl
- Tests aren't connecting to the application
Starting the Link Agent
If you can't start up the Link Agent, it may be due to one of the following reasons:
Invalid startup command
Make sure the Link Agent startup command uses the proper API key and a valid name:
- The API key must be a "Link Agent" API key
- The name must be between 1 and 24 characters long that consists of lowercase letters, numbers, and dashes.
Incorrect directory
If you see the message Bad command or file name
, make sure you are in the link-agent/bin
directory when you run the startup command.
Unsupported Java version
If you see the error unrecognized option: --add-opens
when starting up the Link Agent, you're running an unsupported Java version. Upgrade to a Java version supported by the Link Agent or use the Docker Link Agent container.
Connecting to mabl
The Link Agent host must be able to connect to api.mabl.com
and *.link.mabl.com
over port 443.
After starting the Link Agent, you should see the Link Agent with a "Connected" status on the networking page of the mabl app: Settings > Networking.
- If you don't see the agent in the Link Agents table, the Link Agent can't connect to
api.mabl.com
. - If you see the agent in the Link Agents table, but its status isn't "Connected", the Link Agent can connect to
api.mabl.com
but can't connect to*.link.mabl.com
.
Test connectivity
To test connectivity, SSH or log into the machine where the Link Agent is running and use curl
or a different tool to test the connection to the following endpoints: api.mabl.com
and *.link.mabl.com
.
Follow up with your team
If you cannot connect to api.mabl.com
and/or *.link.mabl.com
, consult with your networking team to understand why this is happening:
- If your corporate firewall blocks outgoing traffic, ask your networking team to add
*.link.mabl.com
andapi.mabl.com
to an allowlist so that mabl Link traffic can connect to the mabl cloud. - If your corporate network blocks outgoing connections to port 443, contact your networking team about putting an exemption in place for the Link Agent.
- If your company network uses forward proxies, make sure you add the appropriate forward proxy options to the Link Agent startup command.
Connecting to the application under test
If your tests are configured to run over mabl Link but cannot connect or lose connection to the application under test, use this checklist to isolate the possible cause:
Ensure proper environment configuration
Confirm that the environment you're running tests against is configured to use mabl Link. The Link Agent selected for the environment must match one of the active Link Agents in your workspace.
An environment configured to use mabl Link
Check the Link Agent status
Make sure the Link Agent is currently active on the networking page: Settings > Networking.
Check the Link Agent logs
If the Link Agent isn't active or wasn't active when tests were running, find the person who maintains the Link Agent for your team and ask them for a copy of the Link Agent logs. Link Agent logs can help find the reason why the Link Agent disconnected. They are located on the machine where the Link Agent was installed in the following location: logs/agent.log
.
Some reasons why a Link Agent can shut down include:
- The Link Agent host rebooted when tests were scheduled to run.
- The Link Agent host logged out due to inactivity and shut down the Link Agent process.
- The volume of test traffic on the Link Agent is too high. To test this, try reducing concurrency during plan runs to see if the pass rate improves. If needed, you can create multiple Link Agent instances with the same name to act as a load balancer. For more information, see the section on high availability configuration in the Link Agent requirements article.
For minimal disruptions, run the Link Agent on a machine or VM that is on as much as possible. See the article on Link Agent requirements for more information.
Confirm that the Link Agent host can access your app
When tests run over mabl Link, DNS resolution occurs on the machine hosting the Link Agent. As long as the Link Agent host can access the application under test, your tests running in the mabl cloud can connect to the environment.
To confirm whether the Link Agent host can access your app, log into the machine where the agent is running use curl or a similar tool to check the connection to your application. If the curl call fails, your network isn't properly configured for the Link Agent host.
Alternatively, if you don't have access to the Link Agent host, create a mabl API test to test the connection to the application. Run it in the cloud over the Link-enabled environment and check out the errors in test output logs for more information.