Check_mk: UNKNOWN – Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

I had this error pop up today:

UNKNOWN – Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

On a remote agent over SSH. Which I described here in check_mk_agent over SSH Host key verification failed

Turns out that the box in question could contact the outside world (a simple ping google.com was able to tell me that).

The problem? I had recently tighten the firewall rules on ufw

ufw allow out http
ufw allow out https
ufw allow out 53

Resolved the issue.

Thanks to TWright for the answer that pointed me in the right direction on Serverfault

LG Nortel – Phone Auto Answering Calls

Had a random issue, an LG Nortel phone was auto answering calls on speakerphone. It apparently is a ‘feature’.

On the screeen next to the phones name it had (H) instead of (T).
So it said ‘Andrew (H)’

How to fix.

  • Press. Trans/Pgm
  • Option 1 (Ring)
  • Option 2 (Answer Mode)
  • Select T(2)
  • Press Hold/Save to save it.

Thanks to this pdf: LG Quick Reference Guide 8000 Series.pdf

For pointing me in the right direction.

Set Intercom Answer Mode
This determines how your Station will ring when receiving an intercom call

  • Press TRANS/PGM button
  • Dial 1 3 and select
  • 1. for Hands free (Auto answer after a BEEP tone)
  • 2. for Tone ring
  • 3. for Privacy announce (Auto Answer but you must pick-up the handset to talk)
  • Press HOLD/SAVE button or the OK button

 

Endian DHCP stopped and failing to start on 3.0.5beta1

TL:DR Updated Endian this morning, and the DHCP service failed to start. Turns out having a 2nd DNS server set in the Web GUI doesn’t correctly write to the dhcp.conf file. Solution. Remove 2nd DNS server or manually add a comma (,) into the config file using nano.

In the Web GUI under “Status -> System Status”

The DHCP server was shown as “Stopped”.

Manually starting from the shell also failed.

‘service dhcpd start’

A quick look in the logs:

‘cat /var/log/messages’

Feb 25 10:22:51 endian dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Feb 25 10:22:51 endian dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Feb 25 10:22:51 endian dhcpd: All rights reserved.
Feb 25 10:22:51 endian dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Feb 25 10:22:51 endian dhcpd: /etc/dhcpd.conf line 21: semicolon expected.
Feb 25 10:22:51 endian dhcpd:         option domain-name-servers 192.168.0.3 192.
Feb 25 10:22:51 endian dhcpd:                                                ^
Feb 25 10:22:51 endian dhcpd: Configuration file errors encountered -- exiting
Feb 25 10:22:51 endian dhcpd:
Feb 25 10:22:51 endian dhcpd: If you did not get this software from ftp.isc.org, please
Feb 25 10:22:51 endian dhcpd: get the latest from ftp.isc.org and install that before
Feb 25 10:22:51 endian dhcpd: requesting help.
Feb 25 10:22:51 endian dhcpd:
Feb 25 10:22:51 endian dhcpd: If you did get this software from ftp.isc.org and have not
Feb 25 10:22:51 endian dhcpd: yet read the README, please read it before requesting help.
Feb 25 10:22:51 endian dhcpd: If you intend to request help from the [email protected]
Feb 25 10:22:51 endian dhcpd: mailing list, please read the section on the README about
Feb 25 10:22:51 endian dhcpd: submitting bug reports and requests for help.
Feb 25 10:22:51 endian dhcpd:
Feb 25 10:22:51 endian dhcpd: Please do not under any circumstances send requests for
Feb 25 10:22:51 endian dhcpd: help directly to the authors of this software - please
Feb 25 10:22:51 endian dhcpd: send them to the appropriate mailing list as described in
Feb 25 10:22:51 endian dhcpd: the README file.
Feb 25 10:22:51 endian dhcpd:
Feb 25 10:22:51 endian dhcpd: exiting.

 

Luckily the log points us in the right direction.

/etc/dhcpd.conf line 21: semicolon expected.
Feb 25 10:22:51 endian dhcpd:         option domain-name-servers 192.168.0.3 192.

In the Web GUI if I remove the 2nd Name server, all is well, the service starts up and the log shows requests being received.
When I add it back in, it fails to start again.

When I add the comma in using nano, I’m able to manually start the service.
Although I’m sure it will break if any changes are made to the web gui.

Update: It appears that this bug has been around for a few days, and is reported: https://jira.endian.com/browse/UTM-1388

Bridged ADSL modem over VLAN Router on a Stick

TL;DR: Bridged ASDL modem over VLAN – yes it can work!

The problem:
x86 Router (Endian) has run out of physical network cards, but more WAN ports are required, can we do something with a ‘Router on a stick’ and use a VLAN aware Switch?

We can do this in a ‘double NAT’ style configuration, but can we do it in a bridged mode configuration. It seems that we can in fact. However I’m using a L3 switch (Dell 6248) I have tired in the past to use a HP PS1810-8G Switch (J9833A) without successful (granted I didn’t spend too much time on it).

Xero API pyXero and Anaconda Python

Personal TL;DR notes on getting this to work, not a tutorial.

Download Install Anaconda
– At the time of writing it didn’t create Windows Shortcuts, fix this with openning cmd as admin

‘c:\Anaconda2\scripts\conda.exe install menuinst’

Agree to Updates

‘c:\Anaconda2\scripts\conda.exe install -f console_shortcut ipython ipython-notebook ipython-qtconsole launcher spyder’

Agree to updates.

Now there should be shortcuts in:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda2 (64-bit)

Now onto Xero

  • git clone https://github.com/freakboy3742/pyxero.git
  • Open up Anaconda Prompt (Anaconda2x64)
  • cd into folder with git of pyxero
  • use command: python setup.py install
  • pip uninstall oauthlib
  • pip install oauthlib==0.7.2

The last two commands fix the error: ImportError: No module named jwt.algorithms

Again these are personal notes, not a full blown tutorial.

 

Dell Powerconnect 5424 SNMP web management issue

Just ran into a strange issue when configuring a SNMP community on the web interface. Alas it was broken.

2016-01-19 10_36_26-ATKOSD22016-01-19 10_36_26-ATKOSD2

And clicking on “add’ results in an error

‘Access Error: Request Entity Too Large’2016-01-19 10_36_47-ATKOSD2
An easy fix is to stop being lazy and CLI into the switch and fix it.

The command:

snmp-server community public su 192.168.0.5

2016-01-19 10_39_23-Greenshot image editor

And look, it works for us. Now you can webconfig until your heart is content.

2016-01-19 10_38_07-ATKOSD2

Don’t forget to write your switch config changes.

Reference: Dell 5424 CLI Manual, Page 328 ‘snmp-server community’