ejeschke / ginga

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

ConnectionRefusedError: [Errno 61] Connection refused #992

Closed Tang-SL closed 2 years ago

Tang-SL commented 2 years ago

Hi there, my issue is similar to #958, but simply getting this [Errno 61] when trying to do ggrc help I can open a ginga window with ginga, but no response from ginga --modules=RC I am using MacOS BigSur v11.6, and python 3.8, detailed error message is attached. thank you in advance!

Screen Shot 2022-02-15 at 17 11 04

!

ejeschke commented 2 years ago

@Tang-SL, following the advice in #958, what do you get when you do the following in Python:

import socket
print(socket.gethostname())

?

Tang-SL commented 2 years ago

@ejeschke Thanks for the very prompt reply! it returns me with: cosdhcp012.icrr.u-tokyo.ac.jp And I have checked my /etc/hosts , which shows:

Screen Shot 2022-02-16 at 13 12 06
ejeschke commented 2 years ago

@Tang-SL, what happens if you invoke ggrc like this:

$ ggrc --host=127.0.0.1

?

Tang-SL commented 2 years ago

Still shows the same error 61.

ejeschke commented 2 years ago

Ok, can you see the "RC" tab in the Ginga UI?

ejeschke commented 2 years ago

Based on the other issue you referenced, we probably have one of the following issues:

If you can access the RC tab, change the port number the "Set Addr" field and press Set, then Restart. Then in ggrc, use --port=NNNN to use the same port number.

If this works, it can be set in your $HOME/.ginga startup folder using the procedure described in the other issue.

Tang-SL commented 2 years ago

After I added plugin_RC.cfg to my ~/.ginga folder following #958 , now ggrc help works when ginga window is opening.

However, I found my issue seems to be somewhat related to the environment. When I shift to another environment, in which I really wanted ginga to work, both ginga --modules=RC and ginga show nothing, no error message, and no windows pops up.

ejeschke commented 2 years ago

Can you add the following to the command line when starting ginga?

--loglevel=20 --stderr --log=error.log

What kind of errors are reported in the log?

BTW, this discussion has a good description of how to create an environment for running ginga. You might check that discussion to see if you are missing some package.

Tang-SL commented 2 years ago

No error is reported but just stuck at some stage. error.log

Tang-SL commented 2 years ago

And also no conflicts reported from the packages installation.

Screen Shot 2022-02-17 at 16 19 27
ejeschke commented 2 years ago

Nothing unusual in the log, but it should end with "entering mainloop...". How did you install ginga; by "pip install ginga" or from downloading source? A new version was released today (3.3.0), if you installed from pip, it might be worth trying to upgrade by "pip install --upgrade ginga".

Can you find any notable differences between the two environments?

For what it is worth, I just tested on mac os x "monterey" 12.2 with --modules=RC and ggrc and it is working fine there. Previously I think I was running "big sur" that was also fine.

Tang-SL commented 2 years ago

I fixed it out to be the PyQt5-sip package, major update from 4.19.18 to 12.9.1 gets it to work, problem solved! Thanks a lot for your help!