For users whose v2rayN, v2rayNG, or v2flyNG reports that the core exited, the configuration failed to load, or the process stopped immediately after launch. Follow this order: capture the first error, check the JSON structure, verify the listening port, review field names and protocol parameters, then retest using the log status and local port.
First confirm the failure occurs during startup
A core startup failure is different from a node connection failure. During startup, V2Ray or Xray usually exits while reading config.json, creating an inbound listener, or initializing outbound settings. In a connection failure, the core remains running but the request times out, the handshake fails, or the server refuses the connection. The troubleshooting entry points differ, so a page that will not open is not enough to identify the cause.
After opening the log, scroll up to the first error or failed entry for this launch. Later messages such as “process exited” or “restart failed” are often only consequences; the actual cause is usually one to five lines earlier. For example, a configuration parser may report a character position before showing the core exit code, while a port conflict may show the listening address before reporting startup failure.
Using v2rayN 7.x as an example, open “Settings” → “Parameter settings” → “Core type” and confirm whether the current node uses Xray Core or v2fly Core, then return to the main window and open the log panel. After switching core types, restart once so the log contains only fresh entries from the active core, rather than mistaking an old configuration error for the current problem.
-
Stop the core
Stop the core in the client, wait for the log to report that the process has ended, and confirm that the old process no longer holds the local listening port.
-
Clear the log
Clear the log window or note the current time, then start the core only once to avoid filling the log with repeated errors from continuous retries.
-
Find the first error
From the top of the fresh log, find the first entry containing
failed,error,invalid, orunknown. -
Capture the context
Keep the three lines before and after the error, especially the configuration path, line and column numbers, listening port, and outbound tag.
-
Change one thing at a time
Fix one issue at a time, save, and restart. If several fields are changed together, the next log cannot clearly show which change took effect.
JSON syntax errors: fix the structure using the line and column
config.json must follow standard JSON syntax. Use straight double quotes for keys and strings, square brackets for arrays, curly braces for objects, and commas between adjacent fields; do not leave a trailing comma after the final field. Curly quotes from an IME, missing quotation marks, and comments accidentally copied into the file can all make the core stop before it processes the protocol parameters.
The snippet below is missing a comma at the end of the port line, so the parser cannot continue when it reaches protocol on the next line. The line number in the log may point to where the problem was detected; the missing character may actually be on the preceding line.
{
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808
"protocol": "socks"
}
]
}
When fixing the file, do not focus only on the reported character. Starting at the indicated position, check the nearest set of curly braces, confirm that every object contains correctly separated key-value pairs, and verify from the beginning to the end that all brackets are balanced. If the editor supports JSON formatting, run it first; failure to format usually means the structure is still incomplete.
Error: invalid character '}' looking for beginning of object key string
Cause and fix: The object usually has a trailing comma, or a comma is followed by no key name. Check the line before the reported position, remove the trailing comma, or complete the key-value pair.
Error: invalid character 'p' after object key:value pair
Cause and fix: A comma is missing between two adjacent fields. Check the line immediately before the one shown in the log and add a straight comma after the previous value.
Error: unexpected end of JSON input
Cause and fix: The file ends before an object or array is closed. Count the missing curly or square brackets at the end, and check whether only part of the configuration was saved during copying.
Error: invalid character '/' looking for beginning of value
Cause and fix: The configuration may contain // or block comments. Standard JSON does not allow comments; remove them and keep the actual fields.
- Replace curly quotes with straight double quotes, especially around the server address, UUID, tags, and protocol names.
- Make sure numbers are not written as strings with units; for example, the port should be
10808, not10808port. - Make sure Boolean values use lowercase
trueorfalse, without quotation marks. - Save the complete file before restarting the core; do not edit an unsaved copy shown only in a preview window.
Port conflicts: find the conflicting process or duplicate inbound
Once the JSON parses successfully, the core creates inbound listeners in sequence. Startup can stop at this stage if an old v2rayN process is still running, another local networking tool uses the same port, or two inbounds in config.json share the same address and port. The log usually contains keywords such as listen, bind, or address already in use.
A common test configuration uses 127.0.0.1:10808 for SOCKS and 127.0.0.1:10809 for HTTP. These values are not fixed across all client versions, so use the log and current parameter settings as the source of truth. If the log identifies port 10808 as the conflict, inspect only 10808; there is no need to change the remote server port.
| Log clue | Common cause | Action |
|---|---|---|
bind 127.0.0.1:10808 |
An old core or another program is using the local port | Find the process, exit it normally, then start again |
address already in use |
Two inbounds use the same listening address and port | Assign a different port to one inbound |
permission denied |
The port or runtime directory lacks permission | Use a regular high-numbered port and check directory permissions |
cannot assign requested address |
The listening address is not available on this machine | Change it to 127.0.0.1 or the correct local address |
On Windows, run the following commands in a terminal to find the process ID using 10808. If the last column shows 6420, use the second command to look up the process name. Do not terminate an arbitrary system process just because a port is occupied; first confirm that it is a leftover core instance.
netstat -ano | findstr :10808
tasklist /FI "PID eq 6420"
Error: failed to listen TCP on 127.0.0.1:10808
Cause and fix: The local TCP listener could not be created. Check which process uses 10808, close the old instance, or change the local port under “Settings” → “Parameter settings”, then restart.
Error: bind: Only one usage of each socket address is normally permitted
Cause and fix: The same address-and-port combination is already in use. Check whether the client was started twice and whether multiple inbounds in the configuration use the same port.
Conclusion: release the port before changing the number
Changing the port to 10810 while an old process remains only bypasses the conflict temporarily and leaves the system proxy pointing to the old port. End the leftover instance and confirm that the port is free first; change the inbound port and system proxy together only when another required program permanently occupies it.
Misspelled fields: distinguish nesting, core, and configuration format
A field can be spelled correctly yet placed at the wrong level, which also causes configuration loading to fail. For TLS server naming, for example, serverName belongs inside the relevant transport security settings, not arbitrarily at the outbound root. Other common mistakes include writing setting instead of settings, streamSetting instead of streamSettings, or using a single object where an array is required.
Another common source is mixing configuration fragments from different cores or versions. v2rayN can generate a configuration based on the node and core type, but Xray Core and v2fly Core do not support exactly the same protocols, flow-control values, or transport fields. A configuration that works in one core may fail to load unchanged after switching core types.
{
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": []
},
"streamSettings": {
"security": "tls",
"tlsSettings": {
"serverName": "example.com"
}
}
}
]
}
Error: json: unknown field "streamSetting"
Cause and fix: The final letter is missing from the field name; the correct name is usually streamSettings. Correct it according to the configuration format supported by the active core rather than relying on guesswork from the spelling.
Error: failed to parse outbound config
Cause and fix: The outbound protocol name, settings structure, or transport nesting does not meet the requirements. Keep one minimal outbound first, then restore TLS, transport, and routing parameters one at a time.
Error: failed to load config files
Cause and fix: This is a summary from a higher layer and is not specific enough to identify the field. Look earlier in the same startup for unknown field, invalid value, or a specific file line number.
- Confirm that the core selected under v2rayN “Settings” → “Parameter settings” → “Core type” matches the node protocol.
- Check the actual configuration path shown in the log so you do not edit a backup file or a config.json in an old directory.
- Reduce the complex configuration to one inbound and one outbound. After confirming that it starts, restore DNS, routing, and additional inbounds.
- If the error comes from a subscription node, edit the node parameters in the client and regenerate the configuration instead of changing only the temporary runtime file.
Conclusion: moving an unknown field around is not a solution
First identify the active core type and configuration format, then verify which object owns the field. Repeatedly moving a field between levels may clear one error while creating a semantic error, leaving the core unable to connect even after it starts.
Missing protocol parameters: check each stage from inbound to outbound
Once JSON syntax and field nesting are correct, the core can validate protocol parameters. Common VMess issues include an invalid user ID; common VLESS issues include mismatched address, port, user ID, encryption value, or flow-control settings. With TLS, also verify the security type and server name. Missing parameters may not appear as “missing”; logs may instead report an unparseable user, invalid UUID, or unsupported flow value.
After importing a subscription, open the corresponding node editor in the client. Confirm that the server address has no surrounding spaces, the port is between 1 and 65535, the user ID is complete, and the protocol and transport types match. Do not treat the subscription URL as the node's server address, and do not enter the local port 10808 where the remote server port belongs.
The stage where the process stops determines what to inspect. If the log already shows that the local port is listening and only then reports a missing routing tag, there is no need to revisit the SOCKS inbound. If it exits while parsing the outbound user, DNS and routing have not started; prioritize the node's protocol parameters.
Error: failed to parse ID: invalid UUID
Cause and fix: The VMess or VLESS user ID is incomplete, contains spaces, or has an invalid format. Copy the complete ID again and check both ends for invisible characters.
Error: outbound tag not found
Cause and fix: The outbound tag referenced by a routing rule does not exist. Compare outboundTag with the tag values in outbounds, including capitalization and hyphens.
Error: unsupported flow value
Cause and fix: The selected core, protocol, or version does not accept the current flow-control value. Confirm the node requirements and choose a matching Xray Core configuration; if flow control is unused, remove the invalid value.
Error: failed to find an available destination
Cause and fix: The outbound server address cannot be resolved, or the destination list is empty. Check the address spelling, DNS availability, and whether the outbound server list actually contains a node.
| Check | Valid range or format | Common mix-up |
|---|---|---|
| Local inbound port | 1 to 65535 and not already in use | Confusing it with the remote server port |
| Server address | A complete domain name or valid IP address | Pasting a subscription URL or adding spaces |
| User ID | The complete UUID supplied by the node | Copying only part of it or including a line break |
| Routing tag | Must exactly match the outbound tag | Different capitalization or a reference to a deleted tag |
Minimal configuration: narrow down the error
When the log contains several configuration errors, the most effective approach is not to change every field at once, but to build a configuration that can start. Keep one local inbound and one outbound with confirmed complete parameters, and temporarily remove custom DNS, routing rules, additional inbounds, and complex transport options. Once the core stays running, restore each module one at a time.
After restoring each module, stop, start, and run a local connection test. For example, restore DNS first and check for name-resolution errors; then restore routing and confirm that every inboundTag and outboundTag referenced by the rules exists; restore additional listeners last. This turns a search through dozens of fields into a check of the single module just added.
-
Keep the inbound
Keep one local inbound listening on
127.0.0.1and use a currently available high-numbered port. -
Keep the outbound
Keep only one VMess or VLESS outbound with complete parameters, and remove backup nodes not involved in the test.
-
Pause routing
Temporarily remove custom routing rules so references to deleted tags do not interfere with the startup check.
-
Retest startup
Confirm that the log shows no configuration errors, the process runs for more than 3 seconds, and the local listening port remains present.
-
Restore one item at a time
Restore DNS, routing, additional inbounds, and transport options in that order, adding only one module per test.
Verify startup success: logs, port, and connection must all pass
A configuration that no longer reports errors is only the first step. True startup success requires all three conditions: the core process does not exit immediately, the local inbound port is listening, and a test request from the client reaches the corresponding outbound. Seeing “configuration loaded” before the process exits does not count as recovery.
Watch the log for 3 to 10 seconds after startup. If runtime messages continue and there is no new failed to start, panic, or exit code, check the port next. On Windows, run netstat -ano | findstr :10808 again; it should show a listening entry associated with the current core process. Replace the number in the command if the client uses a different port.
Then run the client's built-in latency or connection test. If you see a TLS handshake error, a server timeout, or a refused connection, the startup issue is resolved and the failure has moved to the remote connection stage. Check the server address, network reachability, TLS serverName, transport method, and node validity instead of continuing to edit JSON brackets.
- Start it successfully twice in a row to rule out an intermittent leftover process.
- After stopping the client, the local listener disappears; after starting it again, the listener returns.
- The log no longer reports configuration line or column errors, unknown fields, or port binding failures.
- The system proxy points to the current local port rather than the old port.
- The fix remains after updating the subscription and regenerating the configuration.
Conclusion: verify startup and node availability separately
A continuously running process and a normally listening local port show that config.json has passed the startup stage. Any subsequent handshake or timeout should be investigated as a connection-path issue. Separate verification stages prevent you from repeatedly changing configuration structure that is already correct.
If the cause is still unclear, collect the first error from this launch, the three lines before and after it, the active core type, client version, and the configuration module involved. Before sharing logs, remove the server address, user ID, subscription URL, and other credentials, but keep the error type, field name, line and column position, and port number—the details needed to diagnose the configuration.