Coder Social home page Coder Social logo

K3S Kubernetes Cluster: TypeError [ERR_INVALID_ARG_TYPE]: The "options.port" property must be one of type number or string. Received null about cote HOT 8 CLOSED

alexander-hagen avatar alexander-hagen commented on June 14, 2024
K3S Kubernetes Cluster: TypeError [ERR_INVALID_ARG_TYPE]: The "options.port" property must be one of type number or string. Received null

from cote.

Comments (8)

alexander-hagen avatar alexander-hagen commented on June 14, 2024

I made some progress with debugging. The NodeJS programs that have this issue, both have this Requester that is causing the error:

const
cote = require('cote')({ redis: { host: 'redis' } });
const configRequester = new cote.Requester({ name: 'Requester User Configurations', key: 'user.processor' });

The NodeJS that has the responder for this has the following:

const
cote = require('cote')({ redis: { host: 'redis' } });
const configPublisher = new cote.Publisher({ name: 'Publisher to user configuration changes', key: 'user.publisher' });
const configResponder=new cote.Responder({ name: 'Responder to User Config Requests', key: 'user.processor' });

If I remove the Publisher, and only keep the Responder, then the issue is gone. What's wrong with the definition of the Publisher?

from cote.

IgorMats avatar IgorMats commented on June 14, 2024

Hey! Any update? I have the same issue.

from cote.

IgorMats avatar IgorMats commented on June 14, 2024

Just a small piece of debug logs (Sorry, actually I have no idea what's going on there...):

2021-08-26T00:21:16.889Z axon:sock client connect
2021-08-26T00:21:16.889Z axon:sock client add socket 10
2021-08-26T00:21:17.973Z axon:sock client remove socket 10
2021-08-26T00:21:25.460Z axon:sock client connect attempt builder-4.default.svc.cluster.local:8001
2021-08-26T00:21:25.504Z axon:sock client connect attempt builder-4.default.svc.cluster.local:8000
2021-08-26T00:21:25.516Z axon:sock client connect attempt builder-4.default.svc.cluster.local:65535
2021-08-26T00:21:25.531Z axon:sock client connect attempt builder-4.default.svc.cluster.local:65535
2021-08-26T00:21:25.548Z axon:sock client connect attempt builder-4.default.svc.cluster.local:null
node:net:989
      throw new ERR_INVALID_ARG_TYPE('options.port',
      ^
TypeError [ERR_INVALID_ARG_TYPE]: The "options.port" property must be one of type number or string. Received null

from cote.

alexander-hagen avatar alexander-hagen commented on June 14, 2024

Hey! Any update? I have the same issue.

From what I recall, my issue was with the Publisher. The broadcasts key is mandatory. Without it I got the same error as you.

const randomPublisher = new cote.Publisher({
name: 'Random Publisher',
// namespace: 'rnd',
// key: 'a certain key',
broadcasts: ['randomUpdate'],
});

I still have issues with the Publisher. It seems to eat up all memory when there is no listener, eventually causing an OOM error. The way I read the specs, it should drop any messages if there is no listener.

from cote.

IgorMats avatar IgorMats commented on June 14, 2024

From what I recall, my issue was with the Publisher. The broadcasts key is mandatory. Without it I got the same error as you.

I have that error even on app that has no Publishers :(

from cote.

VEROLAMAZ avatar VEROLAMAZ commented on June 14, 2024

We experienced similar issues when we upgraded to Kubernetes v1.20.2 (provider: Digital Ocean) using cote v1.0.2. We use cote with REDIS.
We "fixed" it by setting port manually because we detected that cote wasn't able to find a free port to use and was trying to set it to 65535.

Sample code:
const responder = new cote.Responder({ name: "TEST1", key: "TEST1", port: 8000, });

We couldn't find any other solution.
I hope it helps.

We are facing now random timeout issues after upgrading to Kubernetes v1.20.9. ...

from cote.

gnanaprakash avatar gnanaprakash commented on June 14, 2024

We experienced similar issues when we upgraded to Kubernetes v1.20.2 (provider: Digital Ocean) using cote v1.0.2. We use cote with REDIS. We "fixed" it by setting port manually because we detected that cote wasn't able to find a free port to use and was trying to set it to 65535.

Sample code: const responder = new cote.Responder({ name: "TEST1", key: "TEST1", port: 8000, });

We couldn't find any other solution. I hope it helps.

We are facing now random timeout issues after upgrading to Kubernetes v1.20.9. ...

Thank you! This really helps.

from cote.

aziznatour avatar aziznatour commented on June 14, 2024

Might sound unrelated, but I was getting this error due to a malfunctioning redis server.

Validate redis server status in your system, it may fix the problem.

EDIT: Another observation, even when ports are configured and open, cote seems to get confused. A system reboot does not solve this but a system shutdown>start seems to fix it.

from cote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.