OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • NGINX: Connection gets dropped
« previous next »
  • Print
Pages: [1]

Author Topic: NGINX: Connection gets dropped  (Read 7757 times)

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
NGINX: Connection gets dropped
« on: February 25, 2019, 10:54:20 pm »
Hello

I am using NGINX on latest version of OPNSense production distro
Problem I've encountered is, seems like connection is being dropped
after certain amount of time.

I was using openstack-dashboard behind the OPNSense NGINX,
which requires websocket for displaying VNC on web.

Should I explicitly set some options for keeping connection alive?
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: NGINX: Connection gets dropped
« Reply #1 on: February 25, 2019, 11:21:23 pm »
Do you need a timeout option?
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #2 on: February 26, 2019, 09:36:33 am »
I'm not sure that will fix (I don't have enough knowledge)
I've made some multiplayer web game app which uses websocket
but connection gets dropped after certain amount of time (like 2 mins?...)

I need to dig it down further I guess
For now, not 100% sure it's NGINX problem or firewall itself
Could you give me some advice for inspection? I'll start with wireshark

If it's firewall, I'm suspecting "Schedule States" option (Currently not checked) in
"Firewall" -> "Settings" -> "Advanced" tab...
Can firewall or NGINX somehow wipe active connection(websocket traffic of game) somehow?
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #3 on: February 26, 2019, 10:49:04 am »
Quote from: fabian on February 25, 2019, 11:21:23 pm
Do you need a timeout option?
I got websocket error code 1006
https://stackoverflow.com/questions/19304157/getting-the-reason-why-websockets-closed-with-close-code-1006

Seems like it's not a firewall issue
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #4 on: February 26, 2019, 11:11:51 am »
Quote from: fabian on February 25, 2019, 11:21:23 pm
Do you need a timeout option?

I suspect this the most
https://github.com/abingham/runner_repl/issues/7

He says "proxy_read_timeout" and "proxy_send_timeout" should be configured differently than default 60s value
« Last Edit: February 26, 2019, 11:24:52 am by park0kyung0won »
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #5 on: February 26, 2019, 11:25:14 am »
Quote from: park0kyung0won on February 26, 2019, 11:11:51 am
Quote from: fabian on February 25, 2019, 11:21:23 pm
Do you need a timeout option?

I suspect this the most
https://github.com/abingham/runner_repl/issues/7

He says "proxy_read_timeout" and "proxy_send_timeout" should be configured different from the default value which is 60s


Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: NGINX: Connection gets dropped
« Reply #6 on: February 26, 2019, 08:53:23 pm »
I made a ticket: https://github.com/opnsense/plugins/issues/1210
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #7 on: February 27, 2019, 01:52:28 am »
Quote from: fabian on February 26, 2019, 08:53:23 pm
I made a ticket: https://github.com/opnsense/plugins/issues/1210
Thank you
Is there any way I can manually override nginx.conf temporarily before update arrives?
Logged

newsense

  • Hero Member
  • *****
  • Posts: 1038
  • Karma: 77
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #8 on: February 27, 2019, 03:30:25 am »
Once a patch will be available you'll be able to test it before it's rolled out.

For the time being however, it's still a bug.
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: NGINX: Connection gets dropped
« Reply #9 on: February 27, 2019, 07:17:31 pm »
For the timeouts, the patch can be installed using the following id: e8a8ed0ad832da64a79abf49ef45118b07267c4a

https://github.com/opnsense/plugins/pull/1211/files
Logged

newsense

  • Hero Member
  • *****
  • Posts: 1038
  • Karma: 77
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #10 on: February 28, 2019, 07:13:58 am »
Code: [Select]
opnsense-patch e8a8ed0ad832da64a79abf49ef45118b07267c4a :)
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #11 on: February 28, 2019, 07:45:28 am »
Quote from: fabian on February 27, 2019, 07:17:31 pm
For the timeouts, the patch can be installed using the following id: e8a8ed0ad832da64a79abf49ef45118b07267c4a

https://github.com/opnsense/plugins/pull/1211/files

Thanks!!
Logged

park0kyung0won

  • Newbie
  • *
  • Posts: 24
  • Karma: 2
    • View Profile
Re: NGINX: Connection gets dropped
« Reply #12 on: February 28, 2019, 08:01:08 am »
Quote from: newsense on February 28, 2019, 07:13:58 am
Code: [Select]
opnsense-patch e8a8ed0ad832da64a79abf49ef45118b07267c4a :)

OPNSense says...
fetch: https://github.com/opnsense/core/commit/e8a8ed0ad832da64a79abf49ef45118b07267c4a.patch: Not Found
What should I do?...  :'(

------------------------------------------------------------------
I've figured it out! opensense-patch -c plugins worked
« Last Edit: February 28, 2019, 08:17:15 am by park0kyung0won »
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: NGINX: Connection gets dropped
« Reply #13 on: February 28, 2019, 06:00:32 pm »
you need to add the switch for the plugins repository (probably -c plugins).
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • NGINX: Connection gets dropped
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2