[Plugin] ControlR


Recommended Posts

15 hours ago, wgstarks said:

Will this happen every time or is there an option to "trust" the self-signed certificate?

 

I think you can trust the certificate, but that's browser-specific.

 

The first time I accessed https, I got the warning, subsequently it didn't show up again, but I haven't closed the browser, nor rebooted the workstation (using Chrome).

Link to comment

Updated to v2.0.2

 

2017-06-20 - 2.0.2

 

The plugin will now start on the same protocol as emhttp.
If both http & https are enabled, it will start on https.

 

Additionally:
- Fix Mixed Content error
- Improve link to the UI in the Settings page

Edited by jbrodriguez
Link to comment

I tried to uninstall/reinstall and got some errors:

plugin: installing: https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/controlr.plg
plugin: downloading https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/controlr.plg
plugin: downloading: https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/controlr.plg ... done

Warning: simplexml_load_file(): /tmp/plugins/controlr.plg:24: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): If both http & https are enabled, it will start on https. in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): /tmp/plugins/controlr.plg:24: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): If both http & https are enabled, it will start on https. in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): /tmp/plugins/controlr.plg:24: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): If both http & https are enabled, it will start on https. in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 216
plugin: xml parse error

 

Link to comment

2017-06-23 - 2.0.3

The plugin will now start on the same protocol as emhttp.
If both http & https are enabled, it will start on https.

Additionally:
- Fix Mixed Content error
- Improve link construction
- Fix issue with unescaped entities
 

There's a pending issue with the Open webui link: it opens a blank page.

 

You can still access the plugin's page by manually inputting your server address:port (say http(s)://Tower:2378/, or your custom address/name/port)

 

Seems like global php vars such as $_SERVER isn't available in the .page "scripts", that would have been the definitive solution.

 

I'll be looking for a workaround

Link to comment
3 hours ago, jbrodriguez said:

There's a pending issue with the Open webui link: it opens a blank page.

Odd, the link works fine on 6.4.0-rc5, but it is empty on 6.3.5

 

Other than that, the plugin seems to work fine on 6.3.5 (http only) but on 6.4.0-rc5 (https) I still get the mixed content error after logging in.

Link to comment

With 2.0.5 on 6.4.0-rc6 via https, when I login it says "welcome root!", which is a definite improvement. Unfortunately, below that is a red banner that says "Unable to connect to server" and there are no users or apps displayed.

 

There are no mixed content errors, which is good, but I'm not sure how to help troubleshoot past this.

Link to comment

Thanks ljm42 ! Yes, progress at last !

 

There no message other than the Unable to connect to server ?

 

You're starting emhttp with -rp 80, 443 ?

 

Can you please try this:

- Stop the plugin in the settings page

- in a terminal, run 

$ cd /usr/local/emhttp/plugins/controlr
$ ./controlr

Can you post the output ?

 

Link to comment

no, there's nothing else in the red banner other than "unable to connect to server"

 

this is from my go script:

/usr/local/sbin/emhttp -rp 80,443 &

 

Here's the output of controlr while trying to login:

I: 2017/06/24 14:42:11 app.go:57: controlr v2.0.5-201.f78ee85 starting ...
I: 2017/06/24 14:42:11 app.go:65: No config file specified. Using app defaults ...
I: 2017/06/24 14:42:11 app.go:74: Connections to emhttp via https:443 ...
I: 2017/06/24 14:42:11 unraid.go:61: starting service Unraid ...
I: 2017/06/24 14:42:11 server.go:70: Starting service Server ...
I: 2017/06/24 14:42:11 server.go:90: Serving files from /usr/local/emhttp/plugins/controlr
I: 2017/06/24 14:42:11 server.go:132: Server started listening https on :2379
I: 2017/06/24 14:42:11 proxy.go:48: Starting service Proxy ...
I: 2017/06/24 14:42:11 proxy.go:91: Proxy started listening http on :2382
I: 2017/06/24 14:42:11 proxy.go:92: Proxy started listening https on :2383
I: 2017/06/24 14:42:11 app.go:104: Press Ctrl+C to stop ...
⇛ https server started on [::]:2383
⇛ http server started on [::]:2382
⇛ https server started on [::]:2379
{"time":"2017-06-24T14:42:18.890582303-07:00","id":"","remote_ip":"192.168.10.138","host":"towervm.mydomain.com:2379","method":"GET","uri":"/version","status":200, "latency":22936,"latency_human":"22.936µs","bytes_in":0,"bytes_out":31}
{"time":"2017-06-24T14:42:27.100895073-07:00","id":"","remote_ip":"192.168.10.138","host":"towervm.mydomain.com:2379","method":"POST","uri":"/login","status":200, "latency":6719725,"latency_human":"6.719725ms","bytes_in":31,"bytes_out":175}
W: 2017/06/24 14:42:27 unraid.go:82: Unable to get dockers: Get https://127.0.0.1/Docker: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs

Aha! Looks like a certificate error while trying to access https://127.0.0.1/Docker, it should access via FQDN instead

Edited by ljm42
Link to comment

The app is trying to connect to my server via port 88 not 80 I remember changing my server to 88 a while back but it is set as standard in the "go" file

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#crontab -l | { cat; echo "30 11 * * 1,5 docker exec plexReport plexreport -n -d"; } | crontab -
##change port 80 to 88
#/usr/local/sbin/emhttp -p 88 &

#The following line is not stock; but it makes safemode work with go file additions.
#if grep -wq unraidsafemode /proc/cmdline ; then exit ; fi
#Additional go file modifications below this line.

But somehow in the controlr startup it still is trying port 88

/usr/local/emhttp/plugins/controlr# ./controlr
I: 2017/06/26 23:54:15 app.go:57: controlr v2.0.5-201.f78ee85 starting ...
I: 2017/06/26 23:54:15 app.go:65: No config file specified. Using app defaults ...
I: 2017/06/26 23:54:15 app.go:74: Connections to emhttp via http:88 ...
I: 2017/06/26 23:54:15 unraid.go:61: starting service Unraid ...
I: 2017/06/26 23:54:15 server.go:70: Starting service Server ...
I: 2017/06/26 23:54:15 server.go:90: Serving files from /usr/local/emhttp/plugins/controlr
I: 2017/06/26 23:54:15 server.go:136: Server started listening http on :2378
I: 2017/06/26 23:54:15 proxy.go:48: Starting service Proxy ...
I: 2017/06/26 23:54:15 proxy.go:91: Proxy started listening http on :2382
I: 2017/06/26 23:54:15 proxy.go:92: Proxy started listening https on :2383
I: 2017/06/26 23:54:15 app.go:104: Press Ctrl+C to stop ...

How can I change this? Where is the app picking up the emhttp address?

Thanks,

Jeff

Link to comment
6 hours ago, jazzyjeff said:

How can I change this? Where is the app picking up the emhttp address?

 

It's reading the address from the go file itself.

 

But since you have 2 emhttp commands, it's picking the last one (even if it's commented out) O.o :D

 

Short term solution would be to remove the commented emhttp line, or change the emhttp text to anything other than that.

 

Thanks for the report, I'll fix the plugin to make it work under your scenario.

Link to comment
2 hours ago, dalben said:

Nice app.  I was wondering if there was anyway to let the AppStore know that I already bought the Android version

 

Thanks for the comment !

 

I wonder that myself, there should be like a transfer mechanism between app stores.

 

Not sure if they'll get to it O.o

Link to comment

2017-06-27 - 2.1.0

 

This release should become stable now, supporting unRAID 6.4.x

 

The following changes were made:
- Fix issue with multiple emhttp invocations
- Fix issue with self signed certs
- Other improvements and bug fixes
 

With regards to the multiple emhttp lines in the go file, it will ignore commented lines now, but if there are 2 valid lines ( :o ), it will pick up the last one. Not sure how unRAID itself would manage that.

 

Let me know how this version works for you.

Link to comment
10 hours ago, jbrodriguez said:

This release should become stable now, supporting unRAID 6.4.x

 

Looks like it is fully working on my 6.4 VM with real certs.  Nice!

 

My only gripe is that it has its own directory for certs. I'd still prefer it if it just used unRAID's certs rather than generating its own that I have to replace. I tried symlinking them, but unfortunately the flash drive (FAT32) doesn't support that.

 

Even so, congrats on integrating the plugin with SSL and 6.4

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.