Jump to content

Slackware 14 x32 - utorrent (27079) 2012-04-17 19:51:48 -0700


mbr2xgd

Recommended Posts

Hi.

I have 2 interfaces "eth0" and "eth1". I have "utorrent" on "/usr/loca/share/utorrentserver"

I created 2 files called "rc.utserver" on "/etc/rc.d" and "utserver.conf" on "/usr/local/share/utorrentserver"

Video about my problem:

When I try to start my utserver with or without utserver.conf and I try to access:

http://localhost:8080/gui - I can't connect. :(

I always see that message(utserver.log):

[00:09:02]  Using locale LC_CTYPE=en_US;LC_NUMERIC=en_US;LC_TIME=en_US;LC_COLLATE=C;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=en_US;LC_ADDRESS=en_US;LC_TELEPHONE=en_US;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=en_US
[00:09:02] total physical memory -1 max disk cache 33554432
[00:09:02] IPv6 is installed
[00:09:19] HTTP: IP 192.168.0.12: Bad username/password
[00:09:20] HTTP: IP 192.168.0.12: Bad username/password
[00:09:20] HTTP: IP 192.168.0.12: Bad username/password
[00:09:20] HTTP: IP 192.168.0.12: Bad username/password
[00:09:20] HTTP: IP 192.168.0.12: Bad username/password

rc.utserver:

#!/bin/bash


#Usage: utserver -settingspath -logfile -configfile -pidfile -daemon -usage
# settingspath - location of settings directory
# logfile - location and name of log file
# configfile - location and name of configuration file
# pidfile - location and name of file to contain process ID
# daemon - run process as a daemon
# usage - print this message and exit



SETTINGSPATH=/usr/local/share/utorrentserver/data
LOGFILE=/var/log/utserver/utserver.log
CONFIGFILE=/usr/local/share/utorrentserver/utserver.conf
PIDFILE=/var/run/utserver.pid
DAEMON=-daemon


utserver_start(){

if [ -x /usr/local/share/utorrentserver/utserver ]; then
echo "Starting utserver..."
/usr/local/share/utorrentserver/utserver -settingspath $SETTINGSPATH -logfile $LOGFILE -configfile $CONFIGFILE -pidfile $PIDFILE $DAEMON 1>/var/log/utserver/access.log 2>/var/log/utserver/error.log
fi
}


utserver_stop(){
killall utserver
}


utserver_restart(){
utserver_stop
sleep 2
utserver_start
}



case "$1" in
'start')
utserver_start
;;
'stop')
echo "kill..."
utserver_stop
;;
'restart')
echo "Restarting..."
utserver_restart
;;
*)
echo "usage start|stop|restart"
;;
esac



utserver.conf:


#Internal Settings

#bind_ip (string):
#bind_ip (string):192.168.0.12
# IP address to use for socket connections. If not provided, a default IP
# address will be used. We do not recommend changing this value.

#ut_webui_port (integer):
#ut_webui_port (integer):8080
# Default value: 8080. Port number where the utserver process accepts HTTP
# RPC API calls to support the µTorrent-compatible HTTP interface. If the
# utserver process also serves HTML files (see webui_server_files setting),
# also the port of HTTP server.

#token_auth_enable (boolean)
# Default value: true. If true, the µTorrent HTTP interface defends against
# cross-site request forgeries by requiring that a short-lived token be
# obtained from the µTorrent HTTP interface and included at the beginning of
# the parameter list of any request made to that interface. If false, the
# µTorrent HTTP interface will not be protected in this manner.

#dir_active (string):
dir_active (string):/utorrent/.done
# Default value: "./". Directory in which currently downloaded data is saved.
# Can be an absolute path or a relative path. If it is a relative path, the
# value is relative to dir_root or the current working directory if dir_root
# is not defined or an empty string. It is recommended that this directory be
# hidden from users (i.e. not exported through Samba).

#dir_completed (string):
dir_completed (string):/utorrent/save
# Default value: "". Directory where completed downloads are stored. If the
# value is an empty string, the value of dir_active is used. This value must
# represent a path that is accessible to users (e.g. exported through Samba).
# It also has to be on the same volume as dir_active.

#dir_download (string):
# Default value: "". Optional directory where completed downloads can be
# stored, instead of in dir_completed. If no value is specified for this
# setting, the value of dir_completed is used. The value must represent a
# path that is accessible to users (e.g. exported through Samba).
#
# This option can be specified multiple times in the file - once for each
# directory to be designated as such. This option can be used when adding
# torrents via the µTorrent HTTP interface, not via the SDK interface.

