Page 1 of 1

DEluge starts on 127.0.0.1 interface instead of 192.168.1.49

Posted: Sun May 29, 2016 6:00 pm
by tematibr
I have deluge server and web-gui installed on a home server (its actually running debian). Before it was working fine, but now for some reason deluge web server starts on "127.0.0.1 : 8112", which means I can not access the web gui from another machine. How can I configure deluge to start on outside interface, something like "192.168.1.50:8112".

Here is deluge-web log file (I started deluge-web with -L debug flag)

Code: Select all


[INFO    ] 18:36:46 ui:121 Deluge ui 1.3.10
[DEBUG   ] 18:36:46 ui:122 options: 
         {'fork': False, 'profile': False, 
         'loglevel': 'debug', 'quiet': False, 
         'ssl': False, 'base': None, 
         'logfile': '/var/log/deluge/web-gui.log', 
         'config': None, 'port': None}
[DEBUG   ] 18:36:46 ui:123 args: []
[INFO    ] 18:36:46 ui:124 Starting web ui..
[DEBUG   ] 18:36:47 configmanager:111 Getting config 'web.conf'
[DEBUG   ] 18:36:47 config:197 Setting 'sidebar_show_zero' to False of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'show_session_speed' to False of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'first_login' to True of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'https' to False of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'sessions' to {} of <type 'dict'>
[DEBUG   ] 18:36:47 config:197 Setting 'enabled_plugins' to [] of <type 'list'>
[DEBUG   ] 18:36:47 config:197 Setting 'cert' to ssl/daemon.cert of <type 'str'>
[DEBUG   ] 18:36:47 config:197 Setting 'pkey' to ssl/daemon.pkey of <type 'str'>
[DEBUG   ] 18:36:47 config:197 Setting 'port' to 8112 of <type 'int'>
[DEBUG   ] 18:36:47 config:197 Setting 'theme' to gray of <type 'str'>
[DEBUG   ] 18:36:47 config:197 Setting 'session_timeout' to 3600 of <type 'int'>
[DEBUG   ] 18:36:47 config:197 Setting 'show_sidebar' to True of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'default_daemon' to  of <type 'str'>
[DEBUG   ] 18:36:47 config:197 Setting 'sidebar_multiple_filters' to True of <type 'bool'>
[DEBUG   ] 18:36:47 config:197 Setting 'base' to / of <type 'str'>
[DEBUG   ] 18:36:47 config:391 Config /home/deluge/.config/deluge/web.conf version: 1.1 
         loaded: {'port': 8112, 'enabled_plugins': [], 'theme': u'gray',
         'show_sidebar': True, 'sidebar_show_zero': True, 
         'pkey': u'ssl/deluge-ssl.key.protected', 
         'https': True, 'sessions': {}, 
         'base': u'/', u'interface': u'192.168.1.45',  
         'show_session_speed': False, 'first_login': False, 
         'cert': u'ssl/deluge-ssl.crt', 'session_timeout': 3600, 
         'default_daemon': u'', 'sidebar_multiple_filters': True}
[DEBUG   ] 18:36:47 server:253 Adding directory `/usr/lib/python2.7/dist-packages/deluge/ui/web/css` with path ``
[DEBUG   ] 18:36:47 server:253 Adding directory `/usr/lib/python2.7/dist-packages/deluge/ui/web/icons` with path ``
[DEBUG   ] 18:36:47 server:253 Adding directory `/usr/lib/python2.7/dist-packages/deluge/ui/web/images` with path ``
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.add_host
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.add_torrents
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.connect
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.connected
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.deregister_event_listener
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.disconnect
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.download_torrent_from_url
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_config
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_events
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_host_status
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_hosts
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_magnet_info
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_plugin_info
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_plugin_resources
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_plugins
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_torrent_files
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_torrent_info
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.get_torrent_status
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.register_event_listener
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.remove_host
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.set_config
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.start_daemon
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.stop_daemon
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.update_ui
[DEBUG   ] 18:36:47 json_api:315 Registering method: web.upload_plugin
[DEBUG   ] 18:36:47 configmanager:111 Getting config 'hostlist.conf.1.2'
[DEBUG   ] 18:36:47 config:197 Setting 'hosts' to        
         [('eb5a43f81b25b5f4bd68c01ffe686794eda9ba54', '127.0.0.1', 58846, '', '')] of <type 'list'>
[WARNING ] 18:36:47 config:361 Unable to open config file 
         /home/deluge/.config/deluge/hostlist.conf.1.2: 
         [Errno 2] No such file or directory: '/home/deluge/.config/deluge/hostlist.conf.1.2'
