#1 by coralio (edited )
Hi, I'm running otree prodserver on port 80 (other ports will be available next week, they're now locked by my university). On timeout, players that don't have an open browser are not automatically handled because the server refuses connections. I don't have this problem with heroku (with free dynos), so I guess it's all about my server (Windows)???
Thanks!!
The error in the terminal is:
Traceback (most recent call last):
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 975, in send
self.connect()
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 941, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 850, in create_connection
raise exceptions[0]
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 835, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\site-packages\otree\tasks.py", line 57, in listen
getattr(self, task.method)(**task.kwargs())
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\site-packages\otree\tasks.py", line 87, in submit_expired_url
post(
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\site-packages\otree\tasks.py", line 26, in post
resp = request.urlopen(req)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1377, in http_open
return self.do_open(http.client.HTTPConnection, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Servidor\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10061] No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión>
Auto-submitting timed out page: /p/gwkvi72e/beauty_intro/Introduction/2
#2 by coralio (edited )
Thx
#3 by coralio
I solved the issue!! I was starting otree incorrectly: otree prodserver mydomain:80 y removing the domain, it worked