# Use the action list-dirs to obtain a list of download directories from the
# µTorrent HTTP interface. Use the option download_dir to specify which of
# these directories to use when adding a torrent by URL or file through the
# µTorrent HTTP interface; specify the one-based index of the entry of
# interest. The index of each entry will be in order in which each entry
# appears in utserver.conf, starting with 1 for the first entry, 2 for the
# second entry, and so on. 0 indicates the default download directory should
# be used.

#dir_torrent_files (string):
dir_torrent_files (string):/utorrent/.files
# Default value: "". Directory where torrent files are stored. If the empty
# string, the value of dir_active is used. It is recommended that this
# directory be hidden from users (i.e. not exported through Samba).

#dir_temp_files (string):
dir_temp_files (string):/utorrent/.tmp
# Default value: "". Directory where temporary files are stored. If the empty
# string, the value of dir_active is used. It is recommended that this
# directory be hidden from users (i.e. not exported through Samba). Also,
# using a separate directory just for temporary files allows for deleting the
# files in this directory on boot and/or periodically. The utserver process
# creates temporary files with a .utt extension - if a value for this setting
# is specified, the utserver process will delete all files with that
# extension in that directory at process startup. This setting applies only
# to POSIX systems. The value should specify a directory, not a symbolic link
# to a directory.

dir_autoload (string):/utorrent/.new
# Default value: "". Directory where torrent files will be recognized and
# auto-loaded. If the empty string, auto-load is disabled.

#dir_autoload_delete (boolean):
# Default value: false. If true, torrent files in the autoload directory will
# be deleted after being loaded, else they will be renamed with an extension
# of .loaded. The dir_autoload setting must be specified for this setting to
# have an effect.

#dir_request (string):
# Default value: "". Directory where maintenance request files will be
# recognized, loaded, and deleted. If the empty string, maintenance request
# handling is disabled. This directory should be hidden from users (i.e., not
# exported through Samba). Your software running on your device can create
# the following files in this directory in order to request the following
# maintenance procedures.
#
# If the file c.utmr is created in or moved into this directory, the
# credentials necessary to access the µTorrent HTTP interface will be reset
# to username admin and a blank password.
#
# If the file wipl.utmr is created in or moved into this directory, the IP
# restriction list that limits the IPs that can use the µTorrent HTTP
# interface is cleared, so that there will be no restrictions on IP address.
#
# These maintenance operations provide a way to help a user who has either
# entered new credentials and then forgotten them, or who has entered an IP
# range in the restricted list and can no longer access the µTorrent HTTP
# interface as a result.
#
# If the file rcf.utmr is created in or moved into this directory, the server
# will reload the configuration file. If you always use this method to
# request a configuration file reload, you can safely change the value of
# this setting while the server is running.
#
# The server will also reload the configuration file if you send a hangup
# signal to the server; however, a race condition may occur if you send a
# hangup signal to the server in order to change the value of this setting.
# You should either only use the file system interface for requesting
# configuration file reloads, or you should not change the value of this
# setting in the configuration file before sending a hangup signal to the
# server.

#upnp (boolean):
# Default value: true. If true, UPNP functionality for mapping ports is used
# by utserver. We recommend setting this value to true.

#natpmp (boolean):
# If true, NAT-PMP functionality for mapping ports is used by utserver.
# Default value: true. We recommend setting this value to true.

#lsd (boolean):
# Default value: true. If true, Local Service Discovery is enabled. We
# recommend setting this value to true.

#dht (boolean):
# Default value: true. If true, Distributed Hash Table extension is enabled.
# We recommend setting this value to true.

#pex (boolean):
# Default value: true. If true, Peer Exchange extension is enabled. We
# recommend setting this value to true.

#rate_limit_local_peers (boolean):
# Default value: false. If true, rate limiting also applies to communications
# with peers in the local subnet. We recommend setting this value to false.

#dir_root (string):
dir_root (string):/utorrent
# Default value: "". If not empty, dir_active, dir_completed, and
# dir_torrent_files are relative to this directory.

#disk_cache_max_size (integer):
# Default value: 0. Maximum amount of memory used by each of the read, write,
# and piece caches. Value is in megabytes. If 0, accepts the SDK's default
# choices on selecting sizes of disk caches. Maximum value is 512.
#
# The value of this setting will be applied every time the utserver process
# starts.