[DEBUG   ] 18:36:47 coreconfig:43 CoreConfig init..
[DEBUG   ] 18:36:47 sessionproxy:55 SessionProxy init..
[DEBUG   ] 18:36:47 json_api:315 Registering method: auth.change_password
[DEBUG   ] 18:36:47 json_api:315 Registering method: auth.check_session
[DEBUG   ] 18:36:47 json_api:315 Registering method: auth.delete_session
[DEBUG   ] 18:36:47 json_api:315 Registering method: auth.login
[DEBUG   ] 18:36:47 configmanager:111 Getting config 'web.conf'
[DEBUG   ] 18:36:47 pluginmanagerbase:65 Plugin manager init..
[DEBUG   ] 18:36:47 configmanager:111 Getting config 'web.conf'
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Extractor 0.4 at /usr/lib/python2.7/dist-packages/deluge/plugins/Extractor-0.4.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Execute 1.3 at /usr/lib/python2.7/dist-packages/deluge/plugins/Execute-1.3.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Blocklist 1.3 at /usr/lib/python2.7/dist-packages/deluge/plugins/Blocklist-1.3.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: AutoAdd 1.04 at /usr/lib/python2.7/dist-packages/deluge/plugins/AutoAdd-1.04.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Label 0.2 at /usr/lib/python2.7/dist-packages/deluge/plugins/Label-0.2.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Notifications 0.2 at /usr/lib/python2.7/dist-packages/deluge/plugins/Notifications-0.2.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: WebUi 0.1 at /usr/lib/python2.7/dist-packages/deluge/plugins/WebUi-0.1.egg
[DEBUG   ] 18:36:47 pluginmanagerbase:124 Found plugin: Scheduler 0.2 at /usr/lib/python2.7/dist-packages/deluge/plugins/Scheduler-0.2.egg
[INFO    ] 18:36:47 server:661 Starting server in PID 15148.
[DEBUG   ] 18:36:47 server:589 Enabling SSL using:
[DEBUG   ] 18:36:47 server:590 Pkey: ssl/deluge-ssl.key.protected
[DEBUG   ] 18:36:47 server:591 Cert: ssl/deluge-ssl.crt
[INFO    ] 18:36:47 server:681 serving on 0.0.0.0:8112 view at https://127.0.0.1:8112

In my web.conf file I have tried setting the interface parameter:

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "port": 8112,
  "enabled_plugins": [],
  "theme": "gray",
  "show_sidebar": true,
  "sidebar_show_zero": true,
  "pkey": "ssl/deluge-ssl.key.protected",
  "https": true,
  "sessions": {},
  "base": "/",
  "interface": "192.168.1.45",
  "show_session_speed": false,
  "first_login": false,
  "cert": "ssl/deluge-ssl.crt",
  "session_timeout": 3600,
  "default_daemon": "",
  "sidebar_multiple_filters": true
}


which shows up in this line in the deluge-web.log file:

Code: Select all

  'base': u'/', u'interface': u'192.168.1.45',
But it does not seem to do anything because the end effect is this line in log fie:

Code: Select all

 [INFO    ] 18:36:47 server:681 serving on 0.0.0.0:8112 view at https://127.0.0.1:8112

Re: DEluge starts on 127.0.0.1 interface instead of 192.168.1.49

Posted: Sun May 29, 2016 10:10 pm
by Cas
There is something wrong with your server setup, starting deluge-web on localhost (or 0.0.0.0) allows access from any computer on the network. First step would be check your firewall...

Re: DEluge starts on 127.0.0.1 interface instead of 192.168.1.49

Posted: Mon May 30, 2016 9:26 pm
by tematibr
I resolved the issue. It was to do with invalid ssl certificates.

But anyway after looking at server.py in the "web" folder of deluge code I found something strange, probably just an oversight:

Code: Select all

672     def start_normal(self):
673         self.socket = reactor.listenTCP(self.port, self.site)
674         log.info("serving on %s:%s view at http://127.0.0.1:%s", "0.0.0.0",
675             self.port, self.port)
676 
677     def start_ssl(self):
678         check_ssl_keys()
679         self.socket = reactor.listenSSL(self.port, self.site, ServerContextFactory())
680         log.info("serving on %s:%s view at https://127.0.0.1:%s", "0.0.0.0",
681             self.port, self.port)
So actually the numbers for host don't matter at all becasue they are hard coded. This is deluge-web version 1.3.10.