kong Error when run it : don't know how to auth: 10 - api-gateway

I want to set up the Kong API gateway version 2.2.1 .
I installed Postgres version 13.1. but when I want to start Kong, this error shows up :
[root#ip208 kong]# kong start -c kong.conf
Error: don't know how to auth: 10
Run with --v (verbose) or --vv (debug) for more details
I test it with --v :
[root#ip208 kong]# kong start -c kong.conf --v
2020/12/27 02:41:44 [verbose] Kong: 2.2.1
2020/12/27 02:41:44 [verbose] reading config file at kong.conf
2020/12/27 02:41:44 [verbose] prefix in use: /usr/local/kong
Error:
/usr/local/share/lua/5.1/pgmoon/init.lua:211: don't know how to auth: 10
stack traceback:
[C]: in function 'auth'
/usr/local/share/lua/5.1/pgmoon/init.lua:211: in function 'connect'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:211: in function 'connect'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:527: in function 'query'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:279: in function 'init'
/usr/local/share/lua/5.1/kong/db/init.lua:141: in function 'init_connector'
/usr/local/share/lua/5.1/kong/cmd/start.lua:31: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:49: in function <init_worker_by_lua:47>
[C]: in function 'xpcall'
init_worker_by_lua:56: in function <init_worker_by_lua:54>

the auth scheme for that Postgres version is not supported by Kong, see https://github.com/Kong/kong/issues/6035

Related

Strapi on Plesk Windows, port redirect error

I want to set up Strapi (v4) on a Plesk (Windows) / nodeJS (16.16) / MySQL (MariaDb 10.6.9) environment but I get the error: options.port should be >= 0 and < 65536. Received NaN.
Strapi Version: 4
Operating System: Windows 2022 Datacenter + Plesk Obsidian
Database: MariaDB 10.6.9
Node Version: 16.16
NPM Version: 8.19.2
Yarn Version: N/A
I did the installation like this :
$ npx create-strapi-app plesk-strapi --no-run
$ # custom Install
$ # wait for installation process to finish
$ cd strapi-demo.xyz.com
$ npm run build
I configure the boot of the application at the root of the project ‘/app.js’
const strapi = require('#strapi/strapi'); //require('strapi');
strapi().start();
And file ‘config/server.js’ :
module.exports = ({ env }) => ({
host: env('HOST', process.env.HOST || '127.0.0.1'),
port: env.int('PORT', parseInt(process.env.PORT) || 80),
app: {
keys: env.array('APP_KEYS'),
},
});
And file ‘/.env’ :
HOST=127.0.0.1
PORT=80
APP_KEYS= mySecretKey1, mySecretKey2, mySecretKey3, mySecretKey4
API_TOKEN_SALT= mySecretSaltKey
ADMIN_JWT_SECRET=mySecretKey
JWT_SECRET=mySecretKey
# `sqlite` or `mysql`
DATABASE_CONNECTION_NAME=mysql
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_NAME=myDbName
DATABASE_USERNAME=MyDbUsername
DATABASE_PASSWORD=MyDbPassword
Plesk nodeJS config :
return Error :
[2022-10-20 09:33:55.897] [34mdebug[39m: ⛔️ Server wasn't able to start properly.
[2022-10-20 09:33:55.904] [31merror[39m: options.port should be >= 0 and < 65536. Received NaN.
RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received NaN.
at new NodeError (node:internal/errors:372:5)
at validatePort (node:internal/validators:217:11)
at Server.listen (node:net:1500:5)
at Object.listen (E:\plesk\vhost\xyz.com\strapi-demo.xyz.com\node_modules\#strapi\strapi\lib\services\server\index.js:122:25)
at E:\plesk\vhost\xyz.com\strapi-demo.xyz.com\node_modules\#strapi\strapi\lib\Strapi.js:302:21
at new Promise (<anonymous>)
at Strapi.listen (E:\plesk\vhost\xyz.com\strapi-demo.xyz.com\node_modules\#strapi\strapi\lib\Strapi.js:281:12)
at Strapi.start (E:\plesk\vhost\xyz.com\strapi-demo.xyz.com\node_modules\#strapi\strapi\lib\Strapi.js:215:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

express server: "home.ejs" SyntaxError

Missing catch or finally after try in D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\views_comments.ejs while compiling ejs
If the above error is not helpful, you may want to try EJS-Lint:
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
at new Function ()
at Template.compile (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:673:12)
at Object.compile (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:398:16)
at handleCache (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:235:18)
at includeFile (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:323:10)
at include (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:701:16)
at eval ("D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\views\_posts.ejs":42:17)
at _posts (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:703:17)
at include (D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\node_modules\ejs\lib\ejs.js:701:39)
at eval ("D:\Coding_Ninjas\CN_Projects\MajorPro2(node)\views\home.ejs":21:17)

Call to undefined function Illuminate\Support\random_bytes()

I receive this error message:
FatalErrorException in Str.php line 243: Call to undefined function Illuminate\Support\random_bytes()
public static function randomBytes($length = 16) {
return random_bytes($length);
}
line 243: return random_bytes($length);
I do not understand what's wrong since a working version Laravel offline that extract online.
It does not work online though. I wonder why?
random_bytes is a PHP 7 function.
I'm assuming that your offline/development stack has PHP 7 installed but not online/production.
Confirm your hosting for PHP 7 installed.

node.js script fails - TypeError: Object 0 has no method 'on' - Mac to Arduino UNO

when I attempt to run this uvsensor.js script from this plot.ly tutorial I encounter this error message. What is the best way to resolve it?
uv-sensor-tutorial $ node uvsensor.js
1421612122362 Device(s) /dev/cu.usbmodem1411
1421612125588 Connected /dev/cu.usbmodem1411
1421612125588 Repl Initialized
>> { streamstatus: 'All Streams Go!',
url: 'https://plot.ly/~micahstubbs/46',
message: '',
warning: '',
filename: 'uv sensing nodey arduino!',
error: '' }
/Users/m/workspace/arduino-projects/uv-sensor-tutorial/uvsensor.js:76
refLevel.on("data", function() {
^
TypeError: Object 0 has no method 'on'
at /Users/m/workspace/arduino-projects/uv-sensor-tutorial/uvsensor.js:76:14
at /Users/m/node_modules/plotly/index.js:87:17
at IncomingMessage.<anonymous> (/Users/m/node_modules/plotly/index.js:255:9)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
The best way to resolve it is to find out why refLevel is being assigned 0 instead of the object you think it should be.

Puppet syntax error at '|'

I seem to have run into a syntax error on a previously-working puppet manifest. This is running on a local vagrant box with Ubuntu 12.04, and Puppet version 3.4.2. The puppet stuff was all generated at puphpet.com.
The error I'm getting is:
Error: Could not parse for environment production: Syntax error at '|'
at /tmp/vagrant-puppet/manifests/default.pp:263:29 on node
vagrant.example.com
Line 263 of default.pp is the second line of this snippet:
if count($php_values['ini']) > 0 {
$php_values['ini'].each { |$key, $value|
puphpet::ini { $key:
entry => "CUSTOM/${key}",
value => $value,
php_version => $php_values['version'],
webserver => $php_webserver_service
}
}
}
It looks like you haven't set parser to future.
Run this command:
puppet config print parser
If it returns current, you don't have access to the .each function. To change this, edit /etc/puppet/puppet.conf, and put parser = future under the [main] block. The above command should then return future.
Reference: http://docs.puppetlabs.com/references/latest/function.html#each

Resources