Upgrade an MSE agent
When a new Microservices Engine (MSE) agent version is available, upgrade promptly. The upgrade method depends on your deployment environment.
| Environment | Upgrade method | Automatic upgrade |
|---|---|---|
| EDAS | Redeploy the application | - |
| Kubernetes (no version pinned) | Restart the application pod | Yes (via ack-onepilot) |
| Kubernetes (version pinned) | Update the pinned version, then restart the pod | No |
| ECS or manual installation | Download the latest agent and replace the existing files | No |
Upgrade in EDAS environments
Redeploy the application to upgrade the Java agent in Enterprise Distributed Application Service (EDAS) environments.
Upgrade in Kubernetes environments
The upgrade path depends on whether a specific agent version is pinned to the application. To check your current configuration, see Specify the agent version.
No version pinned
The ack-onepilot component handles automatic MSE agent upgrades. Restart the application pod to pick up the latest agent version:
kubectl rollout restart deployment/<deployment-name> -n <namespace>Version pinned
Find the latest version or a non-expired version in Release notes for the Java agent. For version support timelines, see Manage the lifecycles of MSE component versions.
Replace the pinned version in your configuration with the target version.
Restart the application pod for the change to take effect:
kubectl rollout restart deployment/<deployment-name> -n <namespace>
If the agent version remains unchanged after you perform the preceding operations, a canary release rule may be configured on the server side. Submit a ticket for assistance.
Upgrade in ECS and other environments (manual installation)
Automatic upgrades are not supported in ECS or other environments where the MSE agent was installed manually.
Back up the current agent directory. This allows a quick rollback if the new version causes issues.
cp -r /path/to/current/agent /path/to/current/agent_backup_$(date +%Y%m%d)Download the latest AliyunJavaAgent.zip. Replace
${regionId}with the region ID of your deployment. For available region IDs, see Supported regions. For example, to download over the Internet in the Singapore region:Network Download URL Internet http://arms-apm-${regionId}.oss-${regionId}.aliyuncs.com/AliyunJavaAgent.zipVPC http://arms-apm-${regionId}.oss-${regionId}-internal.aliyuncs.com/AliyunJavaAgent.zipwget http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/AliyunJavaAgent.zipExtract the downloaded file and replace the existing agent directory with the new files.
unzip AliyunJavaAgent.zip -d /path/to/agent/Restart the application.