# Khắc phục sự cố

## Docker

- “docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”

    Khởi động docker:

sudo systemctl start docker
        Copy to clipboard
- “Error response from daemon: Get “[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/)”: http: server gave HTTP response to HTTPS client”

    1. Thêm một bản sao sổ đăng ký Docker nội bộ (cài đặt nội bộ cho mạng Qualcomm). Không bao gồm bình luận có dấu # trong tệp cấu hình JSON. Việc dùng ký tự tab thay cho dấu cách và các ký tự khoảng trắng không hiển thị khác có thể làm hỏng chức năng của tệp cấu hình JSON và cũng có thể khiến `docker.service` không khởi động được.

sudo vim /etc/docker/daemon.json
            # Add an entry similar to the following in /etc/docker/daemon.json:
            {
               "registry-mirrors": ["https://docker-registry.qualcomm.com"]
            }
            Copy to clipboard

Ghi chú

Ngoài ra, bạn có thể thêm mục sau vào `/etc/docker/daemon.json`:

`"registry-mirrors": ["https://ccr.ccs.tencentyun.com"]`
    2. Khởi động lại dịch vụ Docker để áp dụng cài đặt mới.

sudo systemctl restart docker
            Copy to clipboard
- “Failed to download from [https://download.docker.com](https://download.docker.com)”

> 
> 
> Nếu bạn không thể truy cập hoặc tải xuống từ [https://download.docker.com](https://download.docker.com), hãy chạy các lệnh sau để cài đặt docker:
> 
> 
> 
> > 
> > 
> > sudo apt update
> >         sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
> >         curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add –
> >         sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
> >         Copy to clipboard
- “Docker failure due to Virtualization not enabled”

    Hãy bật ảo hóa từ BIOS để khắc phục lỗi này. Làm theo hướng dẫn cụ thể của nhà cung cấp hệ thống để bật ảo hóa. Ví dụ: các bước sau do nhà cung cấp hệ thống cung cấp có thể bật ảo hóa:

    1. Khi hệ thống đang khởi động, hãy vào BIOS. Cửa sổ BIOS sẽ xuất hiện.
    2. Chuyển sang tab Advanced.
    3. Trong phần CPU Configuration, hãy đặt Virtualization Technology thành enabled.
    4. Lưu và thoát.
    5. Khởi động lại hệ thống.
- “Permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock.”

    Lỗi này xảy ra khi `qsc-cli` đã được cài đặt trên máy và bạn không phải là thành viên của nhóm Docker.

    1. Thêm vào nhóm Docker:

sudo groupadd docker
            sudo usermod -aG docker $USER
            newgrp docker
            Copy to clipboard
    2. Xác nhận rằng bạn là thành viên của nhóm Docker:

sudo grep /etc/group -e "docker"
            # This command shows a list of users who are part of the Docker group; must include your user ID
            Copy to clipboard
    3. Đăng xuất rồi đăng nhập lại để quyền truy cập có hiệu lực.

# You can run the following command to check if you are part of the Docker group
            id -a
            # This command returns an output string which should include 'docker'
            Copy to clipboard

## Đồng bộ hóa

- “repo init or sync failure with except ManifestInvalidRevisionError, e:”

    Bạn có thể thấy lỗi này sau khi cài đặt gói Repo:

    - Nếu bạn có lệnh chuyển hướng trong `/etc/gitconfig` hoặc `~/.gitconfig` đến một bản sao nội bộ.
    - Nếu bản sao nội bộ có thêm tiền tố ở các nhánh trong quá trình sao chép. Ví dụ: nếu `/etc/gitconfig` chuyển hướng và bản sao nội bộ nhánh `stable` từ git repo gốc được đổi thành `aosp/stable`, thì lỗi sau sẽ xuất hiện khi thực hiện lệnh `repo init`:

[url "ssh://<internal mirror>:<port>/tools/repo"]
        insteadOf = https://android.googlesource.com/tools/repo
        insteadOf = https://gerrit.googlesource.com/git-repo
        Copy to clipboard

File "/local/mnt/workspace/<userid>/test_repo/.repo/repo/main.py", line 126
           except ManifestInvalidRevisionError, e:
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        SyntaxError: multiple exception types must be parenthesized
        Copy to clipboard

    Sau đây là các bước khắc phục lỗi này:

    1. Xóa thư mục `.repo` cũ. Thư mục này sẽ ở trong thư mục mà trước đó bạn đã chạy lệnh `repo init`.

rm -rf .repo
            Copy to clipboard
    2. Xuất và chạy lệnh repo để khắc phục sự cố repo. REPO\_REV phải trỏ đến nhánh đã phản chiếu từ nhánh 'stable' thượng nguồn  của [https://gerrit.googlesource.com/git-repo](https://gerrit.googlesource.com/git-repo).

export REPO_REV='aosp/stable'
            Copy to clipboard
- “Cài đặt repo “Server certificate verification failed””

    - Nếu bạn thấy lỗi chứng chỉ như “Server certificate verification failed. CAfile: none CRLfile: none”, hãy đặt cấu hình git để tắt tính năng xác minh chứng chỉ SSL bằng cấu hình git. Hãy thảo luận với quản trị viên CNTT của bạn để được hướng dẫn thêm. Bạn có thể sử dụng một trong các lệnh sau để vô hiệu hóa SSL:

export GIT_SSL_NO_VERIFY=1
            git config --global http.sslverify false
            Copy to clipboard
    - Nếu khu vực của bạn đang chặn quyền truy cập vào `android.googlesource`, hãy thử cấu hình sau để tải Repo từ CodeLinaro Mirror:

git config --global url.https://git.codelinaro.org/clo/la/tools/repo.insteadOf https://android.googlesource.com/tools/repo
            Copy to clipboard
- “error.GitError: git config (‘–replace-all’, ‘color.ui’, ‘auto’): error: could not write config file /home/$USER/.gitconfig: Device or resource busy”

    Lỗi này xảy ra khi gitconfig của bạn không đặt cấu hình màu UI. Cấu hình này được đặt theo mặc định trong Git 1.8.4 và các phiên bản mới hơn. Chạy lệnh sau để bật display màu trong tài khoản của bạn:

git config --global color.ui auto
        Copy to clipboard
- “[Error]: Failed preparing build for compilation. Error: Error setting docker credentials. Error: “Error saving credentials: error closing temp file: close /usr2/&lt;userid&gt;/.docker/config.json3322274803: disk quota exceeded\n””

    QSC CLI chỉ sử dụng thư mục home cho một vài kilo byte (kB). Hãy xóa một vài MB khỏi thư mục home của bạn.
- “[Error]: The “path” argument must be of type string. Received undefined”

    **Trích dẫn lỗi**

qsc-cli chip-software download --workspace-path '/local/mnt/workspace/<userid>/K2L/QSC_CLI_BUILD/build' --product 'QCM6490.LE.1.0' --release 'r00270.1' --distribution 'Qualcomm_Linux.SPF.1.0|TEST|DEVICE|PUBLIC'
        [Info]: Starting qsc-cli version 0.0.0.7
        (node:2924765) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
        (Use `qsc-cli --trace-warnings ...` to show where the warning was created)
        [Info]: Checking if Workspace already exists
        [Info]: Saved updated Workspace info
        [Info]: Workspace Setup Completed
        [Error]: The "path" argument must be of type string. Received undefined
        Copy to clipboard

    **Giải pháp**

    Lỗi này xảy ra nếu QSC CLI không tương thích với Qlauncher. Qlauncher sẽ bị loại bỏ và được thay thế bằng một ứng dụng mới từ QSC. Nếu có Qlauncher trong không gian làm việc, bạn có thể chạy các lệnh sau:

# Find your workspace within the Qlauncher UI
        # Take a backup of the following metadata file if you want to preserve the older workspace created with Qlauncher.
        # These will work only with Qlauncher app. You can reinstall the app at a later time again to access. If you don't
        # need the workspaces, you can delete this file using:
        mv /var/lib/qcom/data/qualcomm_launcher/workspaces2.json /var/lib/qcom/data/qualcomm_launcher/workspaces2.json.bak
        # Uninstall Qlauncher with the following command:
        qsc-cli tool uninstall qualcomm_launcher
        Copy to clipboard
- “docker: Error response from daemon: error while creating mount source path ‘/usr2/&lt;userid&gt;/.netrc’: mkdir /usr2/&lt;userid&gt;/.netrc: permission denied”

    **Trích dẫn lỗi**

Updating files: 100% (64/64), done.
        2024-02-29T07:58:00: Sync Command Completed
        2024-02-29T07:58:01: Finished setup.
        [Info]: Setting Docker Credential
        2024-02-29T07:58:03: Authorization successful
        2024-02-29T07:58:03: Sync Command Starting
        2024-02-29T07:58:03: Running Sync Command for SyncOpenSourceCode - DownloadOpenSource
        docker: Error response from daemon: error while creating mount source path '/usr2/ramevelp/.netrc': mkdir /usr2/ramevelp/.netrc: permission denied.
        2024-02-29T07:58:04: Sync Command Failed
        [Error]: Failed SP Download with error: 2024-02-29T07:58:04: Sp Download failed. ExitCode: 126 Signal: 0  with errorcode 4
        [Error]: 2024-02-29T07:58:04: Sp Download failed. ExitCode: 126 Signal: 0
        Copy to clipboard

    **Giải pháp**

    Lỗi này có thể xảy ra do cách bộ phận CNTT thiết lập thư mục chính của bạn. Hãy làm việc với quản trị viên CNTT của bạn để biết bất kỳ thay đổi nào khác đối với thư mục chính của bạn.
- “fatal: couldn’t find remote ref refs/heads/qcom-linuxSTXscarthgap”

    Nếu bạn thấy bất kỳ ký tự lạc nào khi sao chép lệnh từ PDF, hãy xóa hoặc thay thế ký tự lạc bằng các ký hiệu thích hợp và chạy lại lệnh.

    **Ví dụ**

# Replace the following command
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linuxSTXscarthgap -m qcom-6.6.90-QLI.1.5-Ver.1.1.xml
        # with
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m qcom-6.6.90-QLI.1.5-Ver.1.1.xml
        Copy to clipboard
- “pull access denied for 032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool”

    Lỗi này có thể xảy ra khi chạy lệnh tải xuống `qsc-cli`.

    **Trích dẫn lỗi**

Unable to find image '032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool:20.04.20231220102843864.9' locally
        docker: Error response from daemon: pull access denied for 032693710300.dkr.ecr.us-west-2.amazonaws.com/stormchaser/ql-tool, repository doesn't exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.
        Copy to clipboard

    **Giải pháp**

rm -rf ~/.docker/config.json
        Copy to clipboard

    Hãy chạy lại lệnh `qsc-cli`.

## Biên dịch

- “ERROR: linux-kernel-qcom-6.6-r0 do\_menuconfig: No valid terminal found, unable to open devshell”

    Lỗi này có thể kích hoạt khi chạy lệnh `bitbake linux-kernel-qcom -c menuconfig`.

    **Trích dẫn lỗi**

ERROR: linux-kernel-qcom-6.6-r0 do_menuconfig: No valid terminal found, unable to open devshell.
        Tried the following commands:
              tmux split-window -c "{cwd}" "do_terminal"
              tmux new-window -c "{cwd}" -n "linux-kernel-qcom Configuration" "do_terminal"
              xfce4-terminal -T "linux-kernel-qcom Configuration" -e "do_terminal"
              terminology -T="linux-kernel-qcom Configuration" -e do_terminal
        Copy to clipboard

    **Giải pháp**

sudo apt install screen
        sudo apt install tmux
        Copy to clipboard
- “NOTE: No reply from server in 30s”

    Nếu bạn thấy lỗi này trong quá trình dựng khi chạy lại lệnh `qsc-cli chip-software compile` hoặc `bitbake`, bạn có thể xóa `bitbake.lock`, `bitbake.sock` và `hashserve.lock` khỏi không gian làm việc được dựng một phần và thử dựng lại. Ví dụ: nếu bạn đang dựng bằng `qsc-cli`, thì các tệp này nằm trong `<absoute_workspace_path>/DEV/LE.QCLINUX.1.0.r1/build-qcom-wayland`.

- “do\_fetch: BitBake Fetcher Error: FetchError(‘Unable to fetch URL from any source’)”

    Đây là những lỗi tải xuống gián đoạn. Kiểm tra xem có sự cố mạng/máy chủ ở phía bạn không, nếu không, hãy kiểm tra xem máy chủ có gây ra sự cố này không. Bạn có thể tăng giá trị thiết lập `postBuffer` và `maxRequestBuffer` trong tệp `.gitconfig` nếu lỗi xảy ra trong khi truy xuất git repositories. Nếu bạn đang dùng `qsc-cli` thì các cấu hình này đã được công cụ `qsc-cli` xử lý:

git config --global http.postBuffer 1048576000
        git config --global http.maxRequestBuffer 1048576000
        Copy to clipboard

    Nếu các cấu hình này không hoạt động, bạn có thể thử biên dịch lại để khắc phục các lỗi gián đoạn này thường gặp trong lần biên dịch đầu tiên.

    Một số dự án git lớn có thể tạo ra lỗi này. Trong các trường hợp đó, hãy sao chép dự án theo cách thủ công:

cd <workspace_path>/downloads/git2/
        git clone --bare --mirror https://<url>/<project-name>.git <workspace_path>/downloads/git2/<local-name>.git
        touch <workspace_path>/downloads/git2/<local-name>.git.done
        Copy to clipboard

    Ví dụ: khi lệnh `do_fetch` không thành công cho `qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git`, hãy chạy lệnh sau:

git clone --bare --mirror https://qpm-git.qualcomm.com/home2/git/revision-history/qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git <workspace_path>/downloads/git2/qpm-git.qualcomm.com.home2.git.revision-history.qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git
        touch <workspace_path>/downloads/git2/qpm-git.qualcomm.com.home2.git.revision-history.qualcomm_linux-spf-1-0-le-qclinux-1-0-r1_api-linux_history_prebuilts.git.done
        Copy to clipboard

    Sau khi tạo tệp `.done`, hãy tiếp tục với lệnh `bitbake <image recipe>`. Sau khi hoàn tất biên dịch lần đầu, bạn nên thiết lập [thư mục tải xuống](https://docs.yoctoproject.org/4.0.16/singleindex.html#term-DL_DIR) của riêng mình.
- “make[4]: /bin/sh: Argument list too long”

    Lỗi này xảy ra khi đường dẫn của không gian làm việc vượt quá 90 ký tự. Hãy rút gọn đường dẫn không gian làm việc để tránh lỗi này.
- “kernel-source/arch/arm64/boot/dts/qcom/qcm6490-idp.dts:8:10: fatal error: dt-bindings/iio/qcom,spmi-adc7-pmk8350.h: No such file or directory”

    Tệp `qcom,spmi-adc7-pmk8350.h` là một phần trong mã nguồn của kernel `<kernel-src>/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h`.

    1. Kiểm tra không gian làm việc để tìm tệp này và khởi tạo môi trường để chọn tệp này. Trong khi biên dịch dtbs, hệ thống biên dịch của kernel sẽ chạy bộ tiền xử lý GCC để thay thế các macro trong tệp dts theo định nghĩa tương ứng. Đường dẫn đã đề cập là một trong những nơi có  lệnh `include`.
    2. Hãy kiểm tra xem bạn đã đặt `core.symlinks` thành `false` trong cấu hình git của mình chưa. Nếu có, hãy đặt thành true:

git config --global core.symlinks true
            Copy to clipboard
- “qpm-git.qualcomm.com.home2.git.revision-history.qualcomm\_linux-spf-1-0-le-qclinux-1-0-r1\_api-linux\_history\_prebuilts.git – progress failed with exit code 128, no output”

    128 là lỗi bao quát và lỗi này cần được phân loại thêm vì có thể là sự cố mạng ở phía bạn hoặc sự cố thực sự khi truy cập Qualcomm hoặc các bản sao lưu chứa mã nguồn gốc (upstream). Để khắc phục lỗi này, hãy xem [BitBake Fetcher Error](https://docs.qualcomm.com/doc/80-70020-254V/topic/troubleshoot_sync_build_and_flash.html#do-fetch-error-1). Bạn có thể phân loại thêm bằng cách làm theo các hướng dẫn sau để xuất log chi tiết trong quá trình tải xuống.

    Theo mặc định, tính năng ghi nhật ký chi tiết không được bật cho lệnh git fetch trong Yocto. Việc bật tính năng ghi nhật ký chi tiết trong git cho tất cả các công thức có thể làm tăng đáng kể thời gian dựng. Bạn chỉ nên bật tính năng này trong các công thức bắt buộc khi cần thiết. Để bật tính năng này cho tất cả các dự án git, hãy chỉnh sửa tệp `local.conf` rồi thay đổi giá trị `BB_GIT_VERBOSE_FETCH` thành **1**. Bạn cũng có thể bật ghi nhật ký chi tiết cho từng công thức. Ví dụ: để bật ghi nhật ký chi tiết và gỡ lỗi lỗi `do_fetch()` trong công thức diag, hãy thực hiện các bước sau:

    1. Chỉnh sửa `layers/meta-qcom-hwe/recipes-bsp/diag/daig_15.0.bb` rồi thêm dòng `BB_GIT_VERBOSE_FETCH = "1"`.
    2. Dọn dẹp cấu phần phần mềm đã tải xuống trước đó bằng cách dùng `bitbake -fc cleanall diag`.
    3. Tải lại mã nguồn bằng cách dùng `bitbake -fc fetch diag`.
    4. Tải xuống với log chi tiết có trong thư mục làm việc của diag recipe `build-qcom-wayland/tmp-glibc/work/qcm6490-qcom-linux/diag/15.0-r0/temp`.
    5. Chia sẻ `log.do_fetch` từ đường dẫn này với nhóm hỗ trợ của Qualcomm.
- “Failed SP Download with error: &lt;&gt; Sp Download failed. ExitCode: 128 Signal: 0 with errorcode 4”

    **Trích dẫn lỗi**

warning: redirecting to https://git-na-ssl.chipcode.qti.qualcomm.com/57f0ec058e47f7a82b2de7b95111c74a/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem.git/
        remote: Counting objects: 129803, done.
        remote: Compressing objects: 100% (114948/114948), done.
        fatal: write error: No space left on device5 GiB | 1.63 MiB/s
        fatal: fetch-pack: invalid index-pack output
        2024-03-02T14:32:18: Sync Command Failed
        [Error]: Failed SP Download with error: 2024-03-02T14:32:18: Sp Download failed. ExitCode: 128 Signal: 0 with errorcode 4
        [Error]: 2024-03-02T14:32:18: Sp Download failed. ExitCode: 128 Signal: 0
        Copy to clipboard

    **Giải pháp**

    Nhật ký lỗi cho biết không có dung lượng trống trên thiết bị “fatal: write error: No space left on device”.

    Hãy dọn dẹp bộ nhớ rồi kích hoạt lại.
- “File “/usr/lib/python3.10/locale.py”, line 620, in setlocale return \_setlocale(category, locale)locale.Error: unsupported locale setting”

    Để khắc phục lỗi này, hãy chạy các lệnh sau và biên dịch lại:

sudo locale-gen en_US.UTF-8
        sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
        export LC_ALL=en_US.UTF-8
        export LANG=en_US.UTF-8
        Copy to clipboard
- “layer directories do not exist build-qcom-wayland/conf/../../layers/meta-qcom-qim-product-sdk”

    Lỗi này xảy ra do một trong những lý do sau:

    - Git clone `meta-qcom-qim-product-sdk` không hoàn tất thành công.
    - Lớp `meta-qcom-qim-product-sdk` không được xuất sang EXTRALAYERS.

    **Trích dẫn lỗi**

xxxx@xxxx:~/github_un/build-qcom-wayland$ bitbake qcom-multimedia-image
        ERROR: The following layer directories do not exist:
        ERROR: <workspace_path>/build-qcom-wayland/conf/../../layers/meta-qcom-qim-product-sdk
        ERROR: Please check BBLAYERS in <workspace_path>/build-qcom-wayland/conf/bblayers.conf
        Copy to clipboard

    **Giải pháp**

    1. Xóa thư mục `build-qcom-wayland`.
    2. Chạy lại các lệnh trong [Dựng ảnh Qualcomm IM SDK](https://docs.qualcomm.com/doc/80-70020-254V/topic/github_workflow_unregistered_users.html#build-qimp-sdk-image-unreg).
- “failed: database disk image is malformed. abort()ing pseudo client by server request”

    Công cụ Pseudo gặp phải sự cố không khớp đường dẫn và cơ sở dữ liệu bị hỏng khi xử lý các hoạt động của hệ thống tệp. Khi Pseudo mô phỏng các hoạt động của hệ thống tệp trong dự án Yocto, có thể xảy ra sự cố khi xử lý đường dẫn tệp và quyền.

    Đây là lỗi đã biết trong [cộng đồng Yocto](https://wiki.yoctoproject.org/wiki/Pseudo_Abort).

    **Giải pháp**

    Chạy các lệnh sau:

rm -rf <workspace_path>/build-qcom-robotics-ros2-humble/tmp-glibc
        bitbake -c cleanall pseudo-native & bitbake pseudo-native
        ../qirp-build qcom-robotics-full-image
        Copy to clipboard
- “pyinotify.WatchManagerError: No space left on device (ENOSPC)”

    Việc biên dịch gây ra lỗi này.

    **Giải pháp**

    Chạy các lệnh sau:

sudo su
        echo 1048576 > /proc/sys/fs/inotify/max_user_watches
        Copy to clipboard

## Flash

Không có lỗi đã biết nào.

Last Published: Dec 23, 2025

[Previous Topic
Flash ảnh phần mềm](https://docs.qualcomm.com/bundle/publicresource/80-70020-254V/topics/flash_images.md) [Next Topic
Cách thức](https://docs.qualcomm.com/bundle/publicresource/80-70020-254V/topics/how_to.md)