Meshery: Adapters not discoverable after introduction of JWT

Created on 26 Apr 2020  路  23Comments  路  Source: layer5io/meshery

Description

Adapters not discoverable after the introduction of JWT

Expected Behavior

Adapters should discoverable as have been working before of JWT

Screenshots

Screenshot 2020-04-27 at 12 20 23 AM

Logs

INFO[0222] retrieved user: {kushthedude   https://avatars0.githubusercontent.com/u/44091822?v=4}
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"

[Optional] Additional Context

Use command make run-local and see the error.

kinbug

All 23 comments

@kushthedude , just one thing to check, have you configured /etc/hosts file so that mesherylocal.layer5.io points to localhost?

@nveenjain This is the file, I think it is already pointing to localhost.
Screenshot 2020-04-27 at 3 07 09 AM

Can you try opening mesherylocal.layer5.io:9081 and see if it is working(opening up the meshery adapter page, authentication might not work as JWTs are maybe domain specific and work currently only for localhost)...

If it doesn't work, restarting the system might help...

No, mesherylocal.layer5.io:9081 it is not working.
Neither the restart.

@kushthedude sorry, I just missed the error hosts file, I guess your entry should be

127.0.0.1 mesherylocal.layer5.io

try switching the IP and hostname, and it should work...
A system reboot may be required...

Trying it right away!

Two things:

  • Token is not received while using URL mesherlocal.layer5.io:9081.
  • Adapters are still not discoverable, with same error log.

Yes, tokens doesn't work in URL mesherlocal.layer5.io:9081. This is something that was notified in slack #meshery channel a few days back... Opening an issue and assigning Kanishkar would be a nice idea...
Regarding error logs, can you please again paste the error logs, i assume host must be reachable, and maybe adapters can't be pinged...

Yes, tokens doesn't work in URL mesherlocal.layer5.io:9081. This is something that was notified in slack #meshery channel a few days back... Opening an issue and assigning Kanishkar would be a nice idea...
Regarding error logs, can you please again paste the error logs, i assume host must be reachable, and maybe adapters can't be pinged...

Same logs

ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"
ERRO[0222] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup mesherylocal.layer5.io: no such host"

I wonder why this is happening, mesherylocal.layer5.io should be able to connect...
Can you try running host mesherylocal.layer5.io in your terminal...

Host mesherylocal.layer5.io:9081 not found: 3(NXDOMAIN)

Ideal output should be (if hosts file is properly applied)

host mesherylocal.layer5.io
mesherylocal.layer5.io has address 127.0.0.1
Host mesherylocal.layer5.io not found: 3(NXDOMAIN)

Can you confirm that /etc/hosts has correct config and restart system once again??

A workaround would be to replace all mesherylocal.layer5.io with 127.0.0.1 or localhost
at https://github.com/layer5io/meshery/blob/master/Makefile#L1

Screenshot 2020-04-27 at 4 22 08 AM

mesherylocal.layer5.io:9081 is pointing me to provider UI. I don't think there should be an error in config.
I don't know why host mesherylocal.layer5.io is showing this output.

Also one more thing to note, my etc/hosts was not configured before JWT but I was quite well able to use meshery . Also this redirection of host is not mentioned in any readME, would it be worth to document this ?

A workaround would be to replace all mesherylocal.layer5.io with 127.0.0.1 or localhost
at https://github.com/layer5io/meshery/blob/master/Makefile#L1

Workaround is also not working throwing the same error logs!
shERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10000: connect: connection refused" ERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10001: connect: connection refused" ERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10002: connect: connection refused" ERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10003: connect: connection refused" ERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10004: connect: connection refused" ERRO[0023] Error creating a mesh client.: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:10008: connect: connection refused"

Also this redirection of host is not mentioned in any readME, would it be worth to document this ?

Actually, it is mentioned in Contributing.md but yeah it should be made more visible...

Workaround is also not working throwing the same error logs!

These errors are expected... Maybe adapters are not running in your system? maybe cloning any adapter and runnign them would work...

Workaround is also not working throwing the same error logs!

These errors are expected... Maybe adapters are not running in your system? maybe cloning any adapter and runnign them would work...

That is why I opened the issue, BTW all this is after #892 gets merged as I am using #892 as my base currently.

ohhh, i'll checkout the PR too... I thought this was on master branch...

It is working on that PR too @kushthedude. also host mesherylocal.layer5.io should emit

mesherylocal.layer5.io has address 127.0.0.1
Host mesherylocal.layer5.io not found: 3(NXDOMAIN)

I guess we need to debug that...

Thanks to @nveenjain I was able to fix the issue on my local!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leecalcote picture leecalcote  路  3Comments

chandrashritii picture chandrashritii  路  3Comments

Aisuko picture Aisuko  路  3Comments

leecalcote picture leecalcote  路  4Comments

leecalcote picture leecalcote  路  4Comments