# Service not working - events' failed

**URL:** <https://community.taiga.io/t/service-not-working-events-failed/1025>\
**Category:** Troubleshooting\
**Tags:** docker\
**Created:** [April 10, 2023, 7:41am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025 "2023-04-10T07:41:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 10, 2023, 7:41am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/1 "2023-04-10T07:41:50Z")

</div>

Hello!  
I installed Taiga using the official taiga-docker guide.  
My env settings  
TAIGA\_SCHEME=http # serve Taiga using “http” or “https” (secured) connection  
TAIGA\_DOMAIN=10.254.255.202:80 # Taiga’s base URL  
SUBPATH=“” # it’ll be appended to the TAIGA\_DOMAIN (use either “” or a “/subpath”)  
WEBSOCKETS\_SCHEME=ws # events connection protocol (use either “ws” or “wss”)  
I left all other lines unchanged.  
Further, through the docker compose up -d command, I launched it all.  
Created a user, logged in and…  
I go to [http://10.254.255.202/project/students/kanban](http://10.254.255.202/project/students/kanban)  
I keep getting errors in the browser console:  
WebSocket error: [object Event]  
or  
app.js:3319 WebSocket connection to ‘ws://10.254.255.202/events’ failed:  
Tell me, please, where and what needs to be corrected?

---

<div class="post-metadata">

**Author:** ![daniel.herrero](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/daniel.herrero/32/301_2.png) [@daniel.herrero](https://community.taiga.io/u/daniel.herrero)\
**Post date:** [April 11, 2023, 1:19pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/2 "2023-04-11T13:19:19Z")

</div>

> [@wertex15](#):
>
> I go to [http://10.254.255.202/project/students/kanban](http://10.254.255.202/project/students/kanban)

Hi @wertex15

Thank you for your very first post, and welcome to Taiga!

I have verified there’s no error with the events communication, by simulating your IP with a custom local domain and using your exact `.env` settings.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/1X/adafbec53d85f1ac7ce4f1643d08cfbaa9b2b347.png)

I left you here my testing environment:

`/etc/hosts`:

```auto
127.0.0.1 my.domain

```

`.env`:

```auto
TAIGA_SCHEME=http # serve Taiga using "http" or "https" (secured) connection
TAIGA_DOMAIN=my.domain:80 # Taiga's base URL
SUBPATH="" # it'll be appended to the TAIGA_DOMAIN (use either "" or a "/subpath")
WEBSOCKETS_SCHEME=ws # events connection protocol (use either "ws" or "wss")

```

And finally, I think the tricky part, that is my default.conf in the NGinx acting as a proxy pass to my Taiga’s docker installation:

`/etc/nginx/conf.d/default.conf`:

```auto
server {
  server_name my.domain;
  listen 80;

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;
    proxy_pass http://localhost:9000/;
  }

  # Events <============ Review here
  location /events {
      proxy_pass http://localhost:9000/events;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
      proxy_connect_timeout 7d;
      proxy_send_timeout 7d;
      proxy_read_timeout 7d;
  }

  # TLS: Configure your TLS following the best practices inside your company
  # Logs and other configurations
}

```

If you’re facing a problem in the events, your problem could be located in the `/events` location, which it’s the responsible to capture all the `ws://my.domain/events` and redirect to the real location where it can be answered by your Taiga’s docker app: `http://localhost:9000/events`.

As you’re not using a subpath in your URL (`TAIGA_DOMAIN` .env variable), your proxy setting should use the **subdomain** sample mentioned in the installation guide: [1.9. Configure the proxy configuration](https://docs.taiga.io/setup-production.html#_configure_the_proxy). It’s also mentioned in the [Taiga 30 mins Setup](https://community.taiga.io/t/taiga-30min-setup/170#configure-the-proxy-26).

If that’s doesn’t solve your problem, please post us your proxy configuration in order to offer you further help.

Greetings

---

<div class="post-metadata">

**Author:** ![daniel.herrero](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/daniel.herrero/32/301_2.png) [@daniel.herrero](https://community.taiga.io/u/daniel.herrero)\
**Post date:** [April 11, 2023, 1:29pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/3 "2023-04-11T13:29:51Z")

</div>

Hi again,

I have performed a final test to prove my theory, and it’s to comment the `/event location` proxy pass to reproduce your problem…

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/1X/97f300a672323a70ce5098117adb6bd1e392a026.png)

As you see, I’m now having the same problem `app.js:3319 WebSocket connection to 'ws://my.domain/events' failed`.

What I did is to omit the `\events` part from the Nginx acting as the local proxy:

```auto
server {
  server_name my.domain;
  listen 80;

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;
    proxy_pass http://localhost:9000/;
  }

  # Events
# location /events {
# proxy_pass http://localhost:9000/events;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_set_header Host $host;
# proxy_connect_timeout 7d;
# proxy_send_timeout 7d;
# proxy_read_timeout 7d;
# }

  # TLS: Configure your TLS following the best practices inside your company
  # Logs and other configurations
}

```

---

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 11, 2023, 2:33pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/4 "2023-04-11T14:33:25Z")

</div>

Hi @daniel.herrero  
Thank you so much for your replies!

I figured out my mistake… I didn’t install nginx 😃  
Now I will install and prescribe the settings according to the recommendations of Taiga 30min Setup  
I’ll let you know the result

---

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 11, 2023, 3:38pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/5 "2023-04-11T15:38:45Z")

</div>

I tried all the options, but it did not help (

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/1X/8a40fe704ebfdd411343a777c4fbb6c045673015.png)

Here are my current settings:

```auto
server {
  server_name 10.254.255.202;
  listen 80;

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;
    proxy_pass http://localhost:9000/;
  }

  # Events <============ Review here
  location /events {
      proxy_pass http://localhost:9000/events;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
      proxy_connect_timeout 7d;
      proxy_send_timeout 7d;
      proxy_read_timeout 7d;
  }

  # TLS: Configure your TLS following the best practices inside your company
  # Logs and other configurations
}

```

In the proxy settings, I tried to disable the events section as in your second example, but the error did not disappear.

```auto
# Taiga's URLs - Variables to define where Taiga should be served
TAIGA_SCHEME=http # serve Taiga using "http" or "https" (secured) connection
TAIGA_DOMAIN=10.254.255.202:80 # Taiga's base URL
SUBPATH="" # it'll be appended to the TAIGA_DOMAIN (use either "" or a "/subpath")
WEBSOCKETS_SCHEME=ws # events connection protocol (use either "ws" or "wss")

RABBITMQ_ERLANG_COOKIE=secret-erlang-cookie # unique value shared by any connected instance of RabbitMQ

```

Or maybe it is related to the RABBITMQ\_ERLANG\_COOKIE line? I left it there as is.

```auto
  taiga-gateway:
    image: nginx:1.19-alpine
    ports:
      - "9000:80"
    volumes:
      - ./taiga-gateway/taiga.conf:/etc/nginx/conf.d/default.conf
      - taiga-static-data:/taiga/static
      - taiga-media-data:/taiga/media
    networks:
      - taiga
    depends_on:
      - taiga-front
      - taiga-back
      - taiga-events

```

Maybe in here in the port line it is necessary to specify something differently? And match with the string TAIGA\_DOMAIN=10.254.255.202:80 # Taiga’s base URL?

---

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 11, 2023, 3:46pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/6 "2023-04-11T15:46:01Z")

</div>

upd  
`docker ps -a`

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/1X/9963d1a0bd9124d854c3b6727b4e746b9c0d7518.png)

---

<div class="post-metadata">

**Author:** ![TaigaTeam](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/taigateam/32/21_2.png) [@TaigaTeam](https://community.taiga.io/u/TaigaTeam)\
**Post date:** [April 12, 2023, 10:01am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/7 "2023-04-12T10:01:28Z")

</div>

Hi @wertex15  
I’m assuming you are trying this in your local machine, isn’t it? have you tried with a local domain? I think it would be a useful test.

1. in your `/etc/hosts` file add this:

```auto
127.0.0.1 taiga.example.com

```

1. in your `.env` file configure this (and only this):

```auto
TAIGA_DOMAIN=taiga.example.com # Taiga's base URL

```

and `docker-compose up -d`

1. in your nginx config file, configure this:

```auto
server {
  listen 80 default_server;
  server_name taiga.example.com;

```

and restart nginx.

Now, you can enter in your browser in “[http://taiga.example.com](http://taiga.example.com)”. Let’s see if this still gives you an error or it helps with the problem. It’ll help us to understand better what’s going on.

Cheers!

---

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 12, 2023, 10:58am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/8 "2023-04-12T10:58:34Z")

</div>

Hi @TaigaTeam

Not certainly in that way. I have an Ubuntu server where I installed Docker and started a Taiga container. Ubuntu in CLI mode and all I can do is make a request via curl.

Also tell me, please, why do I need a proxy server in the form of nginx ? Why can’t you directly access the container’s incoming port?

---

<div class="post-metadata">

**Author:** ![TaigaTeam](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/taigateam/32/21_2.png) [@TaigaTeam](https://community.taiga.io/u/TaigaTeam)\
**Post date:** [April 13, 2023, 8:15am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/9 "2023-04-13T08:15:40Z")

</div>

Hi @wertex15 !

the `taiga-docker` repository is just one of many ways to use the docker images. You can even build your own images from the source code following if you want the official Dockerfile but adding your own changes.

That said, you can definetly access the container’s port ([http://localhost:9000](http://localhost:9000)); we don’t recommend using this without a SSL/TLS termination but it’s up to every user.

Cheers!

---

<div class="post-metadata">

**Author:** ![wertex15](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/wertex15/32/868_2.png) [@wertex15](https://community.taiga.io/u/wertex15)\
**Post date:** [April 13, 2023, 11:20am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/10 "2023-04-13T11:20:35Z")

</div>

Hi @TaigaTeam  
Yesterday I once again went through the entire instructions for launching the container. I downloaded the repository and did all the steps, but it did not help. The error still shows up. How can I solve the problem when logging into Taiga from another PC?

---

<div class="post-metadata">

**Author:** ![daniel.herrero](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/daniel.herrero/32/301_2.png) [@daniel.herrero](https://community.taiga.io/u/daniel.herrero)\
**Post date:** [April 13, 2023, 1:01pm UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/11 "2023-04-13T13:01:21Z")

</div>

Hi @wertex15,

It’s not a problem with the `RABBITMQ_ERLANG_COOKIE` line, it should porperly work as it’s by default.

You shouldn’t change the `taiga-gateway` service either, because it’s mapping the internal docker port from taiga-front (which runs in `80`), to the `9000 `port in the machine which is hosting docker.

In fact, you should be able to access directly to that address and port [http://10.254.255.202:9000](http://10.254.255.202:9000), without using the second nginx layer i suggest you initially.

I’m afraid I’ve run out of ideas. I’d suggest you to install Taiga in your local machine (not in a third Ubuntu server), in order to remove a layer of complexity, and perform easier configuration changes to understand what’s really going on.

Please, keep us updated. We hope you finally come to a solution!

---

<div class="post-metadata">

**Author:** ![TaigaTeam](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/taigateam/32/21_2.png) [@TaigaTeam](https://community.taiga.io/u/TaigaTeam)\
**Post date:** [May 29, 2023, 9:56am UTC](https://community.taiga.io/t/service-not-working-events-failed/1025/12 "2023-05-29T09:56:55Z")

</div>

A post was merged into an existing topic: [Help with the 30min setup](https://community.taiga.io/t/help-with-the-30min-setup/1294/2)
