Jump to content

Preferences do not save


HiTekRedNek

Recommended Posts

I'm having an issue trying to save the Utorrent preferences.

OS: Fedora 15

Build: Utorrent server 3.0-25053

Browser: Firefox 7.0.1

I created a custom utserver.conf containing the following parameters:

# utserver.conf
bind_port: 49923
preferred_interface: “p2p1”
upnp: 0
natpmp: 0
auto_bandwidth_management: 1
max_ul_rate: 28

# Directories
dir_active: /home/userx/p2pstore/downloading
dir_completed: /home/userx/p2pstore/completed
dir_torrent_files: /home/userx/p2pstore/torrentfiles

If I launch the utserver program it generally recognizes most of my settings although if I navigate to the preferences in the webui the 'upnp' checkbox is still selected. I did a netstat however and verified port 49923 was binded to the program. All of my directory paths are saved correctly.

My issue is if I kill the utserver daemon and launch the program again all of the fields in the webui are back to default. I've tried to manually configure through the browser but when I hit the apply button nothing happens.

Any ideas on how I can save my preferences?

In addition to the ones specified in the utserver.conf above:

Protocol Encryption: Enabled

Maximum number of active torrents

Maximum number of active downloads

Link to comment
Share on other sites

I created a custom utserver.conf containing the following parameters:

# utserver.conf
bind_port: 49923
preferred_interface: “p2p1”
upnp: 0
natpmp: 0
auto_bandwidth_management: 1
max_ul_rate: 28

If I launch the utserver program it generally recognizes most of my settings although if I navigate to the preferences in the webui the 'upnp' checkbox is still selected. I did a netstat however and verified port 49923 was binded to the program. All of my directory paths are saved correctly.

Any ideas on how I can save my preferences?

Some of the settings are read from the configuration file and applied every time the program is started. The settings that are also modifiable from the web UI are generally applied only if the settings.dat file does not already hold values for those settings. That is because the configuration file supplies only the initial values of those settings. Once there is a settings.dat file, the values of those settings are read from settings.dat, not utserver.conf. Such settings include upnp, natpmp. I believe the full list of settings is documented in the manual, although they may be documented in the negated sense, i.e., there may be a list of settings that are always applied, so you'll need to look for settings that aren't on that list.

Link to comment
Share on other sites

HiTekRedNek,

The reason your utserver starts up with UPnP enabled is due to an error in the utserver.conf file. You are effectively defining,

upnp: 0<space><space><space><space>

which is taken as Boolean true.

Contrary to your finding, however, correct behaviour is displayed at my end by unticking Preferences -> Connection -> 'Enable UPnP port mapping', clicking 'Apply' and 'OK' and restarting the daemon. This is as expected since the variable is now read back from a newly-written settings.dat file. Can you confirm that settings.dat is either written or updated when you kill the utserver process?

Any ideas on how I can save my preferences?

In addition to the ones specified in the utserver.conf above:

Protocol Encryption: Enabled

Maximum number of active torrents

Maximum number of active downloads

The uTorrent_Server.txt documentation appears to imply that none of these three variables are defined by the utserver.conf file. You therefore need to solve whatever issue you're having with utserver seemingly failing to read from settings.dat on next start up.

Perhaps also consider following this thread and updating your WebUI.

Link to comment
Share on other sites

I changed to the latest webui taken from the link you provided - same symptoms. The settings.dat file doesn't update. I even tried changing permissions to 777 but once the program restarts it goes back to 644.

I'm starting to think it's a firefox issue.

I'm going to rip my hair out of my head with this issue.

Link to comment
Share on other sites

The settings.dat file doesn't update. I even tried changing permissions to 777 but once the program restarts it goes back to 644.

Torrent data files (I think torrent files also) get access rights according to the umask of the process that invoked uTorrent Server. However, internally-used program maintenance files like settings.dat get a hard-coded 644. So, eventually any permissions changes you make to periodically-saved maintenance files will get changed back.

Link to comment
Share on other sites

