Internalhooks not initialized

Hi, I have an issue with publishing n8n. I have n8n image on Google Cloud’s container registry. When I want to deploy the image to Kubernetes, it shows the following errors, any idea?


Untitled

Hey @Versace, I am sorry to hear you’re having trouble here. Your screenshot seems to show an error occurring when stopping n8n - could you elaborate a bit on the problem you are having with deploying it in the first place?

Are you using a custom image (and if not, which n8n image are you using)? Does this happen only when deploying on k8s or also when testing this locally via docker?

Hi @MutedJam , very sorry for the late reply and thanks for helping me. I’m using the custom image for n8n because I need to write just “COPY .env .” inside the dockerfile.

deploying on k8s gave me that error when I was trying to run the container…
I also tried to run it locally on my laptop afterwards and couldn’t start the container
Here is the steps on what I have done:

  1. git clone n8n to my laptop (success)
  2. run “docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile .” (success creating image)
  3. run “docker container create --name n8n-custom -p 5678:5678 n8n-custom:latest” (success creating container)
  4. starting the container (failed)
    1

Hope it helps

Cheers, I think I haven’t used that custom Dockerfile in ages. I’ll give that a go on my end and will get back to you as soon as I can.

Hi @Versace, I gave this a go on my end and did indeed run into trouble when trying to run an image built under Windows. However, once building the image on Ubuntu via WSL2 it was working fine. Running the container was working as expected on both Windows and Ubuntu/WSL.

Could you give building the image under WSL a go and see if that fixes the problem for you?

Hi @MutedJam ,

I tried to create the image under WSL2 Ubuntu Distro, but keep getting time out when downloading the dependencies (lerna), so I search the solution online and found out from docker logs that my problem is exactly the same with this one:

However, I don’t think I found the solution when trying to run it on Windows

Still wondering why windows couldn’t find the docker-entrypoint.sh
It looks perfectly fine for me though

Quick update, I give up running on windows and move to Linux. Now n8n is giving me different error when running the container, any idea?

Hey @Versace,

That seems to be saying the folder doesn’t exist, When you are running on Linux is this using the custom docker image as well?

Hi @Jon ,

Yes, I’m using the custom docker image. Where am I going wrong?
Is it because it couldn’t read the docker-entrypoint.sh? or maybe it is something else?
Because the image has been created successfully, it’s just when running the container, I got that error

Hey @Versace,

Are you also building the image on Linux? It may be worth accessing the container through docker and checking the path it is having an issue with to see if you can manually make it if you can restarting the container may then solve the issue.

Out of interest why do you think it couldn’t find the docker-entrypoint file? Looking at the thread above I can’t see anything that would suggest that is the case unless there is more error output that you didn’t share with us.

Do you need to copy the .env file into the docker image? I thought Cloud Run had an option to pass in environment variables?

Yes, I built it on Linux since I failed to run it on Windows at first. There is indeed an error that I didn’t share when I run it on Windows, because that error is exactly the same with that one post I mentioned above “docker-entrypoint.sh No such field or directory”, so sorry for this misunderstanding :sweat_smile:.

For the .env file, I already put it inside the k8s manifest.

So, what I can summarize from my problem is still: “InternalHooks not initialized”

Hey @Versace,

That is more of a symptom than a cause though, it can’t shut it down if it never started it and if it can’t find that entry point file that would be the cause but I can’t see why it would happen.

Have you tried hard coding the path in the dockerfile or checking the image to see if it is there?

Hi @Jon & @MutedJam ,

Thank you very much for the help. It is already running now. The main problem is because folder “BinaryData” wasn’t generated inside the persistent volume. I had volumemount on my deployment.yaml file, and after I removed it, the folder “BinaryData” was generated successfully, so basically it is probably just a permission issue, thank you again for the help, much appreciated :grin:

1 Like