I received the following error when trying to run ...
# ask-ai
j
I received the following error when trying to run the
abctl local install
command for the first time. What can I do to correct this issue?
Copy code
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x2980c36]

goroutine 1 [running]:
<http://github.com/airbytehq/abctl/internal/cmd/local.portAvailable.func1()|github.com/airbytehq/abctl/internal/cmd/local.portAvailable.func1()>
	<http://github.com/airbytehq/abctl/internal/cmd/local/check.go:86|github.com/airbytehq/abctl/internal/cmd/local/check.go:86> +0x16
<http://github.com/airbytehq/abctl/internal/cmd/local.portAvailable({0x322c980|github.com/airbytehq/abctl/internal/cmd/local.portAvailable({0x322c980>, 0xc00038a190}, 0x1f40)
	<http://github.com/airbytehq/abctl/internal/cmd/local/check.go:90|github.com/airbytehq/abctl/internal/cmd/local/check.go:90> +0x37f
<http://github.com/airbytehq/abctl/internal/cmd/local.NewCmdInstall.func1(0xc00061a908|github.com/airbytehq/abctl/internal/cmd/local.NewCmdInstall.func1(0xc00061a908>, {0x2986ddc?, 0x4?, 0x2986dc0?})
	<http://github.com/airbytehq/abctl/internal/cmd/local/local_install.go:66|github.com/airbytehq/abctl/internal/cmd/local/local_install.go:66> +0x36e
<http://github.com/spf13/cobra.(*Command).execute(0xc00061a908|github.com/spf13/cobra.(*Command).execute(0xc00061a908>, {0x4389c60, 0x0, 0x0})
	<http://github.com/spf13/cobra@v1.8.0/command.go:968|github.com/spf13/cobra@v1.8.0/command.go:968> +0xa44
<http://github.com/spf13/cobra.(*Command).ExecuteC(0xc00061a008)|github.com/spf13/cobra.(*Command).ExecuteC(0xc00061a008)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1115|github.com/spf13/cobra@v1.8.0/command.go:1115> +0x3ff
<http://github.com/spf13/cobra.(*Command).Execute(...)|github.com/spf13/cobra.(*Command).Execute(...)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1039|github.com/spf13/cobra@v1.8.0/command.go:1039>
<http://github.com/spf13/cobra.(*Command).ExecuteContext(...)|github.com/spf13/cobra.(*Command).ExecuteContext(...)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1032|github.com/spf13/cobra@v1.8.0/command.go:1032>
<http://github.com/airbytehq/abctl/internal/cmd.Execute({0x322c980|github.com/airbytehq/abctl/internal/cmd.Execute({0x322c980>?, 0xc00038a190?}, 0x77359400?)
	<http://github.com/airbytehq/abctl/internal/cmd/cmd.go:41|github.com/airbytehq/abctl/internal/cmd/cmd.go:41> +0x4f
main.main()
	<http://github.com/airbytehq/abctl/main.go:45|github.com/airbytehq/abctl/main.go:45> +0x1a7
