[GH-ISSUE #335] Could not retrieve queues live data — See the logs for details #97

Closed
opened 2026-03-02 05:18:42 +03:00 by kerem · 2 comments
Owner

Originally created by @charliecen on GitHub (Dec 22, 2024).
Original GitHub issue: https://github.com/hibiken/asynqmon/issues/335

get api/queues
response 500 error

UNKNOWN: UNKNOWN: redis eval error: ERR Error running script (call to f_0c80fc1868e3aae205155ae2017ce995a3a7cec0): @user_script:30: user_script:30: attempt to perform arithmetic on local 'bytes' (a boolean value)

redis: v6.2.5
asynq: v0.24.1
asynqmon: v0.7.2

Originally created by @charliecen on GitHub (Dec 22, 2024). Original GitHub issue: https://github.com/hibiken/asynqmon/issues/335 get api/queues response 500 error ```sh UNKNOWN: UNKNOWN: redis eval error: ERR Error running script (call to f_0c80fc1868e3aae205155ae2017ce995a3a7cec0): @user_script:30: user_script:30: attempt to perform arithmetic on local 'bytes' (a boolean value) ``` redis: v6.2.5 asynq: v0.24.1 asynqmon: v0.7.2
kerem closed this issue 2026-03-02 05:18:43 +03:00
Author
Owner

@charliecen commented on GitHub (Dec 22, 2024):

docker labels

"org.opencontainers.image.created": "2023-07-04T03:13:04.321Z",
"org.opencontainers.image.description": "Web UI for Asynq task queue",
"org.opencontainers.image.licenses": "MIT",
"org.opencontainers.image.revision": "d1b889456de3c98c22de24642b6f836a29da3140",
"org.opencontainers.image.source": "https://github.com/hibiken/asynqmon",
"org.opencontainers.image.title": "asynqmon",
"org.opencontainers.image.url": "https://github.com/hibiken/asynqmon",
"org.opencontainers.image.version": "0.7.2"

go.mod

github.com/hibiken/asynq v0.24.1

go: v1.18

<!-- gh-comment-id:2558465780 --> @charliecen commented on GitHub (Dec 22, 2024): docker labels ```sh "org.opencontainers.image.created": "2023-07-04T03:13:04.321Z", "org.opencontainers.image.description": "Web UI for Asynq task queue", "org.opencontainers.image.licenses": "MIT", "org.opencontainers.image.revision": "d1b889456de3c98c22de24642b6f836a29da3140", "org.opencontainers.image.source": "https://github.com/hibiken/asynqmon", "org.opencontainers.image.title": "asynqmon", "org.opencontainers.image.url": "https://github.com/hibiken/asynqmon", "org.opencontainers.image.version": "0.7.2" ``` go.mod ``` github.com/hibiken/asynq v0.24.1 ``` go: v1.18
Author
Owner

@charliecen commented on GitHub (Dec 25, 2024):

func newListQueuesHandlerFunc(inspector *asynq.Inspector) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		qnames, err := inspector.Queues()
		if err != nil {
			http.Error(w, fmt.Sprintf("Error fetching queues: %v", err), http.StatusInternalServerError)
			return
		}
		snapshots := make([]*queueStateSnapshot, len(qnames))
		for i, qname := range qnames {
			qinfo, err := inspector.GetQueueInfo(qname)
			if err != nil {
				if strings.Contains(err.Error(), "attempt to perform arithmetic on local 'bytes' (a boolean value)") {
					// Handle the specific Redis Lua script error
					snapshots[i] = &queueStateSnapshot{Queue: qname}
					continue
				}
				http.Error(w, fmt.Sprintf("Error fetching queue info for %s: %v", qname, err), http.StatusInternalServerError)
				return
			}
			snapshots[i] = toQueueStateSnapshot(qinfo)
		}
		payload := map[string]interface{}{"queues": snapshots}
		json.NewEncoder(w).Encode(payload)
	}
}

Problem has been solved!!!

<!-- gh-comment-id:2561876942 --> @charliecen commented on GitHub (Dec 25, 2024): ```golang func newListQueuesHandlerFunc(inspector *asynq.Inspector) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { qnames, err := inspector.Queues() if err != nil { http.Error(w, fmt.Sprintf("Error fetching queues: %v", err), http.StatusInternalServerError) return } snapshots := make([]*queueStateSnapshot, len(qnames)) for i, qname := range qnames { qinfo, err := inspector.GetQueueInfo(qname) if err != nil { if strings.Contains(err.Error(), "attempt to perform arithmetic on local 'bytes' (a boolean value)") { // Handle the specific Redis Lua script error snapshots[i] = &queueStateSnapshot{Queue: qname} continue } http.Error(w, fmt.Sprintf("Error fetching queue info for %s: %v", qname, err), http.StatusInternalServerError) return } snapshots[i] = toQueueStateSnapshot(qinfo) } payload := map[string]interface{}{"queues": snapshots} json.NewEncoder(w).Encode(payload) } } ``` Problem has been solved!!!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynqmon#97
No description provided.