LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-31-2016, 07:32 AM   #1
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
Emby bad request for ip6 address with nagios


I have nagios 4.0.8 (and nagios-plugins at 2.0.3) running which checks emby that is running on the same computer (CentOS).
I use the following command to check the emby server:
Code:
/lib64/nagios/plugins/check_http -I 127.0.0.1 -p 8096
When I run this with the verbose flag -v I get the following result:

Code:
GET / HTTP/1.0
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Accept: */*


http://127.0.0.1:8096/ is 235 characters
STATUS: HTTP/1.1 400 Bad Request
**** HEADER ****
Content-Type: text/html; charset=utf-8
Server: Mono-HTTPAPI/1.0
Date: Sat, 31 Dec 2016 13:10:50 GMT
Content-Length: 65
Connection: close
**** CONTENT ****
<h1>Bad Request (Invalid url: http://::ffff:127.0.0.1:8096/)</h1>
HTTP WARNING: HTTP/1.1 400 Bad Request - 235 bytes in 0.001 second response time |time=0.001292s;;;0.000000 size=235B;;;0
I get exactly the same result if I add the -4 flag for ip4 addresses.
Curl results are similar.

Emby works fine if I direct my browser to 127.0.0.1:8096.

The problem seems to be that emby does not handle the url http://::ffff:127.0.0.1:8096/ well.

Is it likely that something is wrong with emby?
Or is something wrong with ip6 configuration?

I would be very interested in any suggestions to tackle this problem
 
Old 12-31-2016, 09:57 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Apache Virtualhost and/or /etc/hosts would be my first guess.
I'm gonna say what I think I know and we'll see.
::ffff:127.0.0.1 is 2 identifiers.
127 is obvious localhost for ipv4
but :ffff may be localhost for ipv6?


Anyone? Hope this doesn't hurt.
Yeah, that doesn't bear out. I can only say I don't know.

But someone does, stick around.

Cheers in 2017


Edit: Sat Dec 31, 2016 - 11:19:38 AM EST
My revised guess is the check_http plugin can't handle what Emby is throwing back.

Last edited by Habitual; 12-31-2016 at 10:19 AM.
 
Old 01-04-2017, 01:57 PM   #3
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
Thanks for your suggestions.
I have had a look at my nagios data.
It seems that the problem was introduced on 19 December while installing emby 3.1.0-9.1.
 
Old 01-04-2017, 02:42 PM   #4
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
How about explicitly config Emby to listen only to ipv4?
 
Old 01-06-2017, 12:26 PM   #5
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
I'd love to try to set it to ipv4.
Do you know if/where this can be changed?
 
Old 01-06-2017, 01:22 PM   #6
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
Okay, so I disabled ipv6
Code:
> sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 1
However, I still get the same response from check_http including the <h1>Bad Request (Invalid url: http://::ffff:127.0.0.1:8096/)</h1> bit.
 
Old 01-08-2017, 10:26 AM   #7
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
Thanks for all your suggestions.
I found the answer.
It seems that Emby would like to have a Host: field in the http request.
I tried to add this using the -k and --header flags of check_http, but this was not successfully parsed.
Therefore I specified the IP as a host (-H):
Code:
/lib64/nagios/plugins/check_http -H 127.0.0.1 -p 8096
This worked and I reenabled ipv6.
 
Old 01-08-2017, 04:09 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Good job and well done!
 
  


Reply

Tags
ipv6, nagios



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios NSClient - ERROR: Could not complete the request check log file for more information. orvie Linux - Newbie 6 06-07-2016 01:15 PM
[SOLVED] ip6-ip6 tunnel receives traffic but not going out to the outbound interface xywang Linux - Networking 1 10-24-2011 06:01 PM
Bad Request Your browser sent a request that this server could not understand. vishnukumar Linux - Server 2 08-13-2009 12:56 AM
apache bad request qwertyjjj Linux - Server 9 08-12-2009 07:03 AM
Code: Bad EIP Value <1> unable to handle kernel paging request at virtual address Sabeer Linux - Software 6 02-13-2008 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration