# Error: server closed the stream without sending trailers

**URL:** <https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737>\
**Category:** Sync Client\
**Created:** [February 25, 2021, 10:22pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737 "2021-02-25T22:22:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [February 25, 2021, 10:22pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/1 "2021-02-25T22:22:23Z")

</div>

I currently have Cells running behind Nginx Proxy Manager(NPM). All with the web UI and mobile app work as expected.  
However the CellsSync app give me the error message: **server closed the stream without sending trailers**.  
 ![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/2/2daa77f437077190f6dafc4cccd44212a4cf944e.png)

In NPM I feel like I need to add something to the config just unsure about what that would be as NPM is outside my greater knowledge. The image shows the options and setup in NPM and finally the .cong file which it creates.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/a/ab1f980d8ea955a4c9c05d23f1006bb9219028d8.png)

**Output of config on NPM:**

> server {  
> set $forward\_scheme https;  
> set $server “192.168.1.208”;  
> set $port 443;
> 
> listen 80;  
> listen [::]:80;
> 
> listen 443 ssl http2;  
> listen [::]:443;
> 
> server\_name [pydio.example.com](http://pydio.example.com);
> 
> # Let’s Encrypt SSL
> 
> include conf.d/include/letsencrypt-acme-challenge.conf;  
> include conf.d/include/ssl-ciphers.conf;  
> ssl\_certificate /etc/letsencrypt/live/npm-2/fullchain.pem;  
> ssl\_certificate\_key /etc/letsencrypt/live/npm-2/privkey.pem;
> 
> access\_log /data/logs/proxy\_host-2.log proxy;
> 
> location / {
> 
> ```
> proxy_set_header Upgrade $http_upgrade;                                               
> proxy_set_header Connection $http_connection;                                         
> proxy_http_version 1.1;                                                               
>                                                                                       
> # Proxy!                                                                              
> include conf.d/include/proxy.conf;                                                    
> 
> ```
> 
> }
> 
> # Custom
> 
> include /data/nginx/custom/server\_proxy[.]conf;  
> }

I believe that it is a **grpc** issue and NPM not passing data correctly.  
Any guidance would be appreciated. Thanks;  
Steven

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [February 26, 2021, 10:46am UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/2 "2021-02-26T10:46:31Z")

</div>

> [@mudvane](#):
>
> `proxy_http_version 1.1; `

Hello,  
Indeed, gRPC requires http/2 support - can you enable that?  
-c

---

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [February 26, 2021, 3:40pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/3 "2021-02-26T15:40:41Z")

</div>

I have attempted using the info I found [here](https://pydio.com/fr/docs/kb/deployment/running-cells-behind-nginx-reverse-proxy). which never seemed to work and actually killed my proxy host from running so I definitely did something wrong.

I have enabled http/2 support & added location for gPRC, now when attempting to make a connection I get **" cannot connect (408 Timeout): the gRPC port may not be correctly opened in the server"** as an error. So progress but still missing something.

Thanks again for any help.

Current .cong file:

```
server {
  set $forward_scheme https;
  set $server "192.168.1.208";
  set $port 443;

  listen 80;
listen [::]:80;

listen 443 ssl http2;
listen [::]:443;

  server_name pydio.xxxx.com;

  # Let's Encrypt SSL
  include conf.d/include/letsencrypt-acme-challenge.conf;
  include conf.d/include/ssl-ciphers.conf;
  ssl_certificate /etc/letsencrypt/live/npm-2/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/npm-2/privkey.pem;

  access_log /data/logs/proxy_host-2.log proxy;

proxy_send_timeout 600;^M
proxy_read_timeout 600;^M
proxy_request_buffering off;

  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass https://192.168.1.208:34639;
    grpc_pass grpcs://192.50.0.1:34639;
  }

  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}
```

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [March 2, 2021, 2:59pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/4 "2021-03-02T14:59:05Z")

</div>

Just to make sure can you remind us how Cells Sites are configured? Can you print out the content of `cells configure sites` ?

---

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [March 2, 2021, 3:22pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/5 "2021-03-02T15:22:52Z")

</div>

Here is the config.

±–±-------------------------------±------------±---------------------------+  
| # | BIND(S) | TLS | EXTERNAL URL |  
±–±-------------------------------±------------±---------------------------+  
| 0 | [https://192.168.1.208:443](https://192.168.1.208:443), | Self-signed | [https://pydio.xxx.com](https://pydio.xxx.com) |  
| | [https://pydio.xxx.com:443](https://pydio.xxx.com:443) | | |  
±–±-------------------------------±------------±---------------------------+

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [March 2, 2021, 4:48pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/6 "2021-03-02T16:48:50Z")

</div>

so why port `34639` in the proxy ? (just to understand)

---

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [March 2, 2021, 5:28pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/7 "2021-03-02T17:28:30Z")

</div>

I took the port info for gprc from the Pydio services page was that a mistake?

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/8/8c41dd52bf39cf25cb3adc0b681822f5dc9de04c.png)

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [March 8, 2021, 7:53am UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/8 "2021-03-08T07:53:26Z")

</div>

Hi @mudvane  
Oh ! Yes it’s a mistake 🙂 The ports displayed here are internal ports. They are exposed to the outside world only via the main Gateway, which is basically an embedded proxy. As you are using TLS, GRPC is simply exposed on 443, so you do not have to specify this port.  
Best  
-c

---

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [March 8, 2021, 9:45pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/9 "2021-03-08T21:45:37Z")

</div>

@charles ,  
So below is what I have as my conf file in Nginx Proxy Manager, with that I still receive the error:

> cannot connect to discovery endpoint: Get [https://pydio.domain.com/a/config/discovery:](https://pydio.domain.com/a/config/discovery:) stopped after 10 redirects

Would you have a direction how do I over come this road block?

Current config of NPM:

> ```
> # ------------------------------------------------------------                                                        
> # pydio.domain.com                                                                                                  
> # ------------------------------------------------------------                                                        
>                                                                                                                       
> server {                                                                                                              
> set $forward_scheme https;                                                                                          
> set $server "192.168.1.208";                                                                                
> set $port 443;                                                                                            
>                                                                                                                       
> listen 80;                                                                                                          
> listen [::]:80;                                                                                                       
>                                                                                                                       
> listen 443 ssl http2;                                                                                                 
> listen [::]:443;                                                                                                      
>                                                                                                                       
> server_name pydio.domain.com;                                                                                     
>                                                                                                                       
> # Let's Encrypt SSL                                                                                                 
> include conf.d/include/letsencrypt-acme-challenge.conf;                                                             
> include conf.d/include/ssl-ciphers.conf;                                                                            
> ssl_certificate /etc/letsencrypt/live/npm-2/fullchain.pem;                                                          
> ssl_certificate_key /etc/letsencrypt/live/npm-2/privkey.pem;                                                        
>                                                                                                                       
> # Asset Caching                                                                                                       
> include conf.d/include/assets.conf;                                                                                 
>                                                                                                                       
>                                                                                                                       
> # Block Exploits                                                                                                    
> include conf.d/include/block-exploits.conf;                                                                         
>                                                                                                                       
>                                                                                                                       
>                                                                                                                       
> # HSTS (ngx_http_headers_module is required) (31536000 seconds = 1 year)                                            
> add_header Strict-Transport-Security "max-age=31536000;includeSubDomains; preload" always;                          
>                                                                                                                       
> access_log /data/logs/proxy_host-2.log proxy;                                                                       
>                                                                                                                       
> location / {                                                                                                        
>                                                                                                                       
> # Force SSL                                                                                                       
> include conf.d/include/force-ssl.conf;                                                                            
>                                                                                                                       
>                                                                                                                       
> # HSTS (ngx_http_headers_module is required) (31536000 seconds = 1 year)                                            
> add_header Strict-Transport-Security "max-age=31536000;includeSubDomains; preload" always;                          
>                                                                                                                       
> proxy_set_header Upgrade $http_upgrade;                                                                           
> proxy_set_header Connection $http_connection;                                                                     
> proxy_http_version 1.1;                                                                                           
>                                                                                                                       
> # Proxy!                                                                                                          
> include conf.d/include/proxy.conf;                                                                                
> }                                                                                                                   
>                                                                                                                       
>                                                                                                                       
> # Custom                                                                                                            
> include /data/nginx/custom/server_proxy[.]conf;                                                                     
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![mudvane](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@mudvane](https://forum.pydio.com/u/mudvane)\
**Post date:** [March 22, 2021, 9:59pm UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/10 "2021-03-22T21:59:09Z")

</div>

Updating on this as I continue to try and get the sync client functioning but still fail to get the client to connect to the server. Currently when trying to connect to the Pydio Cells server I receive a message of “Forbidden” now. Is there a means to find out what is blocking the connection how?

---

<div class="post-metadata">

**Author:** ![mandoerik](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/mandoerik/32/1414_2.png) [@mandoerik](https://forum.pydio.com/u/mandoerik)\
**Post date:** [March 23, 2021, 8:45am UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/11 "2021-03-23T08:45:04Z")

</div>

I am also struggling with this! Can’t wrap my mind around it… Pydio-cells in docker - Nginx proxy manager - Cloudflare (not proxied at the moment). Works perfect with web but the sync client doesn’t work. I have Letsencrypt certs and HTSP/2 enabled and there’s https is between Nginx and Pydio-cells docker machine. Error message in cells-sync is “server closed the stream without sending trailers”.

---

<div class="post-metadata">

**Author:** ![mandoerik](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/mandoerik/32/1414_2.png) [@mandoerik](https://forum.pydio.com/u/mandoerik)\
**Post date:** [March 24, 2021, 11:38am UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/12 "2021-03-24T11:38:44Z")

</div>

Switched to Traefik instead of Nginx Proxy manager, now it works like a charm!

---

<div class="post-metadata">

**Author:** ![vmattaur](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/vmattaur/32/1476_2.png) [@vmattaur](https://forum.pydio.com/u/vmattaur)\
**Post date:** [July 20, 2021, 11:17am UTC](https://forum.pydio.com/t/error-server-closed-the-stream-without-sending-trailers/3737/13 "2021-07-20T11:17:26Z")

</div>

Did you ever git this to work?
