Topic on Project:Support desk

Issues with Visual Editor / Parsoid out of the blue? curl error: 7

5
Dev67 (talkcontribs)

So I'm running mediawiki 1.30 on a raspberry pi and my Visual Editor has been working for about 5 or 6 months with no issue and all of a sudden it went bad. Now I keep getting Curl Error: 7. This did begin one day when I had a bad backup happen I think so I'm wondering if something in my parsoid directory became corrupted or something.

This is what I get when I try to run parsoid from it's directory thru putty:

root@raspberrypi:/etc/parsoid# node bin/server.js

internal/modules/cjs/loader.js:141

    throw e;

    ^

SyntaxError: Error parsing /etc/parsoid/node_modules/read-pkg-up/package.json: Unexpected number in JSON at position 2

    at JSON.parse (<anonymous>)

    at readPackage (internal/modules/cjs/loader.js:137:52)

    at tryPackage (internal/modules/cjs/loader.js:147:13)

    at Function.Module._findPath (internal/modules/cjs/loader.js:229:20)

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:546:25)

    at Function.Module._load (internal/modules/cjs/loader.js:475:25)

    at Module.require (internal/modules/cjs/loader.js:598:17)

    at require (internal/modules/cjs/helpers.js:11:18)

    at pkgUp (/etc/parsoid/node_modules/yargs/yargs.js:493:23)

    at Object.Yargs.self._parseArgs (/etc/parsoid/node_modules/yargs/yargs.js:940:29)

    at Object.get [as argv] (/etc/parsoid/node_modules/yargs/yargs.js:930:19)

    at Master._getOptions (/etc/parsoid/node_modules/service-runner/lib/base_service.js:182:9)

    at new BaseService (/etc/parsoid/node_modules/service-runner/lib/base_service.js:29:29)

    at new Master (/etc/parsoid/node_modules/service-runner/lib/master.js:30:9)

    at new ServiceRunner (/etc/parsoid/node_modules/service-runner/service-runner.js:32:26)

    at Object.<anonymous> (/etc/parsoid/bin/server.js:6:1)

After running this command I can clearly see Parsoid is failing to run at startup too...

root@raspberrypi:~# systemctl list-units --type=service

  UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION

  alsa-restore.service                             loaded active exited  Save/Restore Sound Card S

  apache2.service                                  loaded active running The Apache HTTP Server

● AutostartParsoid.service                         loaded failed failed  Parsoid Service Autostart

  avahi-daemon.service                             loaded active running Avahi mDNS/DNS-SD Stack

● bluetooth.service                                loaded failed failed  Bluetooth service

  console-setup.service                            loaded active exited  Set console font and keym

  cron.service                                     loaded active running Regular background progra

  dbus.service                                     loaded active running D-Bus System Message Bus

● dhcpcd.service                                   loaded failed failed  dhcpcd on all interfaces

  dphys-swapfile.service                           loaded active exited  LSB: Autogenerate and use

  fake-hwclock.service                             loaded active exited  Restore / save the curren

  getty@tty1.service                               loaded active running Getty on tty1

  hciuart.service                                  loaded active running Configure Bluetooth Modem

  keyboard-setup.service                           loaded active exited  Set the console keyboard

  kmod-static-nodes.service                        loaded active exited  Create list of required s

  mariadb.service                                  loaded active running MariaDB database server

  networking.service                               loaded active exited  Raise network interfaces

  ntp.service                                      loaded active running LSB: Start NTP daemon

  raspi-config.service                             loaded active exited  LSB: Switch to ondemand c

  rc-local.service                                 loaded active exited  /etc/rc.local Compatibili

  rsyslog.service                                  loaded active running System Logging Service

  ssh.service                                      loaded active running OpenBSD Secure Shell serv

lines 1-23...skipping...

  UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION

  alsa-restore.service                             loaded active exited  Save/Restore Sound Card State

  apache2.service                                  loaded active running The Apache HTTP Server

● AutostartParsoid.service                         loaded failed failed  Parsoid Service Autostart

  avahi-daemon.service                             loaded active running Avahi mDNS/DNS-SD Stack

