question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSON-PROBLEM shuts server down

See original GitHub issue

A few pads are invalid on my instance and every time these pads are called I get a JSON-PROBLEM-Exception:

[2015-02-18 20:13:48.167] [ERROR] console - JSON-PROBLEM (pad:49Xv36g3re93MSV):{"atext":{"text":"some text\n\n
[2015-02-18 20:13:48.173] [ERROR] console - gracefulShutdown...
[2015-02-18 20:13:48.173] [ERROR] console - Async Stacktrace:
    at /opt/eplite/etherpad-lite-dev/src/node/handler/PadMessageHandler.js:1306:5
    at /opt/eplite/etherpad-lite-dev/src/node/handler/PadMessageHandler.js:1042:16
    at /opt/eplite/etherpad-lite-dev/src/node/db/PadManager.js:171:10
    at Object.callback (/opt/eplite/etherpad-lite-dev/src/node/db/Pad.js:385:8)

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/CacheAndBufferLayer.js:164:24
    at Query._callback (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/mysql_db.js:116:5)
    at Query.Sequence.end (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
    at Query._handleFinalResultPacket (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/sequences/Query.js:143:8)
    at Query.EofPacket (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/sequences/Query.js:127:8)
    at Protocol._parsePacket (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Protocol.js:271:23)
    at Parser.write (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Parser.js:77:12)
    at Protocol.write (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/opt/eplite/etherpad-lite-dev/src/node_modules/ueberDB/node_modules/mysql/lib/Connection.js:82:28)
    at Socket.emit (events.js:95:17)

After that the instance shutting down. I don’t know how invalid JSON is getting into the DB, but shutting down the server cause of this problem is very bad. Knowing which pads causing this error can lead to a DoS…

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:37 (26 by maintainers)

github_iconTop GitHub Comments

1reaction
webzwo0icommented, May 22, 2016
1reaction
akosiariscommented, Jun 23, 2015

@Gared, show table status said 55M rows. It’s InnoDB so that’s an approximation. I am not doing an select count(*), sorry. Hardware is a PowerEdge R510 with 64G of RAM. This is not a dedicated etherpad database, but rather hosted with other projects, but it is a rather idle box. Disks are 15K RPM 300GB drives. Total conversion time with

ALTER TABLE etherpadlite.store 
CHANGE `key` `key` varchar(100) CHARSET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '', 
CHANGE `value` `value` longtext CHARSET utf8mb4 COLLATE utf8mb4_bin NOT NULL, 
CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

was about 15 mins. Your milleage will probably vary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON-PROBLEM and server shut down #3613 - GitHub
Hi,. This may be related to #2522, but a can't find any solution. One of our pad is corrupted in database. Log shows:...
Read more >
How do I prevent writing of invalid JSON when the nodejs ...
Appearently when the service is stopped, restarted or crashing exactly at then time when the file is being written - it would add...
Read more >
Connection to server is erroring. Shutting down server.
This time I want to share a very strange problem I encountered. After I updated Al Language, many errors occurred. Error: Connection to...
Read more >
SPX Service stops when started - Failed to parse spx_config ...
JSON file in the error is damaged. In the above example that is spx_config.json. If this file is corrupt it may be rebuilt...
Read more >
Host is shutting down - Azure Functions - Microsoft Q&A
The host in local settings json file is blob.core.windows.net but in the error above it says Connection refused (127.0.0.1:10001 why is it ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found