I have to admit to being a touch confused. Would you mind clarifying a few things?

  • In which directory is the utserver executable found? I'm assuming /home/userx/utorrent-server-v3_0
  • With the utserver process stopped, please cd to that directory and issue rm -f *dat* to clear all dat files.
  • Note the time and invoke ./utserver to start the daemon. Confirm log output (directly to the terminal you're currently viewing) similar to the following,

linut@server:~/utorrent-server-v3_0$ ./utserver
server started - using locale en_GB.UTF-8
Using locale en_GB.UTF-8
File not found during integrity check: ./settings.dat
File not found during integrity check: ./settings.dat.new
File not found during integrity check: ./settings.dat.old
File not found during integrity check: ./settings.dat
File not found during integrity check: ./settings.dat.new
File not found during integrity check: ./settings.dat.old
GetNodeID failed, using /dev/random
total physical memory 536870912 max disk cache 33554432
File not found during integrity check: ./dht.dat
File not found during integrity check: ./dht.dat.new
File not found during integrity check: ./dht.dat.old
File not found during integrity check: ./rss.dat
File not found during integrity check: ./rss.dat.new
File not found during integrity check: ./rss.dat.old
File not found during integrity check: ./resume.dat
File not found during integrity check: ./resume.dat.new
File not found during integrity check: ./resume.dat.old
IPv6 is installed

  • Before pointing your browser to the WebUI, switch to another terminal window (e.g. Alt-F2) and confirm creation of a settings.dat file in the same location as the utserver executable.
  • Browse to the WebUI main screen; you should see the following messages outputted by the daemon,

File not found during integrity check: ./webcache.dat
File not found during integrity check: ./webcache.dat.new
File not found during integrity check: ./webcache.dat.old

Note that no additional files appear to have yet been written to disk.

  • Wait a couple of minutes then kill the utserver process. Confirm, via timestamps, that the settings.dat file originally created on utserver startup has been renamed to settings.dat.old and a new settings.dat, of larger filesize, has just been created. A few additional dat files for DHT, Resume and RSS functionality may now be present.
  • Wait a further couple of minutes then invoke utserver again. Confirm that the (larger) settings.dat which was created on process shutdown has now overwritten settings.dat.old and a new settings.dat file has just been created.

If the above is true, then I can't see why you don't seem to be pulling in the updated settings when utserver starts :(

Link to comment
Share on other sites

I've followed the instructions above and everything you described takes place. The only thing I get in addition is the libcrypto.so.0.9.8 & libssl.so.0.9.8 "no version information available" error that I read is non fatal.

The settings.dat and settings.dat.old exists in the same manner as you described.

A few other things to explain about my setup.

I'm connecting to the webui over port 8080 on a remote Windows 7 machine.

Utorrent server is running in a Fedora 15 VM on Virtualbox. i686 architecture

When I initially run the program as follows; the fields in the webui get populated with the correct information (for the most part).

./utserver -configfile /home/userx/utorrent-server-V3_0/utserver.conf

Once I kill and restart the daemon the settings no longer remain. I've tried launching the daemon with and without referencing the path to the utserver.conf. I've tried removing the utserver.conf file from the settings directory all together and changing the settings manually within the webui but still no luck. I've tried firefox 4 and 7 also IE9....again same symptoms.

Very frustrated but appreciate all the help and suggestions.

Link to comment
Share on other sites

Well I figured out how to make it work. I was starting utserver in the background using '&' and using 'kill -9' to terminate. For some reason the kill -9 causes the preferences to reset to default even if you delete the settings.dat and relaunch utserver. Since I just started using the default kill and see the message: "server exited with 0" my preferences are saved when I restart utserver and check the webui.

I was able to replicate the entire scenario on my physical Ubuntu 11.04 box as well as my Fedora 15 VM. I was pretty much ready to give up after reviewing all instructions provided by linut (thank you by the way) until I retraced my steps and figured the only thing I failed to mention was my way of starting and stopping the daemon.

I'm not a programmer by any means but If somebody could help explain to me why exactly this occurs would be greatly appreciated.

Link to comment
Share on other sites

Hi,

Congratulations on finding the problem and thanks for letting us know with a follow up post. I was getting ready to play around with Fedora in a VM to see if I could come across anything similarly peculiar :)

We observe that if utserver is started in the foreground it may be satisfactorily stopped by using Ctrl-c to send a terminal interrupt signal, SIGINT. I'm not sure that my terminology is appropriate but I interpret this, and the similar SIGTERM, as a "polite" instruction for the program to terminate itself while the "forceful" SIGKILL (kill -9) is not caught and thus the program has no time to "tidy up" before dying. This should explain why settings.dat wasn't being updated with any changes that were applied via the WebUI.

edit: Note that you can use the -daemon argument to start utserver in its own process group, and also 'hidden'. It can then be stopped by the simple kill <PID>; the default kill signal generally being SIGTERM.

Link to comment
Share on other sites

  • 4 weeks later...
Well I figured out how to make it work. I was starting utserver in the background using '&' and using 'kill -9' to terminate. For some reason the kill -9 causes the preferences to reset to default even if you delete the settings.dat and relaunch utserver. Since I just started using the default kill and see the message: "server exited with 0" my preferences are saved when I restart utserver and check the webui.

I was able to replicate the entire scenario on my physical Ubuntu 11.04 box as well as my Fedora 15 VM. I was pretty much ready to give up after reviewing all instructions provided by linut (thank you by the way) until I retraced my steps and figured the only thing I failed to mention was my way of starting and stopping the daemon.

I'm not a programmer by any means but If somebody could help explain to me why exactly this occurs would be greatly appreciated.

Vaooo man..thx for info..

My problem was same as your, and I made for me script.

In script I killed utserver with command killall -9 utserver and as someone said here utserver has no time to save configs.

So I'm very heplful for this topic!

Make it sticky!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...