ZKBioTime / BioTime
500 Internal Server Error
Complete step-by-step guide to diagnose and fix the 500 Internal Server Error in ZKBioTime and BioTime. Covers service failures, database issues, Redis errors, and environment configuration.
Quick Diagnosis
Before diving into specific solutions, follow this quick diagnostic flow to identify your exact issue.
Appears
Console
Button
Service
BioTime Required Services
All of these services must show "is OK" in the console. If any shows "is wrong", follow the corresponding fix below.
If you see "Http Request unable to connect, bio-apache0 is wrong" after clicking Check, this is the most common cause of the 500 error. See Solution 1 below.
Complete Solutions Guide
Click each problem to expand the detailed solution with step-by-step instructions.
Table of Contents
- 500 Error on newly installed BioTime (bio-apache0 is wrong)
- Database 500 Error: Operation not working or service unavailable
- Database connection test failed repeatedly
- bio-pgsql service cannot start (postmaster.pid lock file)
- bio-pgsql service missing from services
- BioTime keeps spinning on login (bio-redis failure)
- bio-server cannot start - missing icclockservice.exe
- Database backup and restore commands
- Timezone error: python ConnDb.py UnknownTimeZoneError
500 Error on Newly Installed BioTime - bio-apache0 is wrong
CriticalAfter a fresh installation of ZKBioTime or BioTime, opening the web interface shows "500 Internal Server Error". The Service Console check reveals "Http Request unable to connect, bio-apache0 is wrong".
Root Cause
The Windows system PATH environment variable has conflicting Python or library paths that override BioTime's internal components. BioTime bundles its own Python and PostgreSQL installations, and external programs can interfere.
Open the BioTime Platform Service Console
Find the BioTime Platform Service Console in your system tray or Start Menu. Navigate to the SERVICE tab and click the "Check" button to verify which services are failing.
Open System Environment Variables
Press Win + R, type sysdm.cpl and press Enter. Go to Advanced tab, then click "Environment Variables".
Move BioTime Paths to the Top
In the System variables section, find and edit the Path variable. Move all BioTime-related paths to the TOP of the list using the "Move Up" button.
Restart Your Computer
Click OK to save the environment variables, then restart your computer completely. After reboot, open the BioTime Service Console and click Start, then Check to verify all services are OK.
Expected result: After restart, all services (bio-cache, bio-server, bio-proxy, bio-apache0) should show "is OK" and the web interface should load normally.
Database 500 Error: "The operation you selected is not working"
HighBioTime opens but shows "500 error, the operation you selected is not working or the service is not available". This typically indicates a database connection problem.
Stop the BioTime Service
Open the BioTime Platform Service Console. Click the "Stop" button under the SERVICE tab to halt all services before making changes.
Test Database Connection
Switch to the "DATABASE" tab. Click "Connect Test". If you see "Connected successfully", proceed to Step 3. If you see "connect failed", verify the database settings:
- Database Type: PostgreSQL (default)
- HOST: 127.0.0.1
- DB NAME: biotime (or your database name, e.g., biotimeot3)
- USER: postgres
- PASSWORD: Your database password
- PORT: 7496 (default BioTime PostgreSQL port)
Create Tables and Restart
Once the connection test passes, click "Create Table". Wait for the confirmation "table created successfully". Then go back to the SERVICE tab and click "Start".
If connection still fails, open CMD in the BioTime installation directory and run python ConnDb.py to get detailed error information. Share the output with the BioTime support team.
Database Connection Test Fails Repeatedly
HighClicking "Connect Test" in the DATABASE tab repeatedly shows "connect failed" regardless of settings changes.
Diagnostic Checklist
- Verify bio-pgsql service is running in Windows Services (services.msc)
- Check that port 7496 is not blocked by firewall
- Ensure no other PostgreSQL instance is using port 7496
- Verify the database name exists (default: biotime)
- Check postgres user password is correct
Run ConnDb.py for Detailed Diagnosis
Open Command Prompt as Administrator. Navigate to your BioTime installation directory and run:
cd C:\ZKBioTime
# Run the database connection diagnostic
python ConnDb.py
Check init.bat Output
Still in the BioTime installation directory, run init.bat and check for any error messages. This initializes the database configuration.
SQL Server users: If using SQL Server instead of PostgreSQL and seeing "Login failed for user 'xx', Invalid connection string attribute", verify database credentials, port configuration, and ensure you have connection permission on the SQL Server instance.
bio-pgsql Service Cannot Start - postmaster.pid Lock File
CriticalThe bio-pgsql service refuses to start. The Windows Event Viewer shows: "FATAL: lock file 'postmaster.pid' already exists" and "could not create file 'postmaster.opts': Permission denied".
Root Cause
A stale postmaster.pid lock file remains from a previous crash or improper shutdown, preventing PostgreSQL from starting a new instance.
Navigate to the PostgreSQL Data Directory
Open File Explorer and go to your BioTime installation's PostgreSQL data folder:
# or
D:\ZKBioTime\pgsql\data\
Delete the postmaster.pid File
Locate and delete the file named postmaster.pid in the data directory. This removes the stale lock.
Important: Make sure no actual PostgreSQL process is running before deleting this file. Check Task Manager for any postgres.exe processes first.
Restart the bio-pgsql Service
Open services.msc (Windows Services), find bio-pgsql, and click Start. Then return to the BioTime Console and start all services.
Result: The bio-pgsql service should now start successfully, and the database connection should work normally.
BioTime Logs In but bio-pgsql Is Missing from Services
MediumBioTime appears to log in normally, but the bio-pgsql service does not appear in the Windows Services list. The database service might be running as a detached process.
Open Task Manager - Details Tab
Press Ctrl + Shift + Esc to open Task Manager. Click the "Details" tab.
Find and End postgres.exe Processes
Scroll through the list and find any postgres.exe processes. Right-click on a postgres.exe entry and select "End process tree" to stop all related PostgreSQL processes.
Select "End process tree" (not just "End task") to ensure all child processes of PostgreSQL are also terminated.
Restart All BioTime Services
Open the BioTime Platform Service Console, click Stop (to ensure clean state), then click Start. All services including bio-pgsql should now appear and start correctly.
BioTime Keeps Spinning on Login - bio-redis Error 1067
HighWhen logging into BioTime, the page shows an infinite loading spinner with no error message. Attempting to start bio-redis manually shows: "Windows could not start the bio-redis service on Local Computer. Error 1067: The process terminated unexpectedly".
Root Cause
The Redis AOF (Append Only File) has become corrupted, preventing the bio-redis service from starting. The appendonly.aof file needs to be removed to allow Redis to start fresh.
Navigate to the Redis Directory
Open File Explorer and go to your BioTime Redis folder:
# or for ZKBioTime:
C:\ZKBioTime\redis\
Delete the appendonly.aof File
Find and delete the file named appendonly.aof. This corrupted file is preventing Redis from starting.
Start the bio-redis Service
Open services.msc, find bio-redis, and click Start. Alternatively, use the BioTime Console to restart all services.
Result: The bio-redis service starts normally, and BioTime login will work without the infinite spinner.
Note: Deleting the AOF file clears the Redis cache. Active user sessions may need to log in again, but no permanent data is lost since all data is stored in the PostgreSQL database.
bio-server Cannot Start - Missing icclockservice.exe
MediumThe bio-server service cannot start. The console shows a missing file error for icclockservice.exe.
Root Cause
Anti-virus software (Windows Defender, Kaspersky, Norton, etc.) has quarantined or deleted the icclockservice.exe file, mistakenly flagging it as suspicious.
Check Your Anti-Virus Quarantine
Open your anti-virus software and check the quarantine/threat history. Look for icclockservice.exe and restore it if found.
Add BioTime to Anti-Virus Exclusions
Add the entire BioTime installation folder to your anti-virus exclusion list to prevent future interference:
C:\ZKBioTime\ # or your installation path
C:\BioTime\
Restore the File from Installation Package
If the file cannot be restored from quarantine, copy icclockservice.exe from the original BioTime installation package to the installation directory.
Database Backup and Restore Commands
ReferenceBefore making major changes or troubleshooting database issues, always create a backup. Here are the essential commands.
Backup Command
Open CMD in BioTime installation path and execute:
Restore Process
Use a New Database Name
When restoring, the database name must be different from the currently active database. For example, if current DB is zkbiotime, use a name like test for restoration.
Restore via Console
In the BioTime Console's DATABASE tab, enter the new database name in the DB NAME field, then use the Restore Manually tab to select and restore the backup file.
Update Console DB Name
After successful restoration, change the DB NAME in the DATABASE tab to the new restored database name, then restart the service.
Warning: If you enter an existing database name for restoration, you will see: "Restore failed, please make sure the database name is not an existing one." Always use a unique new name.
Timezone Error: UnknownTimeZoneError in ConnDb.py
MediumRunning python ConnDb.py fails with: "pytz.exceptions.UnknownTimeZoneError: u 'Can not find timezone *** Standard Time'".
Root Cause
The timezone plug-in used by BioTime does not recognize certain regional timezones. When the client computer's timezone is set to one of these unsupported regions, the database connection fails.
Change Your System Timezone
Change the Windows timezone to a well-known, standard timezone that BioTime supports:
- Open Settings > Time & Language > Date & time
- Turn off "Set time zone automatically"
- Select a standard timezone (e.g., UTC+01:00 West Central Africa or UTC+00:00 GMT)
- Restart the BioTime service
This issue commonly affects users in Central Asia, parts of Russia, and other regions with recently changed timezone definitions.
Still Need Help?
If none of the solutions above resolved your issue, our technical team is ready to assist you remotely.