Got POST /createToken/ 401 in BasicExample

Hi! I got error when try to use BasicExample connection_test.html
ERROR: TokensResource - message: createToken error, errorMgs: No Erizo Controller available.


OS: MacOS 10.15.2
Branch: master
Flow to install: http://lynckia.com/licode/install.html

Welcome @Qwedir! I haven’t tested it in MacOS 10.15.2 yet, there could be something different. Maybe next week I’ll start building Erizo with that version so I’ll let you know if I reproduce it.

BTW, I see a message in your logs that I can’t see in my environment but it’s probably unrelated:

Deprecation Warning: Buffer() is deprecated due to…

There was an issue with the version of Mongodb in MacOS. I just merged a patch for it.

I have the same error with different versions of licode on MacOS 10.15.*
2020-04-16 10:54:21,719 DEBG 'nuve' stdout output: 2020-04-16 10:54:21.718 - ERROR: TokensResource - message: createToken error, errorMgs: No Erizo Controller available

I’m getting this same error trying BasicExample on a brand new setup.
Does this error usually mean there’s a problem with MongoDB? The machine
already has an instance of Mongo running, and I can see
in the Mongo log that something is happening - it prints messages like

2020-05-13T09:44:58.519-0400 I  NETWORK  [conn1420] received client metadata from 127.0.0.1:48868 conn1420: { driver: { name: "nodejs", version: "2.2.36" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-64-generic" }, platform: "Node.js v12.13.0, LE, mongodb-core: 2.1.20" }
2020-05-13T09:45:03.512-0400 I  NETWORK  [listener] connection accepted from 127.0.0.1:48872 #1421 (3 connections now open)
2020-05-13T09:45:08.520-0400 I  NETWORK  [listener] connection accepted from 127.0.0.1:48878 #1422 (4 connections now open)

when starting the server and example.

The console log (in debug mode) has this, but I am unable to diagnose what exactly the problem might be:

GET / 304 5.966 ms - -
GET /erizo.js 304 0.915 ms - -
GET /script.js 200 3.671 ms - 6757
Creating token. Request body:  {
  username: 'user 82',
  role: 'presenter',
  room: 'basicExampleRoom',
  type: 'erizo',
  mediaConfiguration: 'default'
}
2020-05-13 09:12:34.044  - ERROR: TokensResource - message: createToken error,     errorMgs: No Erizo Controller available
Error creating token 404 ErrorNo Erizo Controller found
POST /createToken/ 401 533.392 ms - 25
GET /erizo.js.map 304 0.602 ms - -

I even tried using a different port for the controller, 8088 instead of 8080, in case that port was (for some reason) already in use (it’s a popular number I’ve seen other applications use)