● bluetooth.service                                loaded failed failed  Bluetooth service

  console-setup.service                            loaded active exited  Set console font and keymap

  cron.service                                     loaded active running Regular background program processing daemon

  dbus.service                                     loaded active running D-Bus System Message Bus

● dhcpcd.service                                   loaded failed failed  dhcpcd on all interfaces

  dphys-swapfile.service                           loaded active exited  LSB: Autogenerate and use a swap file

  fake-hwclock.service                             loaded active exited  Restore / save the current clock

  getty@tty1.service                               loaded active running Getty on tty1

  hciuart.service                                  loaded active running Configure Bluetooth Modems connected by UART

  keyboard-setup.service                           loaded active exited  Set the console keyboard layout

  kmod-static-nodes.service                        loaded active exited  Create list of required static device nodes for the current kernel

  mariadb.service                                  loaded active running MariaDB database server

  networking.service                               loaded active exited  Raise network interfaces

  ntp.service                                      loaded active running LSB: Start NTP daemon

  raspi-config.service                             loaded active exited  LSB: Switch to ondemand cpu governor (unless shift key is pressed)

  rc-local.service                                 loaded active exited  /etc/rc.local Compatibility

  rsyslog.service                                  loaded active running System Logging Service

  ssh.service                                      loaded active running OpenBSD Secure Shell server

  systemd-fsck-root.service                        loaded active exited  File System Check on Root Device

  systemd-fsck@dev-disk-by\x2dpartuuid-9b554424\x2d01.service loaded active exited  File System Check on /dev/disk/by-partuuid/9b554424-01

  systemd-journal-flush.service                    loaded active exited  Flush Journal to Persistent Storage

  systemd-journald.service                         loaded active running Journal Service

  systemd-logind.service                           loaded active running Login Service

  systemd-modules-load.service                     loaded active exited  Load Kernel Modules

  systemd-random-seed.service                      loaded active exited  Load/Save Random Seed

  systemd-remount-fs.service                       loaded active exited  Remount Root and Kernel File Systems

  systemd-sysctl.service                           loaded active exited  Apply Kernel Variables

  systemd-tmpfiles-setup-dev.service               loaded active exited  Create Static Device Nodes in /dev

  systemd-tmpfiles-setup.service                   loaded active exited  Create Volatile Files and Directories

  systemd-udev-trigger.service                     loaded active exited  udev Coldplug all Devices

  systemd-udevd.service                            loaded active running udev Kernel Device Manager

  systemd-update-utmp.service                      loaded active exited  Update UTMP about System Boot/Shutdown

  systemd-user-sessions.service                    loaded active exited  Permit User Sessions

  triggerhappy.service                             loaded active running triggerhappy global hotkey daemon

  user@1000.service                                loaded active running User Manager for UID 1000

  vsftpd.service                                   loaded active running vsftpd FTP server

LOAD   = Reflects whether the unit definition was properly loaded.

ACTIVE = The high-level unit activation state, i.e. generalization of SUB.

SUB    = The low-level unit activation state, values depend on unit type.

40 loaded units listed. Pass --all to see loaded but inactive units, too.

To show all installed unit files use 'systemctl list-unit-files'.

~

~

~

Any thoughts? Did something automatically update like node or parsoid that threw things off or is it something else?

Thanks!

Dev67 (talkcontribs)

Heyo! Fixed =D

Wound up investigating the JSON error and finding all sorts of weird characters in that read-pkg-up JSON file. Looks like it just became corrupted or something. Ran the command below and I think it updated the package (if not every package in parsoids directory).

npm install read-pkg-up

Dev67 (talkcontribs)

Blah, never mind still broken, reboot wipes these fixes for some reason. Still need to do more digging. I'll report back if I find anything. Maybe it'll help someone else out at some point if I figure this out. Suggestions welcome though.

Ciencia Al Poder (talkcontribs)

The error "Error parsing /etc/parsoid/node_modules/read-pkg-up/package.json: Unexpected number in JSON at position 2" is very explanatory. Do you see something wrong with that file at position 2?

Dev67 (talkcontribs)

So I had this wiki running on a raspberry pi and that pi was causing some issues I think. Definitely corrupted a bunch of files and for some reason, even if I fixed the files in question, they would become re-corrupted on a reboot. I have since migrated this wiki to a linux virtual server and haven't had an issue with it since.