#preferred_interface (string):
preferred_interface (string):"eth1"
# Default value: "". If defined, name of network interface to be preferred
# when attempting to search among network interfaces for an external IP and
# hardware address. If empty string, preferred interface is ignored.
#
# You need to provide a value for this setting if either 1) the toolchain for
# your computer does not supply ifaddrs.h, or 2) you want the utserver
# process to choose a different interface than it would choose on its own.
# You should set a value for this setting if you see an incorrect port
# mapping on a UPnP router for the subnet to which the device belongs (the IP
# address of the device will not appear in the port mapping requested by the
# utserver process - instead, the IP address associated with the mapping will
# be 0.0.0.0 with a device having a toolchain that does not include
# ifaddrs.h, or some other IP address with a device having a toolchain that
# includes ipaddrs.h).
#
# The value of this setting will be applied every time the utserver process
# starts.

#admin_name (string):
admin_name (string):admin
# Default value: "admin". If defined, name that must be supplied (along with
# the password) when authenticating to the server via the HTTP interface.
# This allows the administrator to define an initial non-default value for
# this name. This value will not be applied from utserver.conf if
# settings.dat already exists.

#admin_password (string):
admin_password (string):admin
# Default value: "". If defined, password that must be supplied (along with
# the name) when authenticating to the server via the HTTP interface. This
# allows the administrator to define an initial non-default value for this
# password. This value will not be applied from utserver.conf if settings.dat
# already exists.

#localhost_authentication (boolean):
# Default value: true. If false, HTTP requests originating from the local
# host will not be required to include administrative user name and password.
# Disabling authentication of requests originating on the local host may be
# useful on computers where there are no other users or processes that
# shouldn't be prevented from accessing the HTTP interface. Disabling
# authentication presents a security risk on those computers that support
# untrusted users or allow third-party applications to be installed and run
# outside the control of the administrator.

#logmask (integer):
# Default value: 0. A mask whose bits when set allow certain categories of
# log messages to be generated. The value of this setting will be applied
# every time the utserver process starts.
#
# The bits (0 - 31) in the value of this setting correspond to a set of
# internal events and subsystems. The usage of these bits may change without
# advance notice in a future release.
#
# â–¡ 3 - send have
# â–¡ 6 - hole punch
# â–¡ 7 - got bad piece request
# â–¡ 8 - trace
# â–¡ 9 - piece picker
# â–¡ 10 - got bad cancel
# â–¡ 11 - got bad unchoke
# â–¡ 12 - got bad piece
# â–¡ 13 - rss
# â–¡ 14 - rss error
# â–¡ 15 - got have
# â–¡ 16 - got bad have
# â–¡ 17 - error
# â–¡ 18 - aggregated
# â–¡ 19 - disconnect
# â–¡ 20 - out connect
# â–¡ 21 - in connect
# â–¡ 22 - UPnP
# â–¡ 23 - UPnP error
# â–¡ 24 - NATPMP
# â–¡ 25 - NATPMP error
# â–¡ 26 - metadata finish
# â–¡ 27 - web UI
# â–¡ 28 - got bad reject
# â–¡ 29 - pex
# â–¡ 30 - peer messages
# â–¡ 31 - blocked connect

#ut_webui_dir (string):
ut_webui_dir (string):/usr/local/share/utorrentserver/webui
# Directory where the web UI file archive webui.zip is stored, or which
# contains a webui subdirectory within which the unarchived web UI files are
# stored. It can be an absolute path or set relative to the current
# directory. It is recommended that this directory be hidden from users (i.e.
# not exported through Samba). Default value: "" (to use the same directory
# as settings.dat and other settings files).

#finish_cmd (string), state_cmd (string):
# If defined, finish_cmd is a command that will be executed upon completion
# of each torrent, and state_cmd is a command that will be executed when a
# torrent changes state. Default value: "" (no command is run for the event
# (s) associated with that setting).
#
# The command is run asynchronously, so that a lengthy or hung process will
# not block the server. The server creates a new process group for the
# command, so that the server does not need to wait for it, and so the kernel
# process table does not fill up with zombie processes. The command is run as
# the same user that runs the server process.
#
# The server permits substitutions in the command text as follows:
#
# %F
# Name of downloaded data file (for single-file torrents)
# %D
# directory where torrent data files are saved
# %N
# torrent title
# %S
# torrent state
# %P
# previous state of torrent
# %L
# label associated with torrent
# %T
# tracker
# %M
# status message
# %I
# hex-encoded info-hash
#
# State (%S) and previous state (%P) are integers that have the following
# values:
#
# â–¡ 1 (error)
# â–¡ 2 (checked)
# â–¡ 3 (paused)
# â–¡ 4 (super seeding)
# â–¡ 5 (seeding)
# â–¡ 6 (downloading)
# â–¡ 7 (super seeding (forced))
# â–¡ 8 (seeding (forced))
# â–¡ 9 (downloading (forced))
# â–¡ 10 (queued seed)
# â–¡ 11 (finished)
# â–¡ 12 (queued)
# â–¡ 13 (stopped)

