Python custom functions not getting called in fission logs error 502 bad gateway

65 views Asked by At

I have installed fission and created

  1. Package
  2. Env
  3. function hello world
  4. tested and running fine

But When i tried to run custom functions like finding a max number.

if x > y:
        return x
    return  #y
def max_of_three( x, y, z ):
    return max_of_two( x, max_of_two( y, z ) )
print(max_of_three(3, 6, -5)) 

it gives a error

Error querying logs: Internal error - 502 Bad @Gateway%

Also when i try to check logs the same error reflecting

1

There are 1 answers

0
Atulmaharaj On

I have used custom functions in Python on Fission and they work fine. I followed this blog post as is and it worked without any issue.

Also, have you checked the following:

  1. Check if the package build of your function has succeeded with fission pkg list
  2. Check if your route is correct with fission route list
  3. Check the logs of your router pod to see if the request got through
  4. Use fission function test with --verbosity=2 to test your function locally, post your output here

I found these above steps mentioned for a similar error in their slack channel.