What's new

[SOLVED] JSON parse failed

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Steini

Occasional Visitor
I was trying to Change settings in Transmission script and i got this error when tryin to start Transmission again:

JSON parse failed in /opt/etc/transmission-daemon/settings.json at pos 0: SPECIAL_EXPECTED -- remaining text "/opt/etc/init.d/"[FAILED]

I think I read somwhere that you can reset all settings.
Can anyone help me to fix this again please?
 
Thank you for the script. I use putty but I have no experience so I have followed a guide to install transmission.
In my script port forwarding was not enabled so I was just changing it to "true" to enable it. When I tried to start transmission again the error came up. Maybe I did something else without knowing it.

I've been reading for hours in this forum and searched the Web for a solution but my basic skills in programming and Linux are zero so I'm just not able to make to much sense of these things.
I'm not a newbie in making my home network work and have been playing around with my computers for years so I usually get things to work. :)

In other words it would be of big help with some instructions or a guide on how to replace my current script to the one you posted a link.
As I mentioned in my first post I think I read somewhere that it is a command that resets all settings but I can't find it.
Also I think there are a command for updating or searching for new releases. It would be great to get a list of commands that works for things like that.

I hope someone can point me in the right direction. :)
 
Thanks. That is the guide I have followed. I can't see any answer there to the questions of this thread. Am I missing something?
 
You have to stop transmission for editing settings.json
Code:
/opt/etc/init.d/S95transmission stop
Remove bad json file
Code:
rm /opt/etc/transmission-daemon/settings.json
Create default one
Code:
cat >> /opt/etc/transmission-daemon/settings.json << 'EOF'
{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": true,
    "blocklist-url": "http://list.iblocklist.com/?list=bt_level1",
    "cache-size-mb": 2,
    "dht-enabled": true,
    "download-dir": "/tmp/mnt/sda1/Transmission",
    "download-queue-enabled": true,
    "download-queue-size": 3,
    "encryption": 0,
    "idle-seeding-limit": 180,
    "idle-seeding-limit-enabled": true,
    "incomplete-dir": "/tmp/mnt/sda1/Transmission/Incomplete",
    "incomplete-dir-enabled": false,
    "lazy-bitfield-enabled": true,
    "lpd-enabled": false,
    "message-level": 2,
    "open-file-limit": 5,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 80,
    "peer-limit-per-torrent": 30,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "pidfile": "/var/run/transmission-daemon.pid",
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "proxy": "",
    "proxy-auth-enabled": false,
    "proxy-auth-password": "",
    "proxy-auth-username": "",
    "proxy-enabled": false,
    "proxy-port": 80,
    "proxy-type": 0,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 300,
    "ratio-limit": 7,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "admin",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "admin",
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 0,
    "upload-slots-per-torrent": 10,
    "utp-enabled": false,
    "watch-dir": "/opt/etc/transmission/watchdir",
    "watch-dir-enabled": true
}
EOF
Press ENTER

To modify settings, open with nano editor
Code:
nano /opt/etc/transmission-daemon/settings.json
Move with keyboard directions keys, do any changes, then save with "CTRL-O" (O from Omega not zero), Press ENTER, Exit nano with CTRL-X
Start transmission again
Code:
/opt/etc/init.d/S95transmission start
 
Thank you so much! I'll try that first thing when I come back home from work. I'll post here when I'm done.
:)
 
Now its working again! Thank you for the instructions.

Thats the good thing and the bad thing is that I'm still struggeling with opening the port. If you look at the pictures you can see that: https://ipleak.net/ is seeing the right port open.
2016-08-05 (1).png
On the other hand is: http://www.canyouseeme.org/
giving me an error.
2016-08-05.png

Also the private tracker I'm currently on for my torrents is also telling me I'm not connectable.

Could there be some settings on the router that needs to be enabled?
2016-08-05 (4).png

Any ideas?
 

Attachments

  • 2016-08-05 (1).png
    2016-08-05 (1).png
    111.4 KB · Views: 562
Last edited:
2016-08-05 (6).png
I posted the output in this area and got banned! :)
But now I'm back again. :)

Here is the output but I had to take a screenshot. It didnt upload as txt.
 
I just want to check permissions, are ok :)
Now reboot router or apply firewall rule and should be ok
sh /jffs/scripts/firewall-start
 
I rebooted and applyed the firewall rule.
Finally! Success. :-D
2016-08-05 (7).png


Thank you for helping me out. You made me a happy man. :-D
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top