Hello,
I am new to Mender and trying to create my first test deployment using a single-file
artifact and a Ubuntu server test device.
I have taken these steps successfully:
- Deployed Mender to EKS and ensured it is accessible from my Ubuntu server
- Created and uploaded my
single-file
artifact to Mender - Registered my Ubuntu server as a device with Mender by installing
mender-client4
usingapt
and entering my Mender server info
I started the deployment of my single-file artifact through the UI to my Ubuntu device but it failed, even though the file was indeed deployed to my Ubuntu device.
I sshed into the Ubuntu device and ran: sudo journalctl -u mender-updated | tail
This is what I saw (I have removed IDs and timestamps for brevity):
mender-update: severity=info name="Global" msg="Running Mender client 4.0.4"
mender-update: severity=info name="Global" msg="Deployment with ID 8d3f0784-93ad-41ec-ab54-756ba0a7d69f started."
mender-update: severity=info name="Global" msg="Sending status update to server"
mender-update: severity=error name="Global" msg="Request to push status data failed: PUT http://127.0.0.1:36069/api/devices/v1/deployments/device/deployments/8d3f0784-93ad-41ec-ab54-756ba0a7d69f/status: "
mender-update: severity=error name="Global" msg="Could not send deployment status: bad version: PUT http://127.0.0.1:36069/api/devices/v1/deployments/device/deployments/8d3f0784-93ad-41ec-ab54-756ba0a7d69f/status: "
mender-update: severity=info name="Global" msg="Installing artifact..."
mender-update: severity=info name="Global" msg="Sending status update to server"
mender-update: severity=error name="Global" msg="Request to push status data failed: PUT http://127.0.0.1:36069/api/devices/v1/deployments/device/deployments/8d3f0784-93ad-41ec-ab54-756ba0a7d69f/status: "
mender-update: severity=info name="Global" msg="Retrying status update after 60 seconds"
It appears that the install succeeded, but the Mender client was unable to update the Mender server because it is trying to access it locally. This was very confusing to me. Why is the device trying to connect to localhost
when it was registered with my Mender server at a different domain?
This is what my mender.conf
looks like:
$ cat /etc/mender/mender.conf
{
"HttpsClient": {},
"Security": {},
"Connectivity": {},
"DeviceTypeFile": "/var/lib/mender/device_type",
"UpdateControlMapExpirationTimeSeconds": 90,
"UpdateControlMapBootExpirationTimeSeconds": 45,
"UpdatePollIntervalSeconds": 60,
"InventoryPollIntervalSeconds": 1200,
"RetryPollIntervalSeconds": 60,
"Servers": [
{
"ServerURL": "https://mender.mydomain.com"
}
]
}
Am I missing something in my Mender config? Why would the client be able to register as a device using mender.mydomain
but then try to send updates to localhost
? Any help would be very much appreciated!