Mesg-core logs showing old services


#1

Hi there !

I used to work with the previous version of mesg-core, which used to have the ID of the MESG services formatted like v1_…. I lately updated the version to 0.3.0, where the format of these ID’s changed.

I cleaned all my services many times during development and even cleared on Docker (from Portainer) since I ran into many issues with it. This morning I ran a mesg-core logs and was confused to find this in the logs :

(...) span.kind=server system=grpc time="2018-10-18T11:54:17Z" level=error msg="finished streaming call with code Unknown" error="context canceled" grpc.code=Unknown grpc.method=ListenResult grpc.service=api.Core grpc.start_time="2018-10-18T11:49:38Z" grpc.time_ms=279820.2 span.kind=server system=grpc time="2018-10-18T11:54:20Z" level=warning msg="Database services: Could not decode service \"v1_0fdee4505e6d9452357035d5a7b289b2\"" service=v1_0fdee4505e6d9452357035d5a7b289b2 time="2018-10-18T11:54:20Z" level=warning msg="Database services: Could not decode service \"v1_1c9ee0a234e6b2ecfe6dbf26de6d8c1d\"" service=v1_1c9ee0a234e6b2ecfe6dbf26de6d8c1d time="2018-10-18T11:54:20Z" level=warning msg="Database services: Could not decode service \"v1_2f33c6a6967981d1d2499b449c2c9620\"" service=v1_2f33c6a6967981d1d2499b449c2c9620 time="2018-10-18T11:54:20Z" level=warning msg="Database services: Could not decode service \"v1_8aa3b4d0aa543dcc3a61c0975b48d8f6\"" (...)

I updated prior to yesterday and, as can be seen, it looks like the core is still trying to decode service from the old version (and all my services use latest version of mesg-js in that case).

I find it weird so that’s why I came to report.

Cheers guys


#2

Hi @romain-gsr!

Yes, we changed the service encoding to json while we also removed this v1 prefix from the service ids. This is why your services with the old v1 prefix cannot be decoded anymore, this was a breaking change.

As I see from your logs, you still have some services with the old encoding format saved in your ~/.mesg/database and your application client trying to listen results from one of these services.

Have you tried redeploying your service and use the new id you get from the deployment in your application client? This way core shouldn’t need to try decoding old services from your database.

Cheers.


#3

Hi @ilgooz !

Yes, as I mentioned I cleaned all my services and redeployed many times (also going so far as to clean Docker instances, containers and networks), but I was unaware of the ~/.mesg/database and that might be actually where they keep being referenced. Is there a way to clean it up ?

Cheers


#4

Hi @romain-gsr,

Yes services kept under ~/.mesg/database and it’s safe to hard delete it in the current version of core but this may change in future. Deleting the database should solve the problem that you’re facing with.

It’d be really helpful if you can provide further information about which cli command or mesg client are you using while getting this error to do a complete investigation. :slight_smile:

Cheers.