mmussett opened a new issue #9139:
URL: https://github.com/apache/pulsar/issues/9139


   **Describe the bug**
   A clear and concise description of what the bug is.
   Go function panics due to config file not being found.
   
   github.com/apache/pulsar/pulsar-function-go/pf.newInstanceConf(0x74ee0)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/instanceConf.go:49
 +0x656
   github.com/apache/pulsar/pulsar-function-go/pf.NewFuncContext(0x8)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/context.go:44
 +0x26
   github.com/apache/pulsar/pulsar-function-go/pf.newGoInstance(0xd35680)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/instance.go:65
 +0x37
   github.com/apache/pulsar/pulsar-function-go/pf.Start(0xd35680, 0xe84248)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/function.go:170
 +0x52
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   function built using go build. Everything looks correct and go.mod has 
require line of github.com/apache/pulsar/pulsar-function-go 
v0.0.0-20210106064818-984bf837489b
   
   Tested both as functions create and localrun and both have the same result 
of function failing.
   
   pulsar-admin functions localrun --go 
/home/mmussett/Downloads/PulsarFunctions/bin/pflogoFunc -i 
persistent://public/default/to-flogo -o persistent://public/default/from-flogo 
--classname empty
   
   2021/01/06 09:56:13.033 log.go:46: [info] The default config file path is: 
conf/conf.yaml
   2021/01/06 09:56:13.036 log.go:76: [error] unmarshal config content 
error:invalid character '\'' looking for beginning of value
   panic: config file is nil.
   
   goroutine 1 [running]:
   github.com/apache/pulsar/pulsar-function-go/pf.newInstanceConf(0x74ee0)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/instanceConf.go:49
 +0x656
   github.com/apache/pulsar/pulsar-function-go/pf.NewFuncContext(0x8)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/context.go:44
 +0x26
   github.com/apache/pulsar/pulsar-function-go/pf.newGoInstance(0xd35680)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/instance.go:65
 +0x37
   github.com/apache/pulsar/pulsar-function-go/pf.Start(0xd35680, 0xe84248)
        
/home/mmussett/go/pkg/mod/github.com/apache/pulsar/[email protected]/pf/function.go:170
 +0x52
   main.main()
        /home/mmussett/Downloads/PulsarFunctions/src/shim.go:10 +0x39
   09:56:13.137 [Timer-0] INFO  org.apache.pulsar.functions.LocalRunner - {
     "instanceId": "0"
   }
   ^C09:56:17.634 [Thread-1] INFO  org.apache.pulsar.functions.LocalRunner - 
Shutting down the localrun runtimeSpawner ...
   
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: Ubuntu Linux 20.0.4
   
   **Additional context**
   Add any other context about the problem here.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to