Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:04
    maskofaction commented #6066
  • Jan 27 23:17
    al3x609 commented #1231
  • Jan 27 22:51
    jacekdalkowski edited #6745
  • Jan 27 19:14
    bungle synchronize #6775
  • Jan 27 19:14

    bungle on declarative-unique

    fix(declarative) add unique val… (compare)

  • Jan 27 18:26
    kikito labeled #6714
  • Jan 27 18:23
    gszr closed #6702
  • Jan 27 18:23
    gszr commented #6702
  • Jan 27 18:20
    kikito closed #6513
  • Jan 27 18:20
    kikito commented #6513
  • Jan 27 18:20
    gszr commented #6729
  • Jan 27 18:19
    kikito closed #6620
  • Jan 27 18:19
    bungle commented #6766
  • Jan 27 18:18
    gszr closed #6729
  • Jan 27 18:18
    gszr commented #6729
  • Jan 27 18:15
    dndx commented #6758
  • Jan 27 18:15
    dndx assigned #6758
  • Jan 27 18:15
    dndx unlabeled #6725
  • Jan 27 18:15
    dndx closed #6725
  • Jan 27 18:15
    dndx commented #6725
rohit kumar
@rohitkumar231217_gitlab

has anyone ever encountered this error:
2020/08/06 10:27:58 [error] 42#0: *2132 lua entry thread aborted: runtime error: ...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua:620: attempt to index field '_counter' (a nil value)
stack traceback:
coroutine 0:
...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua: in function 'metric_data'
...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua:666: in function 'collect'
...local/share/lua/5.1/kong/plugins/prometheus/exporter.lua:239: in function 'collect'
content_by_lua(prometheus-server.conf:10):3: in main chunk

Running kong-api-gateway v2.1.0 in hybrid mode after enabling prometheus plugin ; working at first but when creating an AMI and launching then throwing this error

jeremyjpj0916
@jeremyjpj0916
^ looks like there are pending prs to fix this related to some workspace issues.
Now my issue happened on migrations from 2.0.5 to 2.1.1, Kong/kong#6211 , im getting some sleep now cause super late but idk if its best to try and roll back c* to an old version and get back on 2.0.5 or of this error is salvageable, gonna have to make a decision on it in about 6 hrs when I get back up though. Would like to move forward if possible. Upgrades stress me out 💀😂.
Well upgrades that are not smooth sailing that is hah.
Fitz
@Fitz7
I'm having an issue with upgrading to 2.1 seems that the nginx_upstream directives are being injected I'm using the helm chart and I'm just not sure where they're coming from, could they be coming from old data in psql?
matthewdolman
@matthewdolman
When deploying the kubernetes ingress via helm how do you edit the declarative config file?
Miguel Callejas
@miguel-callejas-coderoad-com
Hi everyone! does anyone know if regex can be applied over the query params of a request? I need to build a route specifically from a set of query params but I just can't find a way to regex over it.
Rajeev N Bharshetty
@rShetty
Have a question on GRPC proxying with Kong: https://discuss.konghq.com/t/proxying-http2-traffic-through-kong/6941
Can someone help with this?
jmgpeeters
@jmgpeeters

I am running a pypi server behind kong and set it up as a host-routed service, but crucially Kong listens to port 10011 here (amongst others), so I am calling it as "http://pypi.mycompany.com:10011/simple/cherrypy" for example.

The upstream pypi server can lead to a redirect, so upstream the "Location" header might look like "http://somemachine.mycompany.com:12345/simple/cherrypy/", but then Kong seems to translate that Location header as "http://pypi.mycompany.com/simple/cherrypy/" - i.e. it drops the port. because Kong isn't listening to :80 (i.e. the default port), the redirect doesn't work. What I'm expecting is that it rewrites the Location header to "http://pypi.mycompany.com:10011/simple/cherrypy/", i.e. to keep the port from the original request.

Is there an explanation for this and perhaps a simple fix? I can write a custom plugin for this, of course, but hopefully there is a config approach? I'm using DBLess.

jmgpeeters
@jmgpeeters
also, has preserve_host been removed in 2.1? (or earlier)?
jmgpeeters
@jmgpeeters
with reference to the above, it seems Kong somehow doesn't pass on the X-Forwarded-Port or so.
Nati Nazarov
@Natinux
Hey guys, I am writing a custom plugin and what to extend the Admin API with my own end-point. how I can get my plugin configs from ? (those I am getting in handler:access(plugin_conf))
jeremyjpj0916
@jeremyjpj0916
the schema.lua file of the plugin should make the admin api automagically expose it on a queryable path(not totally sure which path though, konga community UI naturally knows how to find and query it to render the UI fields, maybe use network console to see how its doing so).
probably something like /plugin-name/schema with a GET on admin-api path? idk for sure.
Raunak Khatri
@raunak.khatri_gitlab
Hello,
We are using kong2.1 with kong-ingress0.9.0. any one have idea how to access the admin api?
Raunak Khatri
@raunak.khatri_gitlab
I am unable to access admin service
Acentera
@ACentera_twitter

Hello, I got a weird problem with http url encoding / decoding.

The browser decode Entrepreneuriat-Collégial into Entrepreneuriat-Coll%C3%A9gial and then return 404..

But nginx would work if it would receive Entrepreneuriat-Colle%CC%81gial.

I found out that e%CC%81 = %CE%A9 (if we do url Decoding)

I'm using like: ngx.escape_uri(ngx.var.url_full)

anyone have idea?
Sothy Lorn
@SothyLorn_gitlab
hello everyone anyone know how to redirect URL in kong I want to redirect from https://abc.com/about-us to https://xyz.com/about. thank
mr.pity
@pity_mr_twitter
@raunak.khatri_gitlab hi! you should allow access to it. for example via env var: KONG_ADMIN_LISTEN: 0.0.0.0:8001
hi! anyone configure GeoIP headers via Kong? how? pls help(
fairyqb
@fairyqb
Kong/kong#6297 feat/pdk.kong.response.redirect
@SothyLorn_gitlab
Muhammad Husain Toding Bunga
@husentoding
hi, im working on a custom plugin which make request to another service with resty.http
and right now im trying to create a test for it, how do i mock the response?
Priyansh Jain
@Presto412

Hi everyone, I'm adding unit tests to kong via luaunit, in a dockerized kong environment. This is the dockerfile

FROM kong:2.0.3-alpine
USER root
WORKDIR /usr/local
COPY . .
RUN luarocks make *.rockspec
RUN ./run-tests.sh
USER kong

and here's the run-tests script

#!/bin/sh

find . -name "*-test.lua" |
    while read -r filename; do
        echo "Executing test for: $filename"
        /usr/local/openresty/luajit/bin/luajit "$filename"
    done

This is how I'm running the individual unit tests. I have added stubs for some dependencies, but the actual code makes use of kong's logging feature kong.log("...")

When I run the tests, it shows that the global kong is a nil value

If i try to fix it via

kong = require("kong")

I get an error:

/usr/local/openresty/luajit/bin/luajit: /usr/local/share/lua/5.1/kong/init.lua:30: lua-resty-core must be loaded; make sure 'lua_load_resty_core' is not disabled.
stack traceback:
        [C]: in function 'assert'
        /usr/local/share/lua/5.1/kong/init.lua:30: in main chunk

Currently I've added a hack fix for the same - by doing

kong = {}
function kong.log(log_message) print("Kong log: " .. tostring(log_message)) end

But could anyone help out with this?

Rahul M
@rahulramfort
Kong newbie here! I'm evaluating Kong for my use case. How do I do dynamic IP blacklisting and how to ban an IP for some x duration.
2 replies
Couldn't find help for these online.
Is it possible to do these in kong or should I use something like fail2ban to achieve this.
Muhammad Husain Toding Bunga
@husentoding

hi, im working on a custom plugin which make request to another service with resty.http
and right now im trying to create a test for it, how do i mock the response?

can anyone help? 😅

Chris Shepherd
@thesheps
Hey folks! I was just wondering if there was any guidance about configuring Kong on ECS with shared EFS mountpoints for data persistence?
1 reply
Jacob Alan Pawlak
@jakepaw
Hello All! still testing LDAP plugin for kong. I have 'echo' service up and running and would like to test the ldap plugin against this service. I have enabled this plugin as well as passed the annotation to the echo service to include it. When i go to curl the 'echo' service I base64 encode my user and password but does not work. I encode the LDAP admin account and password and a I can get in. How can I get LDAP plugin to use the admin account to verify that my user id / password rather than having to use the LDAP admin? Seems like that would defeat the purpose
hadhemiGH
@hadhemiGH
Hi everyone ! Using kubernetes, I want to attach my openfaas serverless function to a kong endpoint but I am always getting a "failure to get a peer from the ring-balancer" error when using this ingress rule
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo
spec:
rules:
  • http:
    paths:
    • path: /foo
      backend:
      serviceName: gateway-external
      servicePort: 31112
how can I fix this
NB: the 31112 port is the openfaas gateway port
Priyansh Jain
@Presto412

Hi everyone, I'm adding unit tests to kong via luaunit, in a dockerized kong environment. This is the dockerfile

FROM kong:2.0.3-alpine
USER root
WORKDIR /usr/local
COPY . .
RUN luarocks make *.rockspec
RUN ./run-tests.sh
USER kong

and here's the run-tests script

#!/bin/sh

find . -name "*-test.lua" |
    while read -r filename; do
        echo "Executing test for: $filename"
        /usr/local/openresty/luajit/bin/luajit "$filename"
    done

This is how I'm running the individual unit tests. I have added stubs for some dependencies, but the actual code makes use of kong's logging feature kong.log("...")

When I run the tests, it shows that the global kong is a nil value

Can anyone please help?

sumantfordev
@sumantfordev
How to build kong in FIPS mode? Is that supported, which modules can be used in FIPS mode?
Ygor Medvedev
@YegorMedvedev

Hey guys! I'm facing an issue with go-lang pointers in configuration type. Here is my config

type Config struct {
  NestedKey struct {
    ListOfValues     []*string `json: "list_of_values,omitempty"`
  }
}

func (conf Config) Access(kong *pdk.PDK) {...}

And when I send an HTTP request in order to create a plugin it returns an error like

schema violation (config.nestedkey: {\n  list_of_values = \"unknown field\"\n})

Please help me to solve this issue...

Cosimo Damiano Prete
@CDPrete

Hey guys! I'm facing an issue with go-lang pointers in configuration type. Here is my config

type Config struct {
  NestedKey struct {
    ListOfValues     []*string `json: "list_of_values,omitempty"`
  }
}

func (conf Config) Access(kong *pdk.PDK) {...}

And when I send an HTTP request in order to create a plugin it returns an error like

schema violation (config.nestedkey: {\n  list_of_values = \"unknown field\"\n})

Please help me to solve this issue...

I've also the same issue: Kong/kong#6363

cmarocco
@cmarocco
Hey gus! Is the workspace feature available only in Kong EE?
jeremyjpj0916
@jeremyjpj0916
well its in the CE database as well with less fields, I just don't think the admin api calls are exposed for it. Enterprise docs list it here: https://docs.konghq.com/enterprise/2.1.x/admin-api/workspaces/reference/ , ofc you can always fork and add a wrapper to edit your own workspace in open source but I can't think of any value for it in the CE with how its defined right now.
Grant Magdanz
@grant34_gitlab
Hi all, I'm writing a go plugin and am wondering how I can expose multiple environment variables to the plugin? I found this issue: Kong/kong#6149 that suggests setting KONG_NGINX_MAIN_ENV. This works for a single variable, but I need to expose multiple. Any idea how I can do that? Thanks in advance.
Saran
@Sarankrishna
Hi all, I have installed kong on Kubernetes pod. While configuring the service in kong I used kubernetes service name as "host". When accessing the API through Kong , I am getting error "name resolution failed".
So is it possible to use the kubernetes service name as host in kong service configuration?
1 reply
hadhemiGH
@hadhemiGH
hello everyone I want to create a Kong CORS Plugin to enable all origins and all headers using a kubernetes Ingress rule ... how can I do so ?
Shailesh Goel
@shailesh91
Hi All, I recently started working with kong and am looking into some insight into the workings of the bundled plugin "response-ratelimiting". I have tried creating a rate limit at a consumer level and the other at a service level. I am currently observing only the consumer limit is being applied. Is this expected behavior? If so why?
mvanmeerbeck
@mvanmeerbeck
Hello Kongers,
I'm currently considering using Kong for my gateway since i need rate limit on my APIs. I need to limit the API per pricing plan. Is there a way to do that ?
I've seen that we can limit an API per consumer. But that's not enough for my case, i would need to define a rate limit per "type of user" (maybe with a tag?) but be counted by "credential".
Vladimir Murray
@vl4d

Good day all I may log an issue but I'd like to check here first, I have a simple go plugin setup and I would like to run db_import command but I always get the following error message whenever the custom plugin is enabled in the plugins env var:

2020/10/06 17:04:24 [verbose] Kong: 2.1.4
Error: 
/usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: attempt to index upvalue 'kong' (a nil value)
stack traceback:
        /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: in function 'is_on'
        /usr/local/share/lua/5.1/kong/db/schema/plugin_loader.lua:184: in function 'load_subschema'
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:222: in function 'load_plugin_subschemas'
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:234: in function 'load_plugin_subschemas'
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:730: in function 'load'
        /usr/local/share/lua/5.1/kong/db/declarative/init.lua:37: in function 'new_config'
        /usr/local/share/lua/5.1/kong/cmd/config.lua:82: 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>
2020/10/06 17:04:24 [verbose] prefix in use: /usr/local/kong

Has any 1 seen this before?

Ygor Medvedev
@YegorMedvedev
Hello guys,
How can I set a priority for Golang plugin in Kong?