Webmin & apcupsd for remote server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Webmin & apcupsd for remote server

zkab
I have installed apcupsd on a Ubuntu server (no GUI) - the server has static IP 192.168.0.32
Also Webmin was installed on the server and interfaced with apcupsd according to https://help.ubuntu.com/community/apcupsd
When I enter in my workstation's browser https://192.168.0.32:10000 and go to 'Webmin/Others/APC UPS Daemon' I get:

Local Host Not available: upsfetch: tcp_open failed for 127.0.0.1 port 3551

where it should be something like this:

Local Host Smart-UPS 1500 ONLINE
100.0 % 231.7 VAC 17.5 % 32.9° C 62.0 min. All data

When I access the server's apcupsd from my workstation via command line I get following:

sudo apcaccess status 192.168.0.32:3551

APC      : 001,043,1063
DATE     : 2016-09-27 19:16:58 +0200  
HOSTNAME : farbaute
VERSION  : 3.14.10 (13 September 2011) debian
UPSNAME  : FARBAUTE
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-09-27 19:15:56 +0200  
MODEL    : Smart-UPS 1500
STATUS   : ONLINE
LINEV    : 240.3 Volts
LOADPCT  :  16.1 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  79.0 Minutes
MBATTCHG : 5 Percentsudo apcaccess status 192.168.0.32:3551
APC      : 001,043,1063
DATE     : 2016-09-27 19:16:58 +0200  
HOSTNAME : farbaute
VERSION  : 3.14.10 (13 September 2011) debian
UPSNAME  : FARBAUTE
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-09-27 19:15:56 +0200  
MODEL    : Smart-UPS 1500
STATUS   : ONLINE
LINEV    : 240.3 Volts
LOADPCT  :  16.1 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  79.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 240.3 Volts
SENSE    : High
DWAKE    : -01 Seconds
DSHUTD   : 090 Seconds
LOTRANS  : 208.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 000.0 Percent
ITEMP    : 24.9 C Internal
ALARMDEL : 30 seconds
BATTV    : 27.4 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 14 days
STATFLAG : 0x07000008 Status Flag
MANDATE  : 2013-01-28
SERIALNO : AS1305221101
BATTDATE : 2013-01-28
NOMOUTV  : 230 Volts
NOMBATTV :  24.0 Volts
FIRMWARE : UPS 08.3 USB_FW:LCC
END APC  : 2016-09-27 19:17:53 +0200  

MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 240.3 Volts
SENSE    : High
DWAKE    : -01 Seconds
DSHUTD   : 090 Seconds
LOTRANS  : 208.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 000.0 Percent
ITEMP    : 24.9 C Internal
ALARMDEL : 30 seconds
BATTV    : 27.4 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 14 days
STATFLAG : 0x07000008 Status Flag
MANDATE  : 2013-01-28
SERIALNO : AS1305221101
BATTDATE : 2013-01-28
NOMOUTV  : 230 Volts
NOMBATTV :  24.0 Volts
FIRMWARE : UPS 08.3 USB_FW:LCC
END APC  : 2016-09-27 19:17:53 +0200  

So apparently my workstation can talk to the server 192.168.0.32 apcupsd ... but Webmin fails.
The rest of Webmin information for server 192.168.0.32 is correct - only apcupsd shows wrong info.
Where have I gone wrong ?
Reply | Threaded
Open this post in threaded view
|

Re: Webmin & apcupsd for remote server

Trevor Roydhouse
zkab wrote on 09/28/16 15:38:

> I have installed apcupsd on a Ubuntu server (no GUI) - the server has static
> IP 192.168.0.32
> Also Webmin was installed on the server and interfaced with apcupsd
> according to https://help.ubuntu.com/community/apcupsd
> When I enter in my workstation's browser https://192.168.0.32:10000 and go
> to 'Webmin/Others/APC UPS Daemon' I get:
>
> Local Host Not available: upsfetch: tcp_open failed for 127.0.0.1 port 3551
>
> where it should be something like this:
>
> Local Host Smart-UPS 1500 ONLINE
> 100.0 % 231.7 VAC 17.5 % 32.9° C 62.0 min. All data
>
> When I access the server's apcupsd from my workstation via command line I
> get following:
>
> sudo apcaccess status 192.168.0.32:3551
>
> APC      : 001,043,1063
> DATE     : 2016-09-27 19:16:58 +0200
[etc]
> So apparently my workstation can talk to the server 192.168.0.32 apcupsd ...
> but Webmin fails.
> The rest of Webmin information for server 192.168.0.32 is correct - only
> apcupsd shows wrong info.
> Where have I gone wrong ?

I think you need to consult a Webmin forum as apcupsd is obviously
working and correct ;-)



------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|

Re: Webmin & apcupsd for remote server

Ted Mittelstaedt-5
All the Webmin module does is run the apcupsd cgi and display it in a
box.   It's not much of a module.

Let's apply a logical approach to the troubleshooting.  Forget apcaccess
for a moment.

 From a remote system you can do:

telnet  192.168.0.32  3551

and you will get a connection.    Now, from the apcupsd system itself
(192.168.0.32) as root you should be able to do a:

telnet 192.168.0.32  3551

and get a connection.   If this works then from the apcupsd system
itself (192.168.0.32) as root you should then be able to do a:

telnet 127.0.0.1   3551

and get a connection.  (I recognize you cannot do anything from
telnet)

All those should work - if some don't then your local firewall on
the apcupsd system might have been tampered with.

Now, if all of that works and the webmin is still broken then
it is a permissions thing - the webmin executable itself is not
being allowed or permitted to access 127.0.0.1:3551 - the most
obvious culprit is mucking about with SELinux....

Ted

On 9/28/2016 6:10 AM, Trevor Roydhouse wrote:

> zkab wrote on 09/28/16 15:38:
>> I have installed apcupsd on a Ubuntu server (no GUI) - the server has static
>> IP 192.168.0.32
>> Also Webmin was installed on the server and interfaced with apcupsd
>> according to https://help.ubuntu.com/community/apcupsd
>> When I enter in my workstation's browser https://192.168.0.32:10000 and go
>> to 'Webmin/Others/APC UPS Daemon' I get:
>>
>> Local Host Not available: upsfetch: tcp_open failed for 127.0.0.1 port 3551
>>
>> where it should be something like this:
>>
>> Local Host Smart-UPS 1500 ONLINE
>> 100.0 % 231.7 VAC 17.5 % 32.9° C 62.0 min. All data
>>
>> When I access the server's apcupsd from my workstation via command line I
>> get following:
>>
>> sudo apcaccess status 192.168.0.32:3551
>>
>> APC      : 001,043,1063
>> DATE     : 2016-09-27 19:16:58 +0200
> [etc]
>> So apparently my workstation can talk to the server 192.168.0.32 apcupsd ...
>> but Webmin fails.
>> The rest of Webmin information for server 192.168.0.32 is correct - only
>> apcupsd shows wrong info.
>> Where have I gone wrong ?
>
> I think you need to consult a Webmin forum as apcupsd is obviously
> working and correct ;-)
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>


------------------------------------------------------------------------------
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users