#uconnect_enable (boolean):
uconnect_enable (boolean):true
# Default value: false. If true, the values of uconnect_username and
# uconnect_password are provided when authenticating to µTorrent Remote. This
# value is always applied from btsettings.txt; it is not saved in
# settings.dat.

#uconnect_username (string):
uconnect_username (string):admin
# Default value: "". If defined, name that must be supplied (along with the
# password) when authenticating to µTorrent Remote. This value is always
# applied from btsettings.txt; it is not saved in settings.dat.

#uconnect_password (string):
uconnect_password (string):admin
# Default value: "". If defined, password that must be supplied (along with
# the name) when authenticating to µTorrent Remote. This value is always
# applied from btsettings.txt; it is not saved in settings.dat.

#low_cpu (boolean):
# Default value: false. If true, a short sleep occurs during the process of
# handling network traffic, so that network traffic handling presents less of
# a load on the CPU. This value will not be applied from utserver.conf if
# settings.dat already exists.
#
#Regular Settings


#bind_port (integer):
# Default value: 6881. Port used for BitTorrent protocol. This can be any
# value in the range 1025-65000.

#max_ul_rate (integer):
# Default value: -1. Maximum total upload rate in kilobytes per second. -1
# means unlimited. We recommend setting it to -1.

#max_ul_rate_seed (integer):
# Default value: -1. Maximum per-torrent upload rate when seeding, in
# kilobytes per second. -1 means unlimited. We recommend setting it to -1.

#conns_per_torrent (integer):
# Default value: 50. Maximum number of connections for a given torrent.

#max_total_connections (integer):
# Default value: 200. Maximum number of connection opened at the same time.

#auto_bandwidth_management (boolean):
# Default value: true. If true, upload bandwidth is automatically throttled
# in order to not impact other applications using TCP/IP.

#max_dl_rate (integer):
# Default value: -1. Maximum total download rate in kilobytes per second. -1
# means unlimited. We recommend setting it to -1.

#seed_ratio (integer):
# Default value: 0. Seed ratio in percent (%) (e.g. 100 means 100%). If not
# 0, seeding will stop after reaching this upload/download ratio.

#seed_time (integer):
# Default value: 0. Time after which seeding will stop, in seconds. 0 means
# seeding won't stop.

ldd -r utserver

./utserver: /lib/libcrypto.so.0.9.8: no version information available (required by ./utserver)
./utserver: /lib/libssl.so.0.9.8: no version information available (required by ./utserver)
linux-gate.so.1 (0xffffe000)
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0xb76a5000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0xb7530000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7516000)
libm.so.6 => /lib/libm.so.6 (0xb74ea000)
librt.so.1 => /lib/librt.so.1 (0xb74e0000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb74c3000)
libc.so.6 => /lib/libc.so.6 (0xb733e000)
/lib/ld-linux.so.2 (0xb7724000)
libdl.so.2 => /lib/libdl.so.2 (0xb7339000)

Link to comment
Share on other sites

  • 4 months later...

Some ideas:

[00:09:02]  Using locale LC_CTYPE=en_US;LC_NUMERIC=en_US;LC_TIME=en_US;LC_COLLATE=C;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=en_US;LC_ADDRESS=en_US;LC_TELEPHONE=en_US;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=en_US

I'm wondering about your using a locale that does not support UTF-8. What if you try en_US.UTF-8?

#admin_name (string):

admin_name (string):admin

# Default value: "admin". If defined, name that must be supplied (along with

# the password) when authenticating to the server via the HTTP interface.

# This allows the administrator to define an initial non-default value for

# this name. This value will not be applied from utserver.conf if

# settings.dat already exists.

#admin_password (string):

admin_password (string):admin

# Default value: "". If defined, password that must be supplied (along with

# the name) when authenticating to the server via the HTTP interface. This

# allows the administrator to define an initial non-default value for this

# password. This value will not be applied from utserver.conf if settings.dat

# already exists.

If you already had a settings.dat file, setting the credentials here won't apply.

Try deleting settings.dat and settings.dat.old and trying again.

#uconnect_username (string):

uconnect_username (string):admin

# Default value: "". If defined, name that must be supplied (along with the

# password) when authenticating to µTorrent Remote. This value is always

# applied from btsettings.txt; it is not saved in settings.dat.

#uconnect_password (string):

uconnect_password (string):admin

# Default value: "". If defined, password that must be supplied (along with

# the name) when authenticating to µTorrent Remote. This value is always

# applied from btsettings.txt; it is not saved in settings.dat.

Unless no Remote account named 'admin' had been created previously by somebody else, this isn't likely to work for you.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...