Kitsu connection error (Could not login to Kitsu)

just like this post, I have a Kitsu error:

Seems to be a bunch of issues with Python. but I also have printed my docker log. at the end of it, you can see that it has a hard time logging into Kitsu but it has multiple Python errors. A pastebin to my docker logs

I run in my docker compose ynput/ayon:latest on 1.2.5+202407041703

Hello Hannah,

  • Did you used to work in a previous version ?
  • Is your kitsu addon configured correctly ?
  • Have you updated services to match your kitsu version ?

The error log all seem to boil down to the error: “Could not login to Kitsu (server error)” and then receives connection timeouts (which is either the source of the issue or the result of that issue).

I’d say:

  • Make sure the service has access to the login data for Kitsu
  • Make sure the service can access the Kitsu URL and it is configured correctly.

To be sure, just linking the AYON Kitsu Admin docs for if anyone had missed those.
Also, @Danell seems to always know a thing or two about the Kitsu integration. And if it all boils down to an issue with Kitsu itself, then @frankrousseau could be a good candidate. But I have a feeling this is still in the realm of misconfiguration.

Unfortunately, this page is a little bit old.
It’d be better to check this documentation PR instead.

Also, checking

I think everything I have is up to date! Thanks for checking up ! I solved it thanks to @Sasbom

for future documentation if anyone needs to google it, this was my approach on troubleshooting where the issue could not be.

AYON version: 1.2.5+202407041703
Kitsu version: Kitsu 0.19.45
Kitsu addon version: 1.2.2

Kitsu service:

AYON service account:

AYON secrets: (filled in correctly)

With these credentials I started looking up information:

Docker IPs:

hannah@pipeline-sandbox-1:~$ sudo docker ps -q | xargs -n 1 sudo  docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
 aysvc_kitsu_processor
 ayon-docker-worker-1
172.19.0.8 cgwire-kitsu ## this one doesn´t work when in addon settings
172.19.0.7 cgwire-zou-event
172.19.0.6 cgwire-zou-app
172.19.0.4 cgwire-meilisearch
172.19.0.5 cgwire-redis
172.19.0.3 cgwire-zou-jobs
172.19.0.2 cgwire-db-12
172.18.0.4 ayon-docker-server-1
172.18.0.3 ayon-docker-redis-1
172.18.0.2 ayon-docker-postgres-1

This however definitely meant that I needed to use port 8800, just like how the Docker Compose was set up to be for Kitsu.

ports Kitsu:

hannah@pipeline-sandbox-1:~$ sudo docker ps -a | grep kitsu
4a5fc271595a   ynput/ayon-kitsu-processor:1.2.2                "python -m processor"    6 seconds ago   Up 6 seconds                                                        aysvc_kitsu_processor
1f164c15b178   ghcr.io/emberlightvfx/kitsu-for-docker:latest   "/docker-entrypoint.…"   35 hours ago    Up 34 hours             0.0.0.0:8800->80/tcp, :::8800->80/tcp       cgwire-kitsu

ip adresses local, check comments:

hannah@pipeline-sandbox-1:~$ ip -o addr show | awk '/inet/ {print $4, $3, $2}'
127.0.0.1/8 inet lo
::1/128 inet6 lo
10.128.0.6/32 inet ens4
fe80::4001:aff:fe80:6/64 inet6 ens4
172.17.0.1/16 inet docker0 ### This is what Sas recommended to use
172.18.0.1/16 inet br-d18523104b53
fe80::42:33ff:fe86:8299/64 inet6 br-d18523104b53
172.19.0.1/16 inet br-1d237e6f00ac
fe80::42:24ff:fe5d:89a/64 inet6 br-1d237e6f00ac
fe80::f0e6:bfff:fe9e:a978/64 inet6 vethedd218d
fe80::1485:f6ff:feb2:e1ce/64 inet6 veth430c49f
fe80::64a2:5fff:fe85:7b0d/64 inet6 veth8a1b130
fe80::bc3b:5bff:fefd:cdf2/64 inet6 vethb547bc3
fe80::f8d7:5bff:fea4:87c2/64 inet6 vethdfe679e
fe80::6459:b2ff:fe33:d932/64 inet6 veth96a8c01
fe80::3808:f9ff:fe33:187f/64 inet6 vethf7c4507
fe80::940f:a8ff:fee7:ae30/64 inet6 veth59a0359
fe80::8052:a2ff:fe63:44c9/64 inet6 veth736e3d2
fe80::4021:88ff:fe8b:bc98/64 inet6 veth7c96148

Kitsu addon settings input:

So to make it work, you are supposed to use the IP address of the docker0 instead of the ones from the docker containers themselves.

Could my assumptions be correct that the AYON container has to go to the Kitsu container as if it is accessing it through a layer ´above´ rather than to each other in between? A little doodle to illustrate my idea:

Are you referring to the IP address of the machine that’s running Kitsu and AYON docker containers ?

Will there be a major update to the current integration? If I feel comfortable enough setting it up, I might eventually write documentation for this to be dummy proof including the current information.

Yes,

172.17.0.1/16 inet docker0 ### This is what Sas recommended to use

using this IP above was the trick. What is the reason that I have to use this instead of the docker container IP? (the one below)

172.19.0.8 cgwire-kitsu ## this one doesn´t work when in addon settings

If the Ayon and Kitsu container share an docker network, shouldn’t you just be able to use kitsus hostname? In case you haven’t specified your kitsu IP inside of Docker somewhere it might change and then your syncing will break.

Just to add some more info to the topic: my kitsu instance is behind a reverse proxy so I can access it from anywhere so for my Kitsu URL I have just entered that url and it works flawlessly :slight_smile:

I cannot seem to use the Kitsu IP in the settings inside AYON, that is where the error in the pastebin comes from. I was able to successfully pair so far. I have yet to set up things to see if it syncs well or not. Using your setup, I do see Kitsu specified when I do docker network inspect cgwire but I am not sure if it’s static or not.

After reading the latest posts a bit better, this is how it works with docker networks (I’m writing it extra clear so everyone no matter the amount of knowlage will understand):
You can see each container as its own computer on a network. Each container will get their own IP address that the Docker Bridge provides (You can use the network “host” and then the container will use your computers IP address). You can see the Docker Bridge as a virtual domain host. It takes care of all networking within Docker.

For each container you can specify a network. These networks will get their own sub-network (192.168.XX.0 in my case) and all containers within that network will live under that sub-network (192.168.80.1, 192.168.80.2 etc). As these containers now live under the same sub-network they can access each other with their hostname (this will be the containers name) or their docker-ip.

A container can have multiple networks attached to it. It will use the first networks sub-network-range but it will be able to access all other countainers from the other networks.

For containers outside a network you can only access it through the docker bridge, meaning your computer’s IP address + the published port.

The power of having everything on different networks is that containers only access what they need to access on the network. Eg Ayon doesn’t need to have access my Kitsu’s database but it needs to access the Kitsu webhost and the Kitsu webhost have access to the database.

So if your computer/server that’s running Docker have a static IP on your network or a known hostname you will always be able to access your containers through its ip/hostname + the containers port within other containers. If they share networks you can simply enter the containers hostname and (most of the times) skip any port numbers.

2 Likes

This makes a lot of sense! Thanks :slight_smile: