Coder Social home page Coder Social logo

Comments (5)

ustiugov avatar ustiugov commented on June 9, 2024

Your logs (the section called Logs do not contain the error message. Is the error that you observe is as follows?

  Container failed with: Traceback (most recent call last):
    File "/app/server.py", line 13, in <module>
      import helloworld_pb2
  ModuleNotFoundError: No module named 'helloworld_pb2'

if so, it must be reproducible with docker compose, it has nothing to do with Knative. Please double check if you run the same docker image.

from vswarm.

harshitgarg22 avatar harshitgarg22 commented on June 9, 2024

Your logs (the section called Logs do not contain the error message. Is the error that you observe is as follows?

So the first error is

auth-python   http://auth-python.default.192.168.1.240.sslip.io                      10m     0 OK / 3     False   RevisionMissing : Configuration "auth-python" does not have any ready Revision.

which does not give a lot of info. Hence I ran kubectl get revision auth-python-00001 --output yaml to give me the above mentioned output, for some more info about what's going on.

    File "/app/server.py", line 13, in <module>
      import helloworld_pb2
  ModuleNotFoundError: No module named 'helloworld_pb2'

if so, it must be reproducible with docker compose, it has nothing to do with Knative. Please double check if you run the same docker image.

I did that again (build, push, pull), but it still didn't work.

I actually checked the port number in knative configuration, and that was incorrect. So now the knative service sets up properly but the invoker isn't giving results like the local docker build does, so it's half-solved for now.

from vswarm.

ustiugov avatar ustiugov commented on June 9, 2024

please get to the bottom of the ModuleNotFoundError: No module named 'helloworld_pb2' problem, some of your assumptions do not stand. instead of docker-compose you can just use docker interactively and inspect the files, etc. Also, k8s allows to access the shell of a running container, you can attach to it interactively and check. If you cannot find how to do it online, please let me know.

from vswarm.

ustiugov avatar ustiugov commented on June 9, 2024

also, I wonder if kn service apply -f ./knative_yamls/auth-python.yaml returns an error.

from vswarm.

harshitgarg22 avatar harshitgarg22 commented on June 9, 2024

So, I realized I was running the invoker with port 50051 like required in docker instead of 80 as specified in the docs.
It's running fine now, and I don't get the helloworld_pb2 error either. It being an old docker image and me not noticing seems to be the case.
I will check k8s shell access to see if the issue is still there.

kn service apply -f ./knative_yamls/auth-python.yaml gives

Creating service 'auth-python' in namespace 'default':

  0.039s The Route is still working to reflect the latest desired specification.
  0.078s ...
  0.096s Configuration "auth-python" is waiting for a Revision to become ready.
  4.080s ...
  4.127s Ingress has not yet been reconciled.
  4.214s Waiting for load balancer to be ready
  4.428s Ready to serve.

Service 'auth-python' created to latest revision 'auth-python-00001' is available at URL:
http://auth-python.default.192.168.1.240.sslip.io

So this should be fine, although I'm not sure what Ingress has not yet been reconciled means.

from vswarm.

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.