k
The error message you're seeing is a segmentation violation error, which is a specific type of error that occurs when a program tries to access a memory location that it's not allowed to access. This could be due to a variety of reasons, such as a bug in the program or an issue with your system's configuration. Based on the knowledge sources provided, it seems that other users have encountered similar issues when running
abctl local install
on Mac systems ([source](https://github.com/airbytehq/airbyte/issues/40745)). In some cases, the issue was introduced in a specific version of
abctl
and was not present in earlier versions. Here are a few steps you can take to troubleshoot this issue: 1. Check your
abctl
version
: Run
abctl version
to check the version of
abctl
you're using. If you're using a version that's known to have this issue (e.g., v0.5.0 or later), you might consider downgrading to an earlier version. 2. Reinstall
abctl
: Uninstall and then reinstall
abctl
using the instructions provided in the [Airbyte documentation](https://docs.airbyte.com/using-airbyte/getting-started/oss-quickstart#1-install-abctl). This can help ensure that you have a clean, up-to-date installation of
abctl
. 3. Check your system's configuration: Make sure that your system meets the requirements for running
abctl
. This includes having a compatible operating system and processor architecture, as well as having Docker installed and properly configured. If none of these steps resolve the issue, I would recommend reaching out to the Airbyte community for further assistance. You can do this by opening a new issue in the [Airbyte GitHub repository](https://github.com/airbytehq/airbyte/issues). Be sure to include all relevant information, including the error message you're seeing and the steps you've taken to troubleshoot the issue.
j
@kapa.ai what is the brew command to downgrade to abctl version 0.5.0
k
New message text here
j
@kapa.ai How do I install abctl version 0.5.0 with brew
k
A message from kapa.ai
New message text here
c
@Jake Duckworth Do you happen to have the rest of the console output from this failed run?
j
@Cole Snodgrass (Airbyte) Here is all the console output I get back:
Copy code
(⎈|docker-desktop:default)user@machine airbyte % abctl local install
  INFO    Using Kubernetes provider:
            Provider: kind
            Kubeconfig: /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig
            Context: kind-airbyte-abctl
 SUCCESS  Found Docker installation: version 27.0.3
 SUCCESS  Port 8000 appears to be available
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7b03c36]

goroutine 1 [running]:
<http://github.com/airbytehq/abctl/internal/cmd/local.portAvailable.func1()|github.com/airbytehq/abctl/internal/cmd/local.portAvailable.func1()>
	<http://github.com/airbytehq/abctl/internal/cmd/local/check.go:86|github.com/airbytehq/abctl/internal/cmd/local/check.go:86> +0x16
<http://github.com/airbytehq/abctl/internal/cmd/local.portAvailable({0x83af980|github.com/airbytehq/abctl/internal/cmd/local.portAvailable({0x83af980>, 0xc000558460}, 0x1f40)
	<http://github.com/airbytehq/abctl/internal/cmd/local/check.go:90|github.com/airbytehq/abctl/internal/cmd/local/check.go:90> +0x37f
<http://github.com/airbytehq/abctl/internal/cmd/local.NewCmdInstall.func1(0xc000489508|github.com/airbytehq/abctl/internal/cmd/local.NewCmdInstall.func1(0xc000489508>, {0x7b09ddc?, 0x4?, 0x7b09dc0?})
	<http://github.com/airbytehq/abctl/internal/cmd/local/local_install.go:66|github.com/airbytehq/abctl/internal/cmd/local/local_install.go:66> +0x36e
<http://github.com/spf13/cobra.(*Command).execute(0xc000489508|github.com/spf13/cobra.(*Command).execute(0xc000489508>, {0x950cc60, 0x0, 0x0})
	<http://github.com/spf13/cobra@v1.8.0/command.go:968|github.com/spf13/cobra@v1.8.0/command.go:968> +0xa44
<http://github.com/spf13/cobra.(*Command).ExecuteC(0xc000488608)|github.com/spf13/cobra.(*Command).ExecuteC(0xc000488608)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1115|github.com/spf13/cobra@v1.8.0/command.go:1115> +0x3ff
<http://github.com/spf13/cobra.(*Command).Execute(...)|github.com/spf13/cobra.(*Command).Execute(...)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1039|github.com/spf13/cobra@v1.8.0/command.go:1039>
<http://github.com/spf13/cobra.(*Command).ExecuteContext(...)|github.com/spf13/cobra.(*Command).ExecuteContext(...)>
	<http://github.com/spf13/cobra@v1.8.0/command.go:1032|github.com/spf13/cobra@v1.8.0/command.go:1032>
<http://github.com/airbytehq/abctl/internal/cmd.Execute({0x83af980|github.com/airbytehq/abctl/internal/cmd.Execute({0x83af980>?, 0xc000558460?}, 0x77359400?)
	<http://github.com/airbytehq/abctl/internal/cmd/cmd.go:41|github.com/airbytehq/abctl/internal/cmd/cmd.go:41> +0x4f
main.main()
	<http://github.com/airbytehq/abctl/main.go:45|github.com/airbytehq/abctl/main.go:45> +0x1a7
c
thankyou - I think I found the problem, PR that fixes it
This appears to be a problem related to the default port used by
abctl
(port
8000
) and it already being in use on your host. If you specify a different port (via
--port
), I think you’ll be able to get around this panic (until this PR if merged and returns a friendlier error).
j
@Cole Snodgrass (Airbyte) @kapa.ai Thanks!! That got me a step further. Unfortunately I am running into another issue now creating the
airbyte-abctl
cluster. Here is the full error:
Copy code
(⎈|docker-desktop:default)user@machine airbyte % abctl local install --port=9000
  INFO    Using Kubernetes provider:
            Provider: kind
            Kubeconfig: /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig
            Context: kind-airbyte-abctl
 SUCCESS  Found Docker installation: version 27.0.3
 SUCCESS  Port 9000 appears to be available
  INFO    No existing cluster found, cluster 'airbyte-abctl' will be created
  ERROR   Cluster 'airbyte-abctl' could not be created
  ERROR   unable to create kind cluster: command "docker run --name airbyte-abctl-control-plane --hostname airbyte-abctl-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=airbyte-abctl --net kind --restart=on-failure:1 --init=false --cgroupns=private --volume=/Users/jakeduckworth/.airbyte/abctl/data:/var/local-path-provisioner --publish=0.0.0.0:9000:80/TCP --publish=127.0.0.1:53968:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8" failed with error: exit status 126
k
A message from kapa.ai
The error message you're seeing indicates that the command to create the
airbyte-abctl
cluster using Docker has failed. This could be due to a variety of reasons such as Docker not running, insufficient permissions, or issues with the Docker command itself. Here are a few things you can try: 1. Ensure Docker is running: You can check this by running
docker info
in your terminal. If Docker is not running, you'll need to start it. 2. Check Docker permissions: Ensure that the user running the
abctl local install
command has the necessary permissions to execute Docker commands. 3. Check Docker command: The error message shows that the Docker command to create the cluster has failed. You could try running the command separately in your terminal to see if it provides any additional error information. If none of these steps resolve your issue, I would recommend reporting this as a bug on the [Airbyte GitHub issues page](https://github.com/airbytehq/airbyte/issues) with the type of
🐛 [abctl] Report an issue with the abctl tool
. Be sure to include all relevant information including the error message, your operating system, Docker version, and
abctl
version. For additional help, you can also check out the [Airbyte community support channels](https://docs.airbyte.com/using-airbyte/getting-started/oss-quickstart#troubleshooting) such as the GitHub Airbyte Forum, Airbyte Knowledge Base, and the Community Slack.
j
@Cole Snodgrass (Airbyte) I had the
docker-compose
version installed before. I did verify that there were no containers, images or volumes left over from that installation in case there was some conflict there.
c
could you run the following command directly on your command line and tell me what it returns (this is the docker command that failed above)
Copy code
docker run --name airbyte-abctl-control-plane --hostname airbyte-abctl-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=airbyte-abctl --net kind --restart=on-failure:1 --init=false --cgroupns=private --volume=/Users/jakeduckworth/.airbyte/abctl/data:/var/local-path-provisioner --publish=0.0.0.0:9000:80/TCP --publish=127.0.0.1:53968:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8
j
@Cole Snodgrass (Airbyte) Here is the error:
Copy code
docker: Error response from daemon: error while creating mount source path '/host_mnt/Users/jakeduckworth/.airbyte/abctl/data': mkdir /host_mnt/Users/jakeduckworth/.airbyte/abctl: permission denied.
Do I need to run with sudo?
c
You shouldn’t need to. Is
/host_mnt/Users/jakeduckworth/
the correct user-home for the user running
abctl
?
j
No, it looks like it is:
Copy code
% echo $HOME
/Users/jakeduckworth
c
most interesting
🤣 1
Would you happen to have
go
installed on your machine?
j
Yes, looks the
brew install abctl
command installed it:
Copy code
% brew info go
==> go: stable 1.22.5 (bottled), HEAD
Open source programming language to build simple/reliable/efficient software
<https://go.dev/>
Installed
/usr/local/Cellar/go/1.22.5 (12,869 files, 254.2MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-07-18 at 14:58:50
From: <https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/go.rb>
License: BSD-3-Clause
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 86,189 (30 days), 260,134 (90 days), 1,101,610 (365 days)
install-on-request: 61,329 (30 days), 184,329 (90 days), 808,835 (365 days)
build-error: 147 (30 days)
c
If you wouldn’t mind running a a little script for me, to help figure out what is going on here. Create a file called
/tmp/home.go
(or where-ever your tmp directory is located) and put the following code into that file
Copy code
package main

import (
	"fmt"
	"os"
)

func main() {
	h, _ := os.UserHomeDir()
	fmt.Println(h)
}
Then from the command line run
go run /tmp/home.go
and tell me what it returns.
j
Here you go:
Copy code
% go run ./home.go
/Users/jakeduckworth
c
most interesting most interesting
Thank you, I need to figure out where the
/host_mnt
prefix is coming from.
While I dig a little deeper into this, I’m curious if you pre-created that directory if it would resolve this problem (as a temporary work-around):
Copy code
mkdir -p ~/.airbyte/abctl/data
chmod 777 ~/.airbyte/abctl/data
j
That seems to have gotten me a little further:
Copy code
INFO    Using Kubernetes provider:
            Provider: kind
            Kubeconfig: /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig
            Context: kind-airbyte-abctl
 SUCCESS  Found Docker installation: version 27.0.3
 SUCCESS  Port 9000 appears to be available
 SUCCESS  Existing cluster 'airbyte-abctl' found
 WARNING  Unable to determine which port the existing cluster was configured to use.
          Installation will continue but may ultimately fail, in which case it will be necessarily to uninstall first.
 SUCCESS  Cluster 'airbyte-abctl' validation complete
  ERROR   Failed to initialize 'local' command
  ERROR   could not initialize local command: error communicating with kubernetes: could not create rest config: stat /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig: no such file or directory

  INFO    An error occurred while communicating with the Kubernetes cluster.
          If this error persists, you may need to run the uninstall command before attempting to run
          the install command again.
c
run
abctl local uninstall
and then
abctl local install
I think, due to the directory permission issue, you ended up with a partial installation.
j
hmm.. weird things still afoot.. • run uninstall
Copy code
INFO    Using Kubernetes provider:
            Provider: kind
            Kubeconfig: /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig
            Context: kind-airbyte-abctl
 SUCCESS  Found Docker installation: version 27.0.3
 SUCCESS  Existing cluster 'airbyte-abctl' found
 WARNING  Failed to initialize 'local' command
          Uninstallation attempt will continue
 SUCCESS  Uninstallation of cluster 'airbyte-abctl' completed successfully
 SUCCESS  Airbyte uninstallation complete
• When I run the install, I'm back to this error:
Copy code
INFO    Using Kubernetes provider:
            Provider: kind
            Kubeconfig: /Users/jakeduckworth/.airbyte/abctl/abctl.kubeconfig
            Context: kind-airbyte-abctl
 SUCCESS  Found Docker installation: version 27.0.3
 SUCCESS  Port 9000 appears to be available
  INFO    No existing cluster found, cluster 'airbyte-abctl' will be created
  ERROR   Cluster 'airbyte-abctl' could not be created
  ERROR   unable to create kind cluster: command "docker run --name airbyte-abctl-control-plane --hostname airbyte-abctl-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=airbyte-abctl --net kind --restart=on-failure:1 --init=false --cgroupns=private --volume=/Users/jakeduckworth/.airbyte/abctl/data:/var/local-path-provisioner --publish=0.0.0.0:9000:80/TCP --publish=127.0.0.1:61643:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8" failed with error: exit status 126
I validated the folder still exists:
Copy code
% sudo ls ~/.airbyte/abctl/
data
Running
chmod 777 ~/.airbyte/abctl/data
then trying again results in the same message as above..
noted 1
c
does the following command still return the error about the data directory
Copy code
docker run --name airbyte-abctl-control-plane --hostname airbyte-abctl-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --label io.x-k8s.kind.cluster=airbyte-abctl --net kind --restart=on-failure:1 --init=false --cgroupns=private --volume=/Users/jakeduckworth/.airbyte/abctl/data:/var/local-path-provisioner --publish=0.0.0.0:9000:80/TCP --publish=127.0.0.1:61643:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8
j
Yes:
Copy code
docker: Error response from daemon: error while creating mount source path '/host_mnt/Users/jakeduckworth/.airbyte/abctl/data': mkdir /host_mnt/Users/jakeduckworth/.airbyte/abctl: permission denied.
c
I’m about to push out release
v0.8.1
which will include a fix for the first issue you ran into. I’m still looking into what is causing the
/host_mnt
problem.
🎉 1
j
If I run the
mkdir
and
chmod
commands manually then re-run the
docker run
, I get this message:
Copy code
docker: Error response from daemon: Conflict. The container name "/airbyte-abctl-control-plane" is already in use by container "6fb6e602d3709d5bea6f254b3d6fd26231dcff39da9aaba8c2cc6b4c7d5b315d". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
BTW, I really appreciate your help 😄
c
You’re welcome. Trying to make this tool as bullet-proof as possible. Always interesting to see how things break when they are executed out in the wild.
j
I like it so far!! I ran into some API and TF issues when testing that needs to be fixed, but I think we are going to try and implement it here 😄
I'm a good blank slate to test stuff.. haha
and I'm happy to help you work the kinks out 😉
c
What OS are you running on?
j
Version Info ------------------------------ macOS Sonoma: 14.5 Docker Desktop: 4.32.0 Docker: 27.0.3 abctl: 0.8.0
I have to bounce.. I'll ping you tomorrow when I am back online.
👍🏻 1
@Cole Snodgrass (Airbyte) Yoyo.. I upgraded
abctl
this AM and that initial error is gone as expected 😄 Now it makes it to the
error while creating mount source path
error we were looking into yesterday. I added the folder manually and grant it the appropriate permissions. When I then try to run the docker command again, I get this error _(it is likely a red herring though)_:
Copy code
docker: Error response from daemon: Conflict. The container name "/airbyte-abctl-control-plane" is already in use by container "a6d1abb5b58c8fd93d2bc52c02850db1e810ca2b618e268c28be402961547049". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Not sure how the code base is related, if at all, but the
docker-compose
setup does run successfully.
a
I also tried to install on an Apple Silicon Mac via abctl yesterday/today and ran into kind cluster issues. Repeatedly after running
abctl local install
i get this error. I also previously ran it with docker-compose and the run-ab-platform script in the past.
Copy code
unable to create kind cluster: failed to init node with kubeadm: command "docker exec --privileged airbyte-abctl-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1
👍🏻 1
a
Any updates to this thread? I am running abctl v0.8.2 and running into the same
host_mnt
permission error when I run the
docker run
cmd.
c
I’m still trying to create a repo case for this problem. Unfortunately I, nor anyone of my colleagues currently experience this permission issue. I just released v0.9.0 that includes some additional features and a lot of additional debug logs (if
-v
is passed to the install command). However
v0.9.0
will probably not fix this permission issue. I am actively working on finding and fixing this issue, any insights into any weird docker configurations/limitations that your machine may have would be appreciated.
a
Happy to help anyway that I can.
Copy code
macOS: Montery v12.7.4
Docker Desktop: 4.30.0
Docker: 26.1.1
abctl: v0.8.2
I don’t think I’ve done anything to my docker configs. They should be out of the box. But if you have any suggestions/questions of what to look for, let me know.
I updated to
abctl v0.9.0
, ran
abctl local install -v
Output ended on this step
Copy code
DEBUG   kind - INFO: Deleted nodes: ["airbyte-abctl-control-plane"]
with the same error message.
Copy code
ERROR   unable to create kind cluster: command "docker run...
c
👍🏻 I wasn’t expecting it to be fixed in that version
a
Yeah, I wasn’t either, just trying to give any info I can with the
-v
flag on the install.
j
I ran the latest version with the
-v
flag and got a new message pointing out that the port I was trying to use was already taken even though the initial status said it was free. I changed the install to use a different port and it installed successfully, May be worth a try:
Copy code
abctl local install  --port=9002
a
abctl local uninstall && abctl local install -v
still fails for me regardless of port. Still seems to be failing on the creation of the kind cluster
Copy code
DEBUG   kind - INFO:  ✗ Starting control-plane 🕹️                                                                                                                                                                                       
  DEBUG   kind - INFO: Deleted nodes: ["airbyte-abctl-control-plane"]                                                                                                                                                                    
  ERROR   Cluster 'airbyte-abctl' could not be created                                                                                                                                                                                   
  ERROR   unable to create kind cluster: failed to init node with kubeadm: command "docker exec --privileged airbyte-abctl-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1
...
... *tried running docker command explicitly and got this, but not sure if that is relevant
❯ docker exec --privileged airbyte-abctl-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6
Error response from daemon: No such container: airbyte-abctl-control-plane
a
Success! I upgraded to 9.1, deleted the existing
kindest/node
image and
airbyte-abctl
container from docker, removed the .airbyte directory, and ran
abctl local install
. I am now up and running.
phew 1