Skip to content

"fn invoke pythonapp pythonfn" failed follow the example steps #690

Open
@hb-lee

Description

@hb-lee

When I follow the example steps to build the pythonapp, it failed with "Error invoking function. status: 500 message: internal server error" when I invoke the pythonfn. The fn server messages show:

INFO[2024-12-10T09:19:03Z] container wait error, sending error to client  action="server.handleFnInvokeCall)-fm" app_id=01JEQX66Q4NG8G00GZJ0000001 call_id=01JEQXTSRRNG8G00GZJ0000001 error="API error (500): failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rootfs as readonly: mount /, flags: 0x1021: device or resource busy: unknown" fn_id=01JEQX6W7ENG8G00GZJ0000002
ERRO[2024-12-10T09:19:03Z] internal server error                         action="server.handleFnInvokeCall)-fm" error="API error (500): failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rootfs as readonly: mount /, flags: 0x1021: device or resource busy: unknown" fn_id=01JEQX6W7ENG8G00GZJ0000002 stack="goroutine 62 [running]:\nruntime/debug.Stack(0xc420162bd0, 0x10852c0, 0xc42048f4c0)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0xa7\ngithub.com/fnproject/fn/api/server.HandleErrorResponse(0x10902a0, 0xc4204abb00, 0x7f3465b4a980, 0xc4201a4000, 0x10852c0, 0xc42048f4c0)\n\t/go/src/github.com/fnproject/fn/api/server/error_response.go:57 +0x57f\ngithub.com/fnproject/fn/api/server.handleErrorResponse(0xc4201a4000, 0x10852c0, 0xc42048f4c0)\n\t/go/src/github.com/fnproject/fn/api/server/error_response.go:25 +0xa9\ngithub.com/fnproject/fn/api/server.(*Server).handleFnInvokeCall(0xc4204900e0, 0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/runner_fninvoke.go:53 +0x1da\ngithub.com/fnproject/fn/api/server.(*Server).(github.com/fnproject/fn/api/server.handleFnInvokeCall)-fm(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/server.go:1022 +0x34\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.(*Server).runMiddleware(0xc4204900e0, 0xc4201a4000, 0x0, 0x0, 0x0)\n\t/go/src/github.com/fnproject/fn/api/server/middleware.go:42 +0x29f\ngithub.com/fnproject/fn/api/server.(*Server).rootMiddlewareWrapper.func1(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/middleware.go:32 +0x52\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.panicWrap(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/gin_middlewares.go:197 +0x51\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.panicWrap(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/gin_middlewares.go:197 +0x51\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.apiMetricsWrap.func1.1(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/gin_middlewares.go:158 +0x316\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.traceWrap(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/gin_middlewares.go:101 +0x5ae\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/api/server.loggerWrap(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/api/server/gin_middlewares.go:214 +0x18e\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/context.go:108 +0x43\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc4200ddd40, 0xc4201a4000)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/gin.go:361 +0x586\ngithub.com/fnproject/fn/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc4200ddd40, 0x108fbe0, 0xc4204eebe0, 0xc42016d200)\n\t/go/src/github.com/fnproject/fn/vendor/github.com/gin-gonic/gin/gin.go:326 +0x153\ngithub.com/fnproject/fn/vendor/go.opencensus.io/plugin/ochttp.(*Handler).ServeHTTP(0xc4202340a0, 0x108fbe0, 0xc4204eebe0, 0xc42016d000)\n\t/go/src/github.com/fnproject/fn/vendor/go.opencensus.io/plugin/ochttp/server.go:86 +0x1c8\nnet/http.serverHandler.ServeHTTP(0xc420464750, 0x108ea60, 0xc420490380, 0xc42016d000)\n\t/usr/local/go/src/net/http/server.go:2697 +0xbc\nnet/http.(*conn).serve(0xc420256140, 0x10901e0, 0xc4200a82c0)\n\t/usr/local/go/src/net/http/server.go:1830 +0x651\ncreated by net/http.(*Server).Serve\n\t/usr/local/go/src/net/http/server.go:2798 +0x27b\n"

Can anyone give any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions