Menu
Troubleshooting Guide

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.

500
Internal Server Error

Quick Diagnosis

Before diving into specific solutions, follow this quick diagnostic flow to identify your exact issue.

500 Error
Appears
Open Service
Console
Click "Check"
Button
Identify Failed
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.

bio-cache (Redis)
bio-server
bio-proxy
bio-apache0
bio-pgsql
bio-redis
ZKBio Time Platform Service Console - Check Results
01-11 12:46 Start the service
01-11 12:46 bio-apache0 is OK
01-11 12:46 bio-proxy is OK
01-11 12:46 bio-cache is OK
01-11 12:46 bio-server is OK
01-11 12:46 Finish Start
 
01-11 12:46 bio-cache is OK
01-11 12:46 bio-server is OK
01-11 12:46 bio-proxy is OK
01-11 12:46 bio-apache0 is OK
01-11 12:46 Http Request unable to connect, bio-apache0 is wrong

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.

1

500 Error on Newly Installed BioTime - bio-apache0 is wrong

Critical

After 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.

C:\ZKBioTime\Python37
C:\ZKBioTime\Python37\Scripts
C:\ZKBioTime\Python37\Library\bin
C:\ZKBioTime\zkeco_dlls
C:\ZKBioTime\pgsql\bin
C:\ZKBioTime\tools\wkhtmltox\bin
   %SystemRoot%\system32
   %SystemRoot%
   ... other paths ...

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.

2

Database 500 Error: "The operation you selected is not working"

High

BioTime 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".

DATABASE Tab - Expected Results
01-18 15:16 Start Connect Test
01-18 15:16 Connected successfully
 
01-18 15:16 Start Create Table
01-18 15:17 table created successfully

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.

3

Database Connection Test Fails Repeatedly

High

Clicking "Connect Test" in the DATABASE tab repeatedly shows "connect failed" regardless of settings changes.

DATABASE Tab - Repeated Connection Failures
05-19 11:54 Start Connect Test
05-19 11:54 connect failed
05-19 11:56 Start Connect Test
05-19 11:56 connect failed
05-19 12:00 Start Connect Test
05-19 12:00 connect failed
05-19 12:19 Start Connect Test
05-19 12:19 connect failed

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:

# Navigate to BioTime installation folder
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.

4

bio-pgsql Service Cannot Start - postmaster.pid Lock File

Critical

The 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.

Windows Event Viewer - Application Log
2021-12-20 14:32:08.855 HKT [16364] FATAL:
  lock file "postmaster.pid" already exists
  HINT: Is another postmaster (PID 4844)
  running in data directory
  "C:/BioTime/pgsql/data"?

Navigate to the PostgreSQL Data Directory

Open File Explorer and go to your BioTime installation's PostgreSQL data folder:

C:\BioTime\pgsql\data\
# 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.

5

BioTime Logs In but bio-pgsql Is Missing from Services

Medium

BioTime 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.

6

BioTime Keeps Spinning on Login - bio-redis Error 1067

High

When 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:

C:\BioTime\redis\
# 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.

7

bio-server Cannot Start - Missing icclockservice.exe

Medium

The 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:

# Add these folders to your anti-virus exclusions:
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.

8

Database Backup and Restore Commands

Reference

Before 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:

pg_dump -h 127.0.0.1 -c -p 7496 -U postgres biotime > D:\Backup\biotime_backup_20260215.sql

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.

9

Timezone Error: UnknownTimeZoneError in ConnDb.py

Medium

Running python ConnDb.py fails with: "pytz.exceptions.UnknownTimeZoneError: u 'Can not find timezone *** Standard Time'".

CMD - python ConnDb.py Output
C:\ZKBio TA 8.0>python ConnDb.py
Traceback (most recent call last):
  File "ConnDb.py", line 13, in <module>
  ...
  File "...\tzlocal\win32.py", line 79
    raise pytz.UnknownTimeZoneError(
      'Can not find timezone ' + tzkeynname)
pytz.exceptions.UnknownTimeZoneError:
  u 'Can not find timezone Qyzylorda 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.

WhatsApp Support Contact Us
WhatsApp