|
6 | 6 | - [Bionic Beaver](#bionic-beaver)
|
7 | 7 | - [Disco Dingo](#disco-dingo)
|
8 | 8 | - [Sysbox Installation Problems](#sysbox-installation-problems)
|
9 |
| -- [Sysbox Logs](#sysbox-logs) |
10 |
| - - [sysbox-mgr and sysbox-fs](#sysbox-mgr-and-sysbox-fs) |
11 |
| - - [sysbox-runc](#sysbox-runc) |
12 |
| -- [Docker reports Unknown Runtime error](#docker-reports-unknown-runtime-error) |
13 |
| -- [Bind Mount Permissions Error](#bind-mount-permissions-error) |
14 | 9 | - [Ubuntu Shiftfs Module Not Present](#ubuntu-shiftfs-module-not-present)
|
15 | 10 | - [Unprivileged User Namespace Creation Error](#unprivileged-user-namespace-creation-error)
|
| 11 | +- [Docker reports Unknown Runtime error](#docker-reports-unknown-runtime-error) |
| 12 | +- [Bind Mount Permissions Error](#bind-mount-permissions-error) |
16 | 13 | - [Failed to Setup Docker Volume Manager Error](#failed-to-setup-docker-volume-manager-error)
|
| 14 | +- [Failed to stat mount source at /var/lib/sysboxfs](#failed-to-stat-mount-source-at-varlibsysboxfs) |
| 15 | +- [Failed to register with sysbox-mgr](#failed-to-register-with-sysbox-mgr) |
| 16 | +- [Sysbox Logs](#sysbox-logs) |
| 17 | + - [sysbox-mgr and sysbox-fs](#sysbox-mgr-and-sysbox-fs) |
| 18 | + - [sysbox-runc](#sysbox-runc) |
17 | 19 |
|
18 | 20 | ## Upgrading the Ubuntu Kernel
|
19 | 21 |
|
@@ -106,29 +108,58 @@ sysbox.service loaded active exited Sysbox General Ser
|
106 | 108 | The sysbox.service is ephemeral (it exits once it launches the other sysbox services),
|
107 | 109 | so the `active exited` status above is expected.
|
108 | 110 |
|
109 |
| -## Sysbox Logs |
| 111 | +## Ubuntu Shiftfs Module Not Present |
110 | 112 |
|
111 |
| -### sysbox-mgr and sysbox-fs |
| 113 | +When creating a system container, the following error indicates that |
| 114 | +the Ubuntu shiftfs module is required by Sysbox but is not loaded |
| 115 | +in the Linux kernel: |
112 | 116 |
|
113 |
| -The Sysbox daemons (i.e. sysbox-fs and sysbox-mgr) will log |
114 |
| -information related to their activities in the |
115 |
| -`/var/log/sysbox-fs.log` and `/var/log/sysbox-mgr.log` files |
116 |
| -respectively. These logs should be useful during troubleshooting |
117 |
| -exercises. |
| 117 | +```console |
| 118 | +# docker run --runtime=sysbox-runc -it debian:latest |
| 119 | +docker: Error response from daemon: OCI runtime create failed: container requires user-ID shifting but error was found: shiftfs module is not loaded in the kernel. Update your kernel to include shiftfs module or enable Docker with userns-remap. Refer to the Sysbox troubleshooting guide for more info: unknown |
| 120 | +``` |
118 | 121 |
|
119 |
| -### sysbox-runc |
| 122 | +The error likely means you are running Sysbox on an older Ubuntu |
| 123 | +kernel, as newer Ubuntu kernels come with shiftfs. |
120 | 124 |
|
121 |
| -For sysbox-runc, logging is handled as follows: |
| 125 | +The Ubuntu shiftfs module is required when Sysbox is configured in |
| 126 | +[exclusive userns-remap mode](usage.md#exclusive-userns-remap-mode) |
| 127 | +(it's default operating mode). |
122 | 128 |
|
123 |
| -- When running Docker + sysbox-runc, the sysbox-runc logs are actually stored in |
124 |
| - a containerd directory such as: |
| 129 | +You can work-around this error by either: |
125 | 130 |
|
126 |
| - `/run/containerd/io.containerd.runtime.v1.linux/moby/<container-id>/log.json` |
| 131 | +- Updating your Linux distro. See [here](../README.md#supported-linux-distros) |
| 132 | + for the list of Linux distros supported by Sysbox, and |
| 133 | + [here](#upgrading-the-ubuntu-kernel) for recommendations on how to |
| 134 | + update the distro. |
127 | 135 |
|
128 |
| - where `<container-id>` is the container ID returned by Docker. |
| 136 | +or |
129 | 137 |
|
130 |
| -- When running sysbox-runc directly, sysbox-runc will not produce any logs by default. |
131 |
| - Use the `sysbox-runc --log` option to change this. |
| 138 | +- Configuring Sysbox in docker userns-remap mode, as described |
| 139 | + [here](usage.md#system-container-isolation-modes). This |
| 140 | + mode does not require use of shiftfs. |
| 141 | + |
| 142 | +## Unprivileged User Namespace Creation Error |
| 143 | + |
| 144 | +When creating a system container, Docker may report the following error: |
| 145 | + |
| 146 | +```console |
| 147 | +docker run --runtime=sysbox-runc -it ubuntu:latest |
| 148 | +docker: Error response from daemon: OCI runtime create failed: host is not configured properly: kernel is not configured to allow unprivileged users to create namespaces: /proc/sys/kernel/unprivileged_userns_clone: want 1, have 0: unknown. |
| 149 | +``` |
| 150 | + |
| 151 | +This means that the host's kernel is not configured to allow unprivileged users |
| 152 | +to create user namespaces. |
| 153 | + |
| 154 | +For Ubuntu, fix this with: |
| 155 | + |
| 156 | +```console |
| 157 | +sudo sh -c "echo 1 > /proc/sys/kernel/unprivileged_userns_clone" |
| 158 | +``` |
| 159 | + |
| 160 | +**Note:** The Sysbox package installer automatically executes this |
| 161 | +instruction, so normally there is no need to do this configuration |
| 162 | +manually. |
132 | 163 |
|
133 | 164 | ## Docker reports Unknown Runtime error
|
134 | 165 |
|
@@ -180,77 +211,98 @@ system container to a non-root user on the host.
|
180 | 211 | Refer to [System Container Bind Mount Requirements](usage.md#system-container-bind-mount-requirements) for
|
181 | 212 | info on how to set the correct permissions on the bind mount.
|
182 | 213 |
|
183 |
| -## Ubuntu Shiftfs Module Not Present |
| 214 | +## Failed to Setup Docker Volume Manager Error |
184 | 215 |
|
185 |
| -When creating a system container, the following error indicates that |
186 |
| -the Ubuntu shiftfs module is required by Sysbox but is not loaded |
187 |
| -in the Linux kernel: |
| 216 | +When creating a system container, Docker may report the following error: |
188 | 217 |
|
189 | 218 | ```console
|
190 |
| -# docker run --runtime=sysbox-runc -it debian:latest |
191 |
| -docker: Error response from daemon: OCI runtime create failed: container requires user-ID shifting but error was found: shiftfs module is not loaded in the kernel. Update your kernel to include shiftfs module or enable Docker with userns-remap. Refer to the Sysbox troubleshooting guide for more info: unknown |
| 219 | +docker run --runtime=sysbox-runc -it ubuntu:latest |
| 220 | +docker: Error response from daemon: OCI runtime create failed: failed to setup docker volume manager: host dir for docker store /var/lib/sysbox/docker can't be on ..." |
192 | 221 | ```
|
193 | 222 |
|
194 |
| -The error likely means you are running Sysbox on an older Ubuntu |
195 |
| -kernel, as newer Ubuntu kernel come with shiftfs. |
| 223 | +This means that Sysbox's `/var/lib/sysbox` directory is on a |
| 224 | +filesystem not supported by Sysbox. |
196 | 225 |
|
197 |
| -The Ubuntu shiftfs module is required when Sysbox is configured in |
198 |
| -[exclusive userns-remap mode](usage.md#exclusive-userns-remap-mode) |
199 |
| -(it's default operating mode). |
| 226 | +This directory must be on one of the following filesystems: |
200 | 227 |
|
201 |
| -You can work-around this error by either: |
| 228 | +- ext4 |
| 229 | +- btrfs |
202 | 230 |
|
203 |
| -- Updating your Linux distro. See |
204 |
| - [here](../README.md#supported-linux-distros) for the list of Linux |
205 |
| - distros supported by Sysbox, and [here](#upgrading-the-ubuntu-kernel) |
206 |
| - for recommendations on how to update the distro. |
| 231 | +The same requirement applies to the `/var/lib/docker` directory. |
207 | 232 |
|
208 |
| -or |
| 233 | +This is normally the case for vanilla Ubuntu installations, so this |
| 234 | +error is not common. |
209 | 235 |
|
210 |
| -- Configuring Sysbox in docker userns-remap mode, as described |
211 |
| - [here](usage.md#system-container-isolation-modes). This |
212 |
| - mode does not require use of shiftfs. |
| 236 | +## Failed to stat mount source at /var/lib/sysboxfs |
213 | 237 |
|
214 |
| -## Unprivileged User Namespace Creation Error |
| 238 | +While creating a system container, Docker may report the following error: |
215 | 239 |
|
216 |
| -When creating a system container, Docker may report the following error: |
| 240 | +```console |
| 241 | +$ docker run --runtime=sysbox-runc -it alpine |
| 242 | +docker: Error response from daemon: OCI runtime create failed: failed to create lib container mount: failed to stat mount source at /var/lib/sysboxfs/proc/sys: stat /var/lib/sysboxfs/proc/sys: no such file or directory: unknown. |
| 243 | +``` |
| 244 | + |
| 245 | +This likely means that the sysbox-fs daemon is not running (for some reason). |
| 246 | + |
| 247 | +Check if the sysbox-fs process is running via `ps`. Ideally it should look like this: |
217 | 248 |
|
218 | 249 | ```console
|
219 |
| -docker run --runtime=sysbox-runc -it ubuntu:latest |
220 |
| -docker: Error response from daemon: OCI runtime create failed: host is not configured properly: kernel is not configured to allow unprivileged users to create namespaces: /proc/sys/kernel/unprivileged_userns_clone: want 1, have 0: unknown. |
| 250 | +$ ps -fu root | grep sysbox |
| 251 | +root 23945 1 0 Nov12 pts/0 00:00:00 sysbox-fs --log-level=debug --log /dev/stdout |
| 252 | +root 23946 1 0 Nov12 pts/0 00:00:00 sysbox-mgr --log-level=debug --log /dev/stdout |
221 | 253 | ```
|
222 | 254 |
|
223 |
| -This means that the host's kernel is not configured to allow unprivileged users |
224 |
| -to create user namespaces. |
| 255 | +If sysbox-fs is missing from the `ps` output, stop and restart Sysbox via Systemd: |
225 | 256 |
|
226 |
| -For Ubuntu, fix this with: |
| 257 | +```console |
| 258 | +$ sudo systemctl restart sysbox |
| 259 | +``` |
| 260 | + |
| 261 | +## Failed to register with sysbox-mgr |
| 262 | + |
| 263 | +While creating a system container, Docker may report the following error: |
227 | 264 |
|
228 | 265 | ```console
|
229 |
| -sudo sh -c "echo 1 > /proc/sys/kernel/unprivileged_userns_clone" |
| 266 | +$ docker run --runtime=sysbox-runc -it alpine |
| 267 | +docker: Error response from daemon: OCI runtime create failed: failed to register with sysbox-mgr: failed to invoke Register via grpc: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial unix /run/sysbox/sysmgr.sock: connect: connection refused": unknown. |
230 | 268 | ```
|
231 | 269 |
|
232 |
| -**Note:** The Sysbox package installer automatically executes this |
233 |
| -instruction, so normally there is no need to do this configuration |
234 |
| -manually. |
| 270 | +This likely means that the sysbox-mgr daemon is not running (for some reason). |
235 | 271 |
|
236 |
| -## Failed to Setup Docker Volume Manager Error |
| 272 | +Check if the sysbox-mgr process is running via `ps`. Ideally it should look like this: |
237 | 273 |
|
238 |
| -When creating a system container, Docker may report the following error: |
| 274 | +```console |
| 275 | +$ ps -fu root | grep sysbox |
| 276 | +root 23945 1 0 Nov12 pts/0 00:00:00 sysbox-fs --log-level=debug --log /dev/stdout |
| 277 | +root 23946 1 0 Nov12 pts/0 00:00:00 sysbox-mgr --log-level=debug --log /dev/stdout |
| 278 | +``` |
| 279 | + |
| 280 | +If sysbox-mgr is missing from the `ps` output, stop and restart Sysbox via Systemd: |
239 | 281 |
|
240 | 282 | ```console
|
241 |
| -docker run --runtime=sysbox-runc -it ubuntu:latest |
242 |
| -docker: Error response from daemon: OCI runtime create failed: failed to setup docker volume manager: host dir for docker store /var/lib/sysbox/docker can't be on ..." |
| 283 | +$ sudo systemctl restart sysbox |
243 | 284 | ```
|
244 | 285 |
|
245 |
| -This means that Sysbox's `/var/lib/sysbox` directory is on a |
246 |
| -filesystem not supported by Sysbox. |
| 286 | +## Sysbox Logs |
247 | 287 |
|
248 |
| -This directory must be on one of the following filesystems: |
| 288 | +### sysbox-mgr and sysbox-fs |
249 | 289 |
|
250 |
| -- ext4 |
251 |
| -- btrfs |
| 290 | +The Sysbox daemons (i.e. sysbox-fs and sysbox-mgr) will log |
| 291 | +information related to their activities in the |
| 292 | +`/var/log/sysbox-fs.log` and `/var/log/sysbox-mgr.log` files |
| 293 | +respectively. These logs should be useful during troubleshooting |
| 294 | +exercises. |
252 | 295 |
|
253 |
| -The same requirement applies to the `/var/lib/docker` directory. |
| 296 | +### sysbox-runc |
254 | 297 |
|
255 |
| -This is normally the case for vanilla Ubuntu installations, so this |
256 |
| -error is not common. |
| 298 | +For sysbox-runc, logging is handled as follows: |
| 299 | + |
| 300 | +- When running Docker + sysbox-runc, the sysbox-runc logs are actually stored in |
| 301 | + a containerd directory such as: |
| 302 | + |
| 303 | + `/run/containerd/io.containerd.runtime.v1.linux/moby/<container-id>/log.json` |
| 304 | + |
| 305 | + where `<container-id>` is the container ID returned by Docker. |
| 306 | + |
| 307 | +- When running sysbox-runc directly, sysbox-runc will not produce any logs by default. |
| 308 | + Use the `sysbox-runc --log` option to change this. |
0 commit comments