Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to the yoctopuse remotely: init error:Unable to connect to server (ytcp:489) #28

Closed
javierconcha opened this issue Feb 19, 2021 · 12 comments

Comments

@javierconcha
Copy link
Member

javierconcha commented Feb 19, 2021

I am working remotely and after a while of being able to open the gui, now I am getting this error:

[hypernets@hypernets-cnr1 hypernets_tools]$ python -m hypernets.gui
init error:Unable to connect to server (ytcp:489)

Also, is there any way to reset or reboot the yoctopuse remotely?

@javierconcha
Copy link
Member Author

I got the same error after rebooting remotely.

@jkuusk
Copy link
Collaborator

jkuusk commented Feb 22, 2021

Is the virtualhub service running?
systemctl status yvirtualhub.service

@javierconcha
Copy link
Member Author

I got this:

[hypernets@hypernets-cnr1 hypernets_tools]$ systemctl status yvirtualhub.service
● yvirtualhub.service - Yoctopuce VirtualHub
     Loaded: loaded (/etc/systemd/system/yvirtualhub.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-02-23 11:51:33 CET; 4h 36min ago
   Main PID: 341 (VirtualHub)
      Tasks: 4 (limit: 4573)
     Memory: 6.0M
     CGroup: /system.slice/yvirtualhub.service
             └─341 /usr/sbin/VirtualHub -c /etc/vhub.byn

feb 23 11:51:33 hypernets-cnr1 systemd[1]: Started Yoctopuce VirtualHub.
feb 23 11:51:33 hypernets-cnr1 VirtualHub[341]: Cannot register service: RPC: Unable to receive; errno = Connection refused

@jkuusk
Copy link
Collaborator

jkuusk commented Feb 23, 2021

That looks good. I've seen the 489 error only once and it was fixed after reboot (the Yoctopuce rebooted itself and hence also the rugged PC shortly after that error)

@javierconcha
Copy link
Member Author

In my case, the Yoctopuce did not reboot itself after one day. I try to interact with the system, but I get the same error, e.g.,

[hypernets@hypernets-cnr1 hypernets_tools]$ python3 -m hypernets.scripts.relay_command -n3 -soff
init error:Unable to connect to server (ytcp:489)

@javierconcha
Copy link
Member Author

@jkuusk, @corizzi, is there a way to reboot the Yoctopuce remotely?

@jkuusk
Copy link
Collaborator

jkuusk commented Feb 25, 2021

If you are unable to connect to the yoctopuce then I think only way of rebooting it is power cycling. Unless you can control the power source remotely I think it is not possible to reboot the yoctopuce.

@javierconcha
Copy link
Member Author

@jkuusk, @clemgoyens, all partners,

From your experience, could this happen on the field? Should we be thinking of a solution, like a remotely controlled switch?

@jkuusk
Copy link
Collaborator

jkuusk commented Feb 25, 2021

Yoctopuce itself was supposed to be that switch. In my experience I have not seen such an issue that the yoctopuce is inaccessibe for extended period of time. I've seen occasional errors of not being accessible, I've seen yoctopuce rebooting at random moments, I've seen some commands (switching relays) blocking for nearly 20 minutes.

Can you connect to the yoctopuce web interface from a browser or that one is inaccessible too? Can you ping the yoctopuce?

@javierconcha
Copy link
Member Author

Yes, we can ping and connect to the Yoctopuce by the web interface:

[hypernets@hypernets-cnr1 ~]$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.070 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.146 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.090 ms

We have a different error now, when pressing the connection button in the gui:

[hypernets@hypernets-cnr1 hypernets_tools]$ python -m hypernets.gui
init error:ytcp:650:tcp(113):No route to host

@jkuusk
Copy link
Collaborator

jkuusk commented Mar 1, 2021

You are pinging the localhost. Can you ping the yoctopuce IP from the rugged PC (yoctopuce_ip parameter in the configuration file, probably 10.42.0.something)?

@javierconcha
Copy link
Member Author

The last time I encounter this error, I could not ping to 10.42.0.X. I have not encountered this error anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants