This topic describes common issues with PAI-Rec.
Q: Error: Scenario information not found (scene:scene_test, not found the scene info)
Error example:
[2025-08-11 17:25:45] [/bin/sh]: I0811 17:25:45.443989 29 log.go:40] [ERROR] scene:scene_test, not found the scene info
[2025-08-11 17:25:45] [/bin/sh]: I0811 17:25:45.443997 29 feed.go:224] [INFO] requestId=db0889a0-a1d7-4b2c-abda-018eab646ed0,uid=4382390632,scene_name=scene_test,exp_id=
[2025-08-11 17:25:45] [/bin/sh]: I0811 17:25:45.444045 29 context_item_recall.go:57] [INFO] requestId=db0889a0-a1d7-4b2c-abda-018eab646ed0 module=ContextItemRecall
cost=0
Cause:
The scenario name scene_test is used in the PAI-Rec DPI engine configuration but does not exist on the Recommendation Scenarios page in the PAI-Rec console.
Solution:
In the PAI-Rec console, go to Recommendation Scenarios and create a scenario named scene_test.
Q: Error: Retrieval scenario not found (Scene:not found, SceneId:home_feed)
Error example:
29 recall.go:74] [ERROR] requestId=9b53a5c5-aa52-4b1d-8a0e-edcd6977e687 module=recall error=Scene:not found, SceneId:home_feed
29 recommend.go:33] [INFO] requestId=9b53a5c5-aa52-4b1d-8a0e-edcd6977e687 module=Filter cost=0
Cause:
The value of the scene_id parameter in the recommendation engine API call does not match the scenario name specified in SceneConfs (retrieval configuration) of the engine configuration.
Solution:
Adjust the value of scene_id in the recommendation engine API call or the scenario name in SceneConfs to ensure they match.
Q: Failed to register Hologres during engine startup
Error example:
(event=RegisterHologres dsn=postgres://xxx-vpc-st.hologres.aliyuns.com:80/db?sslmode=disable&connect_timeout=10 name=pai_rec_online_new panic: runtime error invalid memory address or nil pointer dereference)
[2025-08-14 16:11:47]
[2025-08-14 16:11:47] xxx
[2025-08-14 16:11:47] xxx
[2025-08-14 16:11:47] xxx
[2025-08-14 16:11:47] xxx
[2025-08-14 16:11:47] xxx
[2025-08-14 16:11:47]
[2025-08-14 16:11:47] =========== Begin Of Program (name: /bin/sh) ===========
[2025-08-14 16:11:47] [/bin/sh]: 2025/08/14 16:11:47 maxprocs: Updating GOMAXPROCS=8: determined from CPU quota
[2025-08-14 16:11:47] [/bin/sh]: event=RegisterHologres dsn=postgres://xxx:xxx@xxx-vpc-st.hologres.aliyuncs.com:80/pairec?sslmode=disable&connect_timeout=10
name=pai_rec_online_newpanic: runtime error: invalid memory address or nil pointer dereference
[2025-08-14 16:11:47] [/bin/sh]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xfc02dc]
[2025-08-14 16:11:47] [/bin/sh]:
[2025-08-14 16:11:47] [/bin/sh]: goroutine 1 [running]:
[2025-08-14 16:11:47] [/bin/sh]: github.com/aliyun/aliyun-pai-featurestore-go-sdk/v2/featurestore.(*FeatureStoreClient).GetProject(0xc000549d78?, {0xc0006e2100, 0xb})
[2025-08-14 16:11:47] [/bin/sh]: /go/pkg/mod/github.com/aliyun/aliyun-pai-featurestore-go-sdk/v2@v2.3.4-0.20250612074337-3c6e7b95b667/featurestore/feature_store_client.go:196 +0x1c
[2025-08-14 16:11:47] [/bin/sh]: github.com/alibaba/pairec/v2/persist/fs.Load(0xc000566848?)
[2025-08-14 16:11:47] [/bin/sh]: /go/pkg/mod/github.com/alibaba/pairec/v2@v2.5.3/persist/fs/featurestore.go:77 +0x532
[2025-08-14 16:11:47] [/bin/sh]: github.com/alibaba/pairec/v2.runBeforeStart()
[2025-08-14 16:11:47] [/bin/sh]: /go/pkg/mod/github.com/alibaba/pairec/v2@v2.5.3/pairec.go:102 +0xd1
[2025-08-14 16:11:47] [/bin/sh]: github.com/alibaba/pairec/v2.runStartHook()
[2025-08-14 16:11:47] [/bin/sh]: /go/pkg/mod/github.com/alibaba/pairec/v2@v2.5.3/pairec.go:109 +0x17
[2025-08-14 16:11:47] [/bin/sh]: github.com/alibaba/pairec/v2.Run()
[2025-08-14 16:11:47] [/bin/sh]: /go/pkg/mod/github.com/alibaba/pairec/v2@v2.5.3/pairec.go:82 +0xdd
[2025-08-14 16:11:47] [/bin/sh]: main.main()
[2025-08-14 16:11:47] [/bin/sh]: /usr/src/app/src/main.go:15 +0x110
[2025-08-14 16:11:47] time="2025-08-14T16:11:47+08:00" level=info msg="program stopped with status:exit status 2" program=/bin/sh
[2025-08-14 16:11:47]
[2025-08-14 16:11:47] =========== End Of Program (name: /bin/sh) ===========
[2025-08-14 16:12:55] time="2025-08-14T16:12:55+08:00" level=info msg="create process: /bin/sh, command: [\"/bin/sh\",\"-c\",\"/usr/bin/rec_entrypoint.sh\"]"
Causes:
The account password was not entered.
The PAI-EAS service is not connected to the virtual private cloud (VPC).
Port 80 is not open in the security group for the VPC.
The account does not have permissions for the database.
Solutions:
If the DPI engine configuration connects directly to Hologres, verify that the username and password in the Data Source Name (DSN) within HologresConfs are correct. If you use PAI-FeatureStore and its online data source is Hologres, verify that the HologresUsername and HologresPassword fields in FeatureStoreConfs are set to the correct values. This username and password are for a custom user that you create in the Hologres console. In the console, go to Instance List > Account Management > User Management to create the user. Note that the username must be a string that starts with BASIC$.
A network connection is required if the recommendation engine and model services need to access Hologres. When you configure the network for the PAI-EAS service, ensure that the VpcId (vpc_id) and vSwitch ID (vswitch_id) match the VPC and vSwitch of the Hologres instance.
Open port 80 in the security group.
On the DB Authorization page, click Authorize User for the relevant database to check whether the custom user has permissions. If the user does not have permissions, click Add Authorization in the upper-right corner and grant the Developer permission to the user.
Q: Permission denied during engine startup (Message: ram permission err: permission denied, accessDeniedDetail: {"AuthAction":"pairec:ListScenes",xxxx})
Error example:
h]: RequestId: 1E3EB753-FC38-5EE8-9F83-13240BC36267
h]: Message: ram permission err: permission denied, accessDeniedDetail: {"AuthAction":"pairec:ListScenes","AuthPrincipa...}
h]: RespHeaders: map[Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[*] Connection:[keep-alive] Content-...
h]: I1125 16:44:10.973900 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_callback_log
h]: I1125 16:44:13.495826 17 postgres.go:71] [INFO] event=dbstat name=holo_info msg={"MaxOpenConnections":10...}
h]: I1125 16:44:17.454293 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_feature_log
h]: I1125 16:44:18.807398 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_debug_log erro...
h]: I1125 16:44:19.797783 17 log.go:40] [ERROR] list flow tasks error, err=SDK.ServerError
h]: ErrorCode: InvalidRamPolicyNameErrorProblem
h]: Recommend:
h]: RequestId: D0DFDA77-5C10-5984-86BC-FEDD57272C7D
h]: Message: ram permission err: permission denied, accessDeniedDetail: {"AuthAction":"pairec:ListTrafficControlTasks",...}
h]: RespHeaders: map[Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[*] Connection:[keep-alive] Content-...
h]: I1125 16:44:21.180966 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_callback_log
h]: I1125 16:44:23.496809 17 postgres.go:71] [INFO] event=dbstat name=holo_info msg={"MaxOpenConnections":10...}
h]: I1125 16:44:27.660460 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_feature_log
h]: I1125 16:44:29.014115 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_debug_log err...
h]: I1125 16:44:31.387223 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_callback_log
h]: I1125 16:44:33.497437 17 postgres.go:71] [INFO] event=dbstat name=holo_info msg={"MaxOpenConnections":10...}
h]: I1125 16:44:37.866166 17 datahub.go:172] [ERROR] project=pairec_process_testing topic=pairec_feature_log
h]: I1125 16:44:38.713545 17 log.go:40] [ERROR] list scenes error, err=SDK.ServerError
h]: ErrorCode: InvalidRamPolicyNameErrorProblem
Cause:
The PAI-EAS role required for engine deployment lacks the necessary permissions for the PAI-Rec product.
Solution:
Go to the Roles page of the Resource Access Management console. Search for the AliyunPAIRecEASRole role and click Add Permissions in the Actions column. Search for PaiRecDataManagementAccess and grant the permission to the role.
Q: How do I filter specific items from the retrieval results?
To filter specific items, pass a list of their IDs to the features.black_itemids parameter when you call the recommendation engine API. In a production environment, you can prepare this list based on your business rules, such as by scenario or user ID.
You can prepare the data for filtering by scenario or user ID based on your business rules, and then pass it to features.black_itemids.
The optional features parameter is a JSON map used to pass custom context features as key-value pairs.
In the filter layer, configure the following parameters:
Set Operator to
not_in.Set Value to
user.black_itemids.
{
"FilterParams": [
{
"Name": "item_id", # The field name for the item ID
"Type": "string",
"Operator": "not_in",
"Value": "user.black_itemids"
}
]
}