Chainlink 101 - Fulfilling Requests - Failed Job creation

Hi Community and Patrick

Course is great but I stuck with creating JOB.
First of all job from course not in JSON format but now it’s in TOML format so maybe Patrick Collins can update his course video. Its step Chainlink Job.

Toml format is not a problem, if you follow docs its just abit longer since you paste you Oracle contract address twice.

My problem is that Job creation failed.:

2021-11-21T20:39:19.281+0100 [DEBUG] Setting new default gas price: 1.00 Gwei           gas/block_history_estimator.go:286 blocks=[28484378,28484379,28484380,28484381,28484382,28484383,28484384,28484385,28484386,28484387,28484388,28484389] evmChainID=42 gasPriceGWei=1.00 gasPriceWei=1000000008 headNum=28484390 logger=BulletproofTxManager.BlockHistoryEstimator maxGasPriceWei=5000000000000 
2021-11-21T20:39:20.729+0100 [ERROR] Error creating job                                 job/spawner.go:208      error=CreateJobFailed: invalid db type: pg.Q errorVerbose=invalid db type: pg.Q
github.com/smartcontractkit/chainlink/core/services/pg.SqlxTransaction
	/home/link/study/chainlink2/chainlink/core/services/pg/sqlx.go:58
github.com/smartcontractkit/chainlink/core/services/pg.Q.Transaction
	/home/link/study/chainlink2/chainlink/core/services/pg/q.go:125
github.com/smartcontractkit/chainlink/core/services/job.(*orm).CreateJob
	/home/link/study/chainlink2/chainlink/core/services/job/orm.go:109
github.com/smartcontractkit/chainlink/core/services/job.(*spawner).CreateJob
	/home/link/study/chainlink2/chainlink/core/services/job/spawner.go:206
github.com/smartcontractkit/chainlink/core/services/chainlink.(*ChainlinkApplication).AddJobV2
	/home/link/study/chainlink2/chainlink/core/services/chainlink/application.go:550
github.com/smartcontractkit/chainlink/core/web.(*JobsController).Create
	/home/link/study/chainlink2/chainlink/core/web/jobs_controller.go:136
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web/auth.Authenticate.func1
	/home/link/study/chainlink2/chainlink/core/web/auth/auth.go:156
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/contrib/sessions.Sessions.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/sessions/sessions.go:65
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/ulule/limiter/drivers/middleware/gin.(*Middleware).Handle
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:57
github.com/ulule/limiter/drivers/middleware/gin.NewMiddleware.func1
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:33
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/Depado/ginprom.(*Prometheus).Instrument.func1
	/home/link/go/pkg/mod/github.com/!depado/[email protected]/prom.go:215
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web.loggerFunc.func1
	/home/link/study/chainlink2/chainlink/core/web/router.go:448
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-contrib/size.RequestSizeLimiter.func1
	/home/link/go/pkg/mod/github.com/gin-contrib/[email protected]/size.go:88
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2878
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1929
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1581
CreateJobFailed
github.com/smartcontractkit/chainlink/core/services/job.(*orm).CreateJob
	/home/link/study/chainlink2/chainlink/core/services/job/orm.go:233
github.com/smartcontractkit/chainlink/core/services/job.(*spawner).CreateJob
	/home/link/study/chainlink2/chainlink/core/services/job/spawner.go:206
github.com/smartcontractkit/chainlink/core/services/chainlink.(*ChainlinkApplication).AddJobV2
	/home/link/study/chainlink2/chainlink/core/services/chainlink/application.go:550
github.com/smartcontractkit/chainlink/core/web.(*JobsController).Create
	/home/link/study/chainlink2/chainlink/core/web/jobs_controller.go:136
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web/auth.Authenticate.func1
	/home/link/study/chainlink2/chainlink/core/web/auth/auth.go:156
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/contrib/sessions.Sessions.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/sessions/sessions.go:65
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/ulule/limiter/drivers/middleware/gin.(*Middleware).Handle
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:57
github.com/ulule/limiter/drivers/middleware/gin.NewMiddleware.func1
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:33
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/Depado/ginprom.(*Prometheus).Instrument.func1
	/home/link/go/pkg/mod/github.com/!depado/[email protected]/prom.go:215
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web.loggerFunc.func1
	/home/link/study/chainlink2/chainlink/core/web/router.go:448
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-contrib/size.RequestSizeLimiter.func1
	/home/link/go/pkg/mod/github.com/gin-contrib/[email protected]/size.go:88
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2878
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1929
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1581 logger=JobSpawner stacktrace=github.com/smartcontractkit/chainlink/core/services/job.(*spawner).CreateJob
	/home/link/study/chainlink2/chainlink/core/services/job/spawner.go:208
github.com/smartcontractkit/chainlink/core/services/chainlink.(*ChainlinkApplication).AddJobV2
	/home/link/study/chainlink2/chainlink/core/services/chainlink/application.go:550
github.com/smartcontractkit/chainlink/core/web.(*JobsController).Create
	/home/link/study/chainlink2/chainlink/core/web/jobs_controller.go:136
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web/auth.Authenticate.func1
	/home/link/study/chainlink2/chainlink/core/web/auth/auth.go:156
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/contrib/sessions.Sessions.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/sessions/sessions.go:65
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/ulule/limiter/drivers/middleware/gin.(*Middleware).Handle
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:57
github.com/ulule/limiter/drivers/middleware/gin.NewMiddleware.func1
	/home/link/go/pkg/mod/github.com/ulule/[email protected]/drivers/middleware/gin/middleware.go:33
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/Depado/ginprom.(*Prometheus).Instrument.func1
	/home/link/go/pkg/mod/github.com/!depado/[email protected]/prom.go:215
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/smartcontractkit/chainlink/core/web.loggerFunc.func1
	/home/link/study/chainlink2/chainlink/core/web/router.go:448
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-contrib/size.RequestSizeLimiter.func1
	/home/link/go/pkg/mod/github.com/gin-contrib/[email protected]/size.go:88
github.com/gin-gonic/gin.(*Context).Next
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/home/link/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2878
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1929 type=directrequest 
2021-11-21T20:39:20.730+0100 [INFO]  POST /v2/jobs                                      web/router.go:451       body={"toml":"type = \"directrequest\"\nschemaVersion = 1\nname = \"Get \u003e Uint256\"\n# Optional External Job ID: Automatically generated if unspecified\n# externalJobID = \"b1d42cd5-4a3a-4200-b1f7-25a68e48aad8\"\ncontractAddress = \"0x6499A5E80AA690Bf5B94A5A57C524050d1ACd901\"\nmaxTaskDuration = \"0s\"\nobservationSource = \"\"\"\n    decode_log   [type=\"ethabidecodelog\"\n                  abi=\"OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)\"\n                  data=\"$(jobRun.logData)\"\n                  topics=\"$(jobRun.logTopics)\"]\n\n    decode_cbor  [type=\"cborparse\" data=\"$(decode_log.data)\"]\n    fetch        [type=\"http\" method=GET url=\"$(decode_cbor.get)\"]\n    parse        [type=\"jsonparse\" path=\"$(decode_cbor.path)\" data=\"$(fetch)\"]\n    multiply     [type=\"multiply\" input=\"$(parse)\" times=100]\n    encode_data  [type=\"ethabiencode\" abi=\"(uint256 value)\" data=\"{ \\\\\"value\\\\\": $(multiply) }\"]\n    encode_tx    [type=\"ethabiencode\"\n                  abi=\"fulfillOracleRequest(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data)\"\n                  data=\"{\\\\\"requestId\\\\\": $(decode_log.requestId), \\\\\"payment\\\\\": $(decode_log.payment), \\\\\"callbackAddress\\\\\": $(decode_log.callbackAddr), \\\\\"callbackFunctionId\\\\\": $(decode_log.callbackFunctionId), \\\\\"expiration\\\\\": $(decode_log.cancelExpiration), \\\\\"data\\\\\": $(encode_data)}\"\n                 ]\n    submit_tx    [type=\"ethtx\" to=\"0x6499A5E80AA690Bf5B94A5A57C524050d1ACd901\" data=\"$(encode_tx)\"]\n\n    decode_log -\u003e decode_cbor -\u003e fetch -\u003e parse -\u003e multiply -\u003e encode_data -\u003e encode_tx -\u003e submit_tx\n\"\"\"\n\n"} clientIP=127.0.0.1 errors=Error #01: CreateJobFailed: invalid db type: pg.Q
 latency=7.156271ms method=POST path=/v2/jobs servedAt=2021-11-21 20:39:20 status=500 

Any ideas?