ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

RC module not opening correctly #977

Closed SunilSimha closed 2 years ago

SunilSimha commented 2 years ago

I'm trying to open Ginga withe the RC modules turned on (ginga --modules=RC &) but the Ginga window starts with no RC tab on the right. Then if I try to click Plugins>custom>RC, I get this error:

Plugin failed to start correctly: [Errno 98] Address already in use
  File "/home/sunil/anaconda3/lib/python3.7/site-packages/ginga/gw/PluginManager.py", line 342, in start_plugin_future
    p_info.obj.start()
  File "/home/sunil/anaconda3/lib/python3.7/site-packages/ginga/rv/plugins/RC.py", line 273, in start
    self.server.start(thread_pool=self.fv.get_threadPool())
  File "/home/sunil/anaconda3/lib/python3.7/site-packages/ginga/util/grc.py", line 218, in start
    allow_none=True)
  File "/home/sunil/anaconda3/lib/python3.7/xmlrpc/server.py", line 605, in __init__
    socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate)
  File "/home/sunil/anaconda3/lib/python3.7/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/home/sunil/anaconda3/lib/python3.7/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)

I'm on Ginga 3.2.0, Python 3.7.11. Any clue how I might fix this?

ejeschke commented 2 years ago

That error message just indicates some other process is using the default port. What happens if you change the port number from 9000 to 9900 in the text box and click the "Restart" button?

ejeschke commented 2 years ago

If this works, you can set the default port number in the plugin configuration file. Just copy the default config file to your $HOME/.ginga folder and edit it to change the port number.

SunilSimha commented 2 years ago

Oh! I think Jupyter in VSCode is using the same port. Sorry, can you clarify which textbox I'm supposed to change the port in and what command I should be using in said text box?

ejeschke commented 2 years ago

Follow the instruction above to copy the config file. Change the value of bind_port in the file. Restart Ginga.

ejeschke commented 2 years ago

I will look into fixing the issue of the plugin not appearing if the default port is blocked.

ejeschke commented 2 years ago

Improved handling in commit 826c00de3a358b257b58731ee7affe8a4af51099

SunilSimha commented 2 years ago

Thanks. The Jupyter notebook running in the background was indeed the issue.