fossasia / visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR:root:initializing

WeihongPan opened this issue · comments

when I run:

visdom

I got this output:

Checking for scripts.
It's Alive!
ERROR:root:initializing
INFO:root:Application Started
INFO:root:Working directory: /home/SENSETIME/panweihong.vendor/.visdom
You can navigate to http://localhost:8097
INFO:tornado.access:101 GET /socket (127.0.0.1) 0.47ms
INFO:root:Opened new socket from ip: 127.0.0.1
INFO:tornado.access:200 POST /env/main (127.0.0.1) 0.65ms
INFO:tornado.access:101 GET /vis_socket (127.0.0.1) 0.36ms
INFO:root:Opened visdom socket from ip: 127.0.0.1
...

then I run vis.check_connection() but get False. I can see navigation bar on the top of the web page, and the online button is also on, but I still can't put anything on it. Every time I try, I will get some html code as output like this:

'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html><head>\n<meta type="copyright" content="Copyright (C) 1996-2016 The Squid Software Foundation and contributors">\n<meta http-equiv="Content-Type" CONTENT="text/html; charset=utf-8">\n<title>ERROR: The requested URL could not be retrieved</title>\n<style type="text/css"><!-- \n /*\n * Copyright (C) 1996-2016 The Squid Software Foundation and contributors\n *\n * Squid software is distributed under GPLv2+ license and includes\n * contributions from numerous individuals and organizations.\n * Please see the 
...

Basically it's an error page telling me that I got a connection error.

Here's some network test:

server started:

> ping localhost:8097
ping: localhost:8097: Name or service not known

> telnet localhost 8097
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

> nmap -p 8097 localhost
Starting Nmap 7.60 ( https://nmap.org ) at 2022-12-06 20:03 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000070s latency).

PORT     STATE SERVICE
8097/tcp open  sac

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

server closed:

> telnet localhost 8097
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

> nmap -p 8097 localhost
Starting Nmap 7.60 ( https://nmap.org ) at 2022-12-06 20:04 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000069s latency).

PORT     STATE  SERVICE
8097/tcp closed sac

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

Do you have any idea how to solve it? Many thanks in advance for your kindly help!

Hi,

the line ERROR:root:initializing is not an error as it has been inserted into visdom by mistake.
I have opened a PR to remove that message (see #894).

Regarding the underlying issue:
looking at the html-output you've sent, it seems that you are trying to use visdom through a proxy. Is this correct?
Possibly, the config on the proxy-site is missing websocket upgrades.
If you cannot adapt the config of the proxy I suggest you to start a non-websocket visdom server using visdom -use_frontend_client_polling.
Please let me know if this worked.

In the long run:
I think it would be a good idea to let visdom try the non-websocket option itself as a fallback, or at least, do a better job at giving the user some feedback about the faulty connection state.
Until that is implemented, I would like to open a PR to show the -use_frontend_client_polling option more prominently in the README.md.

Good Morning! Thank for your such quick reply!

after check the $http_proxy output, I find that our company does use proxy

Unfortunately, although I tried to use visdom -use_frontend_client_polling, I still got the same html error message. Here's the terminal output:

ERROR:tornado.application:Exception in callback <bound method SocketWrapper.socket_wrap_monitor_thread of <visdom.server.handlers.socket_handlers.SocketWrapper object at 0x7fc57afaf950>>
Traceback (most recent call last):
  File ".../.conda/envs/pytorch113/lib/python3.7/site-packages/tornado/ioloop.py", line 921, in _run
    val = self.callback()
  File ".../Downloads/visdom/py/visdom/server/handlers/socket_handlers.py", line 336, in socket_wrap_monitor_thread
    if time.time() - sub.last_read_time > MAX_SOCKET_WAIT:
AttributeError: 'VisSocketHandler' object has no attribute 'last_read_time'

which seems like, as you said, a websocket error

However, when I changed the server from localhost to the real ip of my computer, it worked! It's quite amazing, though I can't figure out why :)

Many thanks for your patience!