Pulse: [BUG] Connection error: websocket error
Bug Description
After following the Docker Compose installation instructions, access to the Pulse web interface is not possible due to a “websocket error”.
Steps To Reproduce
- Follow instructions from GitHub to download the docker-compose.yml and .env file
- Customize .env file with PVE node API token and details
- Start container using docker compose
- Access web UI directly by IP:Port
Expected Behavior
Pulse dashboard loads
Actual Behavior
Page loads but contains an error message: “Connection error: websocket error”
Screenshots
Environment
- OS: Ubuntu 24.04.2
- Browser: Chrome 134
- ProxMox Version: 8.3.4
- Pulse Version: 1.3.0
- Deployment Method: Docker Compose
- Docker Version: 28.0.1, build 068a01e
Additional Context
LAN Subnet: 192.168.10.0/24 Docker Server IP: 192.168.10.3 PVE-001 Node IP: 192.168.10.51 PVE-002 Node IP: 192.168.10.52
.env File:
# ProxMox Node Configuration
# Replace with your ProxMox node details
# Node 1
PROXMOX_NODE_1_NAME=PVE-001
PROXMOX_NODE_1_HOST=https://pve-001.home.local:8006
PROXMOX_NODE_1_TOKEN_ID=root@pam!pulse
PROXMOX_NODE_1_TOKEN_SECRET=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# Node 2
PROXMOX_NODE_2_NAME=PVE-002
PROXMOX_NODE_2_HOST=https://pve-002.home.local:8006
PROXMOX_NODE_2_TOKEN_ID=root@pam!pulse
PROXMOX_NODE_2_TOKEN_SECRET=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# App Configuration
PORT=7654
# Frontend Configuration
# This ensures the frontend connects to the backend using IPv4 instead of IPv6
# Important: Use 127.0.0.1 (IPv4) instead of ::1 (IPv6) to avoid connection issues
#VITE_API_URL=http://127.0.0.1:7654
VITE_API_URL=http://192.168.10.3:7654
# Environment Configuration
# Note: When using start-dev.sh for development, it will automatically set NODE_ENV=development
# These settings primarily apply to Docker/production deployments
NODE_ENV=production
LOG_LEVEL=info # Options: error, warn, info, debug
ENABLE_DEV_TOOLS=false # Set to true only for debugging production issues
METRICS_HISTORY_MINUTES=60 # How many minutes of metrics history to keep in memory
# Mock Data Configuration
# Set to false to connect to real Proxmox nodes
USE_MOCK_DATA=false
MOCK_DATA_ENABLED=false
# SSL Configuration
# SECURITY WARNING:
# - For development or internal networks, you can set these to true/0
# - For production, set these to false/1 and ensure proper SSL certificates are installed
# - Setting these to true/0 disables SSL certificate validation and is not secure for production
IGNORE_SSL_ERRORS=true
NODE_TLS_REJECT_UNAUTHORIZED=0
# Polling Intervals (in milliseconds)
NODE_POLLING_INTERVAL_MS=1000
EVENT_POLLING_INTERVAL_MS=1000
Docker Compose Log Output:
root@docker:/var/docker/pulse# docker compose up -d && docker compose logs -f
[+] Running 2/2
✔ Network pulse_default Created 0.1s
✔ Container pulse-app Started 0.3s
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Initializing NodeManager
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Adding node: PVE-002 (https://pve-002.home.local:8006)
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-2]: ProxMox API client created with timeout: 60000ms and 3 retry attempts
pulse-app | 2025-03-09 21:39:06 info [MetricsService]: Metrics history configured for 60 minutes (120 data points)
pulse-app | 2025-03-09 21:39:06 info [WebSocketServer]: WebSocket server initialized with multiple socket connections
pulse-app | 2025-03-09 21:39:06 info [Server]: Server started on port 7654 in production mode
pulse-app | 2025-03-09 21:39:06 info [Server]: Access the application at http://[your-server-ip]:7654
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-2]: Discovered node name by status check: pve-002
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-2]: Connection test successful
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-2]: Setting up event polling with base interval: 1000ms
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Node added successfully: PVE-002
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Adding node: PVE-001 (https://pve-001.home.local:8006)
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-1]: ProxMox API client created with timeout: 60000ms and 3 retry attempts
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-1]: Discovered node name by status check: pve-003
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-1]: Connection test successful
pulse-app | 2025-03-09 21:39:06 info [ProxmoxClient][node-1]: Setting up event polling with base interval: 1000ms
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Node added successfully: PVE-001
pulse-app | 2025-03-09 21:39:06 info [NodeManager]: Starting polling for node updates (interval: 1000ms)
I have obfuscated all API tokens and hostnames for security / privacy reasons.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (4 by maintainers)
Can confirm that 1.5.3 has solved my websocket issue. Using original .env and docker-compose.yml file.
Thank you for your quick fix.
1.5.3 solved my websocket issue. web socket is connecting to IP instead of localhost. Everything is working now.
I now have this as docker-compose
My logs are:
As you can see, it goes well and then it doesn’t… I didn’t even start the browser. This is coming out of the container. I think the number of requests is blowing(overwhelming) up the proxmox api and then proxmox starts to refuse the connections.
Same issue as the original poster. Using the developer console in Chrome I’m seeing attempts to connect to ws://127.0.0.1:7654 even though I have the environmental variable set as VITE_API_URL=http://192.168.2.82:7654
I’ve tried commenting out the VITE_API_URL env, I’ve tried it as 127.0.0.1 and I’ve tried it as the actual host IP. Same result.