Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update staying in "New updates available" state #10

Closed
ksaye opened this issue Mar 5, 2021 · 3 comments
Closed

Update staying in "New updates available" state #10

ksaye opened this issue Mar 5, 2021 · 3 comments

Comments

@ksaye
Copy link

ksaye commented Mar 5, 2021

I am following the tutorial: https://docs.microsoft.com/en-us/azure/iot-hub-device-update/device-update-ubuntu-agent and the update never goes from new updates to in progress. I have waited hours for this to change.

image

I have tried restarting the adu-agent and the deliveryoptimization-agent.

OS: Ubuntu 18.04
IoT Edge: 1.2.0~rc4
ADU Agent: 0.6.0-public-preview

Any suggestions on how to troubleshoot this?

The agent seems to be connected:

systemctl status adu-agent
● adu-agent.service - Azure Device Update Agent daemon.
   Loaded: loaded (/usr/lib/systemd/system/adu-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-03-05 17:21:11 UTC; 4h 8min ago
 Main PID: 18470 (AducIotAgent)
    Tasks: 2 (limit: 4646)
   CGroup: /system.slice/adu-agent.service
           └─18470 /usr/bin/AducIotAgent -l 0 -e

Mar 05 19:45:15 adu AducIotAgent[18470]: -> 19:29:15 PINGREQ
Mar 05 19:45:15 adu AducIotAgent[18470]: <- 19:29:15 PINGRESP
Mar 05 19:45:15 adu AducIotAgent[18470]: -> 19:33:15 PINGREQ
Mar 05 19:45:15 adu AducIotAgent[18470]: <- 19:33:15 PINGRESP
Mar 05 19:45:15 adu AducIotAgent[18470]: -> 19:37:15 PINGREQ
Mar 05 19:45:15 adu AducIotAgent[18470]: <- 19:37:15 PINGRESP
Mar 05 19:45:15 adu AducIotAgent[18470]: -> 19:41:15 PINGREQ
Mar 05 19:45:15 adu AducIotAgent[18470]: <- 19:41:15 PINGRESP
Mar 05 19:45:15 adu AducIotAgent[18470]: -> 19:45:15 DISCONNECT
Mar 05 19:45:15 adu AducIotAgent[18470]: 2021-03-05T19:45:15.2471Z [D] IotHub connection status: 1, reason:0 [ADUC_ConnectionStatus_Callback]
systemctl status
● adu
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2021-03-04 18:24:01 UTC; 1 day 3h ago
   CGroup: /
           ├─user.slice
           │ └─user-1000.slice
           │   ├─session-27.scope
           │   │ ├─17651 sshd: ksaye [priv]
           │   │ ├─17771 sshd: ksaye@pts/0
           │   │ ├─17772 -bash
           │   │ ├─17886 sudo su
           │   │ ├─17890 su
           │   │ ├─17891 bash
           │   │ ├─32180 systemctl status
           │   │ └─32181 systemctl status
           │   └─user@1000.service
           │     └─init.scope
           │       ├─17653 /lib/systemd/systemd --user
           │       └─17654 (sd-pam)
           ├─init.scope
           │ └─1 /sbin/init
           └─system.slice
             ├─adu-agent.service
             │ └─18470 /usr/bin/AducIotAgent -l 0 -e
             ├─containerd.service
             │ ├─1085 /usr/bin/containerd
             │ ├─4662 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 999c8648fb807e111dfea89f05587e2fe5b0f79973da4fae68cb37eabdf46e07 -address /run/containerd/containerd.sock
             │ ├─4693 /usr/bin/dotnet Microsoft.Azure.Devices.Edge.Agent.Service.dll
             │ ├─4902 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 65bb794b872df0c0b543879290192cf4a51079251fbf1f747160f46b58ffbd66 -address /run/containerd/containerd.sock
             │ ├─4934 /usr/bin/dotnet Microsoft.Azure.Devices.Edge.Hub.Service.dll
             │ ├─6768 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 58a66b54f852e3c11ff3ce3be487f2688cee27e01b329e0fb49b291462e76dec -address /run/containerd/containerd.sock
             │ └─6798 /usr/bin/dotnet SimulatedTemperatureSensor.dll
             ├─aziot-edged.service
             │ └─4383 /usr/libexec/aziot/aziot-edged
             ├─systemd-networkd.service
             │ └─821 /lib/systemd/systemd-networkd
             ├─systemd-udevd.service
             │ └─427 /lib/systemd/systemd-udevd
             ├─cron.service
             │ └─1079 /usr/sbin/cron -f
             ├─docker.service
             │ ├─1290 /usr/bin/dockerd -H fd:// --containerd /var/run/containerd/containerd.sock
             │ ├─4864 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8883 -container-ip 172.18.0.3 -container-port 8883
             │ ├─4876 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5671 -container-ip 172.18.0.3 -container-port 5671
             │ └─4888 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.18.0.3 -container-port 443
             ├─polkit.service
             │ └─1104 /usr/lib/policykit-1/polkitd --no-debug
             ├─networkd-dispatcher.service
             │ └─984 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
             ├─accounts-daemon.service
             │ └─962 /usr/lib/accountsservice/accounts-daemon
             ├─systemd-journald.service
             │ └─396 /lib/systemd/systemd-journald
             ├─atd.service
             │ └─991 /usr/sbin/atd -f
             ├─aziot-keyd.service
             │ └─1915 /usr/libexec/aziot-identity-service/aziot-keyd
             ├─unattended-upgrades.service
             │ └─1109 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
             ├─deliveryoptimization-agent.service
             │ └─18585 /usr/local/bin/deliveryoptimization-agent
             ├─ssh.service
             │ └─1223 /usr/sbin/sshd -D
             ├─snapd.service
             │ └─29048 /usr/lib/snapd/snapd
             ├─rsyslog.service
             │ └─964 /usr/sbin/rsyslogd -n
             ├─aziot-identityd.service
             │ └─1890 /usr/libexec/aziot-identity-service/aziot-identityd
             ├─lxcfs.service
             │ └─948 /usr/bin/lxcfs /var/lib/lxcfs/
             ├─lvm2-lvmetad.service
             │ └─418 /sbin/lvmetad -f
             ├─systemd-resolved.service
             │ └─846 /lib/systemd/systemd-resolved
             ├─aziot-certd.service
             │ └─1935 /usr/libexec/aziot-identity-service/aziot-certd
             ├─dbus.service
             │ └─937 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
             ├─systemd-timesyncd.service
             │ └─643 /lib/systemd/systemd-timesyncd
             ├─system-getty.slice
             │ └─getty@tty1.service
             │   └─1148 /sbin/agetty -o -p -- \u --noclear tty1 linux
             └─systemd-logind.service
               └─995 /lib/systemd/systemd-logind

Logs:

cat aduc.20210305-172111.log
2021-03-05T17:21:11.5491Z [I] Agent (linux; 0.6.0-public-preview+20210227-001549) starting. [main]
2021-03-05T17:21:11.5491Z [I] Git Info: HEAD:34d84e8 [main]
2021-03-05T17:21:11.5491Z [I] Agent built with handlers: microsoft/apt. [main]
2021-03-05T17:21:11.5492Z [I] Requesting connection string from the Edge Identity Service [GetConnectionInfoFromIdentityService]
2021-03-05T17:21:11.5518Z [I] Initalizing PnP components. [ADUC_PnP_Components_Create]
2021-03-05T17:21:11.5518Z [I] ADUC agent started. Using IoT Hub Client SDK 1.6.0 [AzureDeviceUpdateCoreInterface_Create]
2021-03-05T17:21:11.5518Z [I] Calling ADUC_Register [ADUC_MethodCall_Register]
2021-03-05T17:21:11.5518Z [I] IoTHub Device Twin callback registered. [ADUC_DeviceClient_Create]
2021-03-05T17:21:11.5546Z [W] Failed to pass connection string to DO, error: -1 [StartupAgent]
2021-03-05T17:21:11.5546Z [I] Agent running. [main]
2021-03-05T17:21:11.9257Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-03-05T17:21:12.4272Z [I] Processing existing Device Twin data after agent started. [ADUC_PnPDeviceTwin_Callback]
2021-03-05T17:21:12.4272Z [D] Notifies components that all callback are subscribed. [ADUC_PnPDeviceTwin_Callback]
2021-03-05T17:21:12.4272Z [I] DeviceInformation component is ready - reporting properties [DeviceInfoInterface_Connected]
2021-03-05T17:21:12.4273Z [I] Property manufacturer changed to Contoso [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4273Z [I] Property model changed to Virtual-Machine [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4273Z [I] Property osName changed to Linux [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4273Z [I] Property swVersion changed to 4.15.0-136-generic [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4273Z [I] Property processorArchitecture changed to x86-64 [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4393Z [I] Property processorManufacturer changed to GenuineIntel [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4393Z [I] Property totalMemory changed to 4039224 [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4394Z [I] Property totalStorage changed to 130036836 [RefreshDeviceInfoInterfaceData]
2021-03-05T17:21:12.4395Z [I] No update content. Reporting Idle state. [ADUC_Workflow_HandleStartupWorkflowData]
2021-03-05T17:21:12.4395Z [I] Setting UpdateState to Idle [ADUC_SetUpdateStateHelper]
2021-03-05T17:21:12.4395Z [I] Reporting state: 0, Idle (0); HTTP 200; result 1, 0 [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-03-05T17:21:12.4395Z [I] UpdateAction: Idle. WorkflowId: 210305172112 [ADUC_MethodCall_Idle]
2021-03-05T17:21:12.4395Z [I] Calling IdleCallback [ADUC_MethodCall_Idle]
2021-03-05T17:21:12.4395Z [I] Now idle. workflowId: 210305172112 [Idle]
2021-03-05T18:09:12.6805Z [D] IotHub connection status: 1, reason:0 [ADUC_ConnectionStatus_Callback]
2021-03-05T18:09:13.2383Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-03-05T18:57:13.9672Z [D] IotHub connection status: 1, reason:0 [ADUC_ConnectionStatus_Callback]
2021-03-05T18:57:14.5095Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-03-05T19:45:15.2471Z [D] IotHub connection status: 1, reason:0 [ADUC_ConnectionStatus_Callback]
2021-03-05T19:45:15.8103Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-03-05T20:33:16.5316Z [D] IotHub connection status: 1, reason:0 [ADUC_ConnectionStatus_Callback]
2021-03-05T20:33:16.9975Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
@Nox-MSFT
Copy link
Contributor

Nox-MSFT commented Mar 9, 2021

Hi @ksaye, from the issue description, I'm not sure whether you have trouble deploying the update or the deployment status hasn't changed.

It looks like your update was imported successfully. What do you see when you click this link?

image

@ksaye
Copy link
Author

ksaye commented Mar 9, 2021

@Nox-MSFT, thanks for the reply. Days later when I look at it they the sample update has now deployed:

image

When looking at the APT log, it looks like the very next day at about the same time, it did deploy:

image

So looking really closer, I realized the deployment defaults to tomorrow (image below), so the issue was a user problem (I did not read the screen completely).

image

@ksaye ksaye closed this as completed Mar 9, 2021
@Nox-MSFT
Copy link
Contributor

Nox-MSFT commented Mar 9, 2021

@ksaye , thanks for the info. I'll forward this to our team and discuss the way to improve this experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants