V2Ray Core Won’t Start: Find config.json Errors in the Logs

Learn how to read V2Ray startup logs and troubleshoot common causes, including JSON syntax errors, port conflicts, unknown protocol fields, and missing geo files.

At a glance

Use this guide if v2rayN reports that the core has exited, v2rayNG or v2flyNG cannot start the service, or manually launching the core produces a configuration error. First confirm which file and core are actually in use, then use the logs to pinpoint issues during parsing, field validation, resource loading, or port binding. Includes local diagnostic commands, common error messages, and ways to verify fixes. Port numbers and configuration snippets are troubleshooting examples, not server connection settings.

1. Core Startup Failure or Connection Failure? Identify the Stage First

An open client window doesn’t mean the core is running. v2rayN is a management interface; the core process it launches handles inbound connections, routing, and outbound connections. At startup, the core typically reads the configuration, builds protocol and routing objects, then opens local listeners. If any step fails, there’s no entry point for proxy requests.

Read configurationParse fieldsLoad resourcesBind portsHandle connections

If Failed to start appears immediately after launch, look further down for a more specific cause. If the logs confirm that a listener started successfully, but requests time out or fail authentication or the TLS handshake, the issue is usually at the connection stage. Changing JSON commas won’t help, and the client’s “connection failed” message alone doesn’t prove the core failed to start.

2. Get the Full Logs and Confirm Which Configuration Is Loaded

Don’t capture only the final “process exited” line. The actual cause is often at the end of the same error chain, joined by separators such as >, or appears before the exit message. Keep the complete log for this startup, from the core version and launch command through the exit reason, so you don’t mix an earlier connection error with the current startup failure.

  1. Save the Details

    Copy the current startup log from the log panel and back up your active custom configuration. Before sharing logs, remove sensitive information such as subscription URLs, user IDs, passwords, private keys, and server addresses. Keep the original file unchanged on your device.

  2. Confirm the Core

    Check the startup log for the executable name, version, and configuration path. v2rayNG uses the Xray core, while v2flyNG uses the V2Fly core. For v2rayN, rely on the current startup log rather than inferring the core from the client name.

  3. Check the Settings

    In desktop v2rayN, check local listener settings under “Settings” → “Parameter Settings.” The names of subpages may vary between versions, so follow the interface you actually see. Compare the ports shown in the interface with inbounds in the generated configuration.

  4. Test Separately

    Stop the client’s proxy service first to prevent interference from duplicate processes. Run the configuration test for the relevant core against the file identified in the logs. Don’t substitute a same-named config.json from another directory.

These are common command formats to run from the core’s directory. The first applies to Xray on Windows; the second applies to V2Fly builds that provide the test subcommand. Older versions may use different arguments, so check with that binary’s help or -h first. Enclose filenames containing spaces in quotes.

.\xray.exe run -test -config ".\config.json"

./v2ray test -c ./config.json

3. JSON Syntax Errors: Find the Character, Then Check the Fields

JSON parsing happens before protocol validation. Even with the correct node address and port, the core cannot read the configuration if parsing fails. Check the quotes, commas, braces, and brackets near the reported character. The reported position is where the parser stopped; the missing comma may be on the previous line.

Error: invalid character '}' looking for beginning of object key string

Cause: There may be an extra comma at the end of an object, where the parser is expecting another key. Fix: Check the line before the closing brace, remove the trailing comma, and test again.

Error: unexpected EOF

Cause: The file ends prematurely, often because it wasn’t copied in full or a closing bracket is missing. Fix: Check the end of the file and use your editor’s bracket matching to find an unclosed object or array.

Error: invalid character 'h' looking for beginning of value

Cause: The content being read may start with unquoted text—for example, if a subscription URL was mistaken for JSON. Fix: Check the first line and make sure the file contains a core configuration, not a subscription URL, download error page, or share link.

Here’s a strict JSON inbound snippet. It demonstrates strings, numbers, and bracket structure only; it isn’t a complete configuration and cannot replace the original file. JSON uses straight double quotes. Curly quotes won’t work for keys, and backslashes in Windows paths must be escaped.

{
  "inbounds": [
    {
      "tag": "local-socks",
      "listen": "127.0.0.1",
      "port": 10808,
      "protocol": "socks",
      "settings": {
        "udp": true
      }
    }
  ]
}

4. Port Conflicts: Identify the Process Instead of Restarting Repeatedly

Passing a configuration test doesn’t guarantee that the core can bind its ports at runtime. Conflicts can occur if an old core process is still running, two client instances launch at once, or HTTP and SOCKS inbounds use the same listening address and TCP port. On Windows, the error may read Only one usage of each socket address; other systems commonly report address already in use.

10808
Example SOCKS inbound port used in this guide
10809
Example HTTP inbound port used in this guide
127.0.0.1
Listener address for local access only

These numbers are examples, not defaults for every version. Check the actual ports under “Settings” → “Parameter Settings” before running the commands. In Windows PowerShell, you can check which processes are listening on the two example ports below. If the query returns nothing, it only means no matching TCP listener was found at that moment; it doesn’t rule out permission or address configuration issues.

Get-NetTCPConnection -State Listen -LocalPort 10808,10809 |
  Select-Object LocalAddress,LocalPort,OwningProcess

# Set -Id to the process ID found in the previous step; 4560 is only an example
Get-Process -Id 4560

On Linux, use the command below to inspect listening addresses, ports, and processes. You may need additional permissions to view other users’ processes. Also check for processes listening on 0.0.0.0 or ::, as they may conflict with a new listener on a local address.

ss -ltnp 'sport = :10808 or sport = :10809'

5. Unknown Protocols and Fields: Check Core Compatibility

Valid JSON only means the file can be parsed; it doesn’t mean the field combinations are valid. Xray and V2Fly share a common origin, but their protocols, transports, and security settings aren’t interchangeable across the board. Configurations using REALITY or Xray-specific flow-control settings require a core and version that explicitly support them.

Log message or configuration clueCheck firstHow to fix it
unknown config idIs an implementation available for protocol?Check the spelling, capitalization, and core capabilities; changing only the protocol name may not be enough.
unknown fieldField nesting and parser requirementsCheck the field structure for the version you’re running, and make sure it isn’t a client setting.
streamSettings.security is set to realityIs the running process an Xray version that supports this feature?Choose a compatible core and verify the complete set of transport and security settings.
Routing references outboundTagDoes the name match the outbound tag?Correct the tag. Some mismatches may not become apparent until a request is routed.

Not every unknown field produces an error; some parsing paths ignore unrecognized keys. So the absence of an “unknown field” message doesn’t prove that a setting took effect. Client options such as subscription groups and automatic update intervals also don’t belong in the core’s JSON. Manage them in the client’s settings instead.

6. Missing Geo Files: Check the Name, Path, and Permissions

Routing rules using geoip: and geosite: generally require the corresponding geo data files. If the logs show failed to load GeoIP or failed to load geosite, read the rest of the error chain: a missing file, a read failure, and an unknown category are three different issues.

Error: no such file or directory

Cause: The error chain’s geo file path may show that the process couldn’t find the data file in the resource directory it actually uses. Fix: Check the directory shown in the logs, update resources through the client, or restore the complete program directory.

Error: permission denied

Cause: The process may not have permission to read the resource file or one of its parent directories. Fix: Check the account running the process and the directory permissions. If the error points to a log file, check write permissions for the log directory instead.

To narrow down the issue, temporarily remove the geo-related routing rules from a backed-up copy, then test the configuration. If the copy passes, the problem is limited to the resources or rules. Before using the configuration, fix the original rules; otherwise, traffic routing will change.

7. Retest After Fixing: Separate a Valid Configuration from a Working Proxy

Change one variable at a time and record the error lines before and after each change. Once the configuration test passes, start the core and confirm that it’s listening. Then check whether application requests reach the inbound and whether routing selects the expected outbound. Successfully opening one webpage doesn’t prove that every routing rule is correct.

The configuration test passes. Why does the client still fail to start?

First confirm that both are using the same file and the same core. Then check runtime port binding, log file permissions, and execution permissions. A configuration test usually doesn’t prove that a port is available or that the remote server is reachable.

I fixed config.json, but why did it revert after restarting?

The file may be generated temporarily by the client. Change the node editor, routing settings, or custom configuration source, then regenerate the file. The actual path in the startup log takes precedence over a same-named file you found manually.

Do I need to run the client as an administrator all the time?

No. Don’t use this as a blanket fix for startup errors. Check whether the permission error refers to a file, port, or network device. For a local proxy using a high-numbered port, fix the directory or listener settings first. Grant permissions for system features such as TUN only when the client requests them.

The core is running, but webpages still won’t load. What should I do?

First confirm that the application is using the correct proxy type and port. If its traffic reaches the inbound, check outbound connection logs, node settings, and system time. At this point, troubleshoot the connection rather than attributing every issue to JSON syntax.

When reporting an issue, include the client name, actual core version, operating system, the complete startup error chain with sensitive details removed, and the smallest configuration snippet that reproduces the problem. For basic setup, see the Quick Start Guide. For inbound, outbound, and routing fields, see the Complete Configuration Guide.

Download v2rayN