---
# System prepended metadata

title: 'bitbake: Unable to connect to bitbake server'
tags: [bmc, bug]

---

# bitbake: Unable to connect to bitbake server

##  問題 log 
在使用 devtool 工具時發現跳出以下問題

```bash=
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.313891)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.313891)
NOTE: Retrying server connection (#1)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.313891)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#2)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.314674)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#2)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.314674)
NOTE: Retrying server connection (#2)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.314674)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#3)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.315365)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#3)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.315365)
NOTE: Retrying server connection (#3)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.315365)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#4)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.316041)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#4)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.316041)
NOTE: Retrying server connection (#4)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:16.316041)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#5)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:21.322947)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#5)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:21.322947)
NOTE: Retrying server connection (#5)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:21.322947)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#6)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:26.330417)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#6)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:26.330417)
NOTE: Retrying server connection (#6)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:26.330417)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#7)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:31.336178)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#7)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:31.336178)
NOTE: Retrying server connection (#7)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:31.336178)
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#8)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:36.340256)
ERROR: Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#8)... (Traceback (most recent call last):
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/main.py", line 487, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/mnt/md0/shawn/bronco_mi300x/poky/bitbake/lib/bb/server/process.py", line 678, in connectProcessServer
    sock.connect(os.path.basename(sockname))
BlockingIOError: [Errno 11] Resource temporarily unavailable
, 10:41:36.340256)
ERROR: Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).
```

發現到最後的問題在於 **<font color=#ff0000>ERROR: Unable to connect to bitbake server</font>**。透過 log 輸出可以發現原因在於 bitbake 出問題，因此所有 bitbake 指令或是基於 bitbake 指令的工具都無法使用。

根據上述 log 輸出結果可發現此問題的錯誤編號是 **[Errno 11]**。

## Solution
原因**可能**是因為之前在進行編譯時被打斷，導致 bitbake 被鎖的緣故。

解決方式: 在 build 目錄下找到 bitbake.lock 檔案將它刪除即可。

## Reference
* [[sdx62]bitbake lighttpd出现NOTE: Reconnecting to bitbake server...](https://blog.csdn.net/wgl307293845/article/details/123237168)
