PDA

View Full Version : AsyncHTTP errors



smc2911
2006-07-12, 05:47
A quick query (not vital: I have a workaround). I stick my Podcast Browser favourites in opml files on my own (apache) webserver. Although at the moment the slimserver and the webserver are the same machine, I didn't want to be tied to that, so the url used the hostname rather than localhost. That used to work (I was using Ubuntu Hoary), but after a massive system failure I'm on a new machine with Dapper Drake and now I'm getting errors like this:

22:31:11.4808 ERROR: AsyncHTTP: Couldn't resolve IP address for: myhostname

Also, browsing doesn't work. myhostname (I won't embarrass myself by giving away the real name ;)) is in the hosts file. If I change the url of the opml under Plugins settings to use localhost, I don't get an error. This used to work fine, so I'm not sure what's going on.

I use deb package 6.5b1 7504

mherger
2006-07-12, 06:02
> I use deb package 6.5b1 7504

This is a rather old build - and I know this _was_ a known issues in
earlier builds which should have been fixed. Please try a something more
recent to confirm.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

smc2911
2006-07-12, 06:36
I've really been putting things off ever since the scanner split. Prior to the split 6.5b was surprisingly solid, but I've got the impression that after the split it was a lot less so. Is this still the case?

I should also point out that I was also using the 7504 version before (on the old machine) and didn't have this problem.

andyg
2006-07-12, 06:50
DNS entries in a hosts file won't be found, you'll need to add your hostname to your DNS server, and make sure SlimServer is using that DNS server. Run with --d_http_async to test.

mherger
2006-07-12, 07:00
6.5 is considered instable and experimental. And it has always been.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

smc2911
2006-07-12, 16:03
6.5 is considered instable and experimental. And it has always been.
Agreed, which is why I described 6.5b as being "surprisingly stable". I experimented with it extensively, found it to my liking, but then decided that continuing to experiment past the scanner split may not be wise (you may recall the dire warnings issued at the time on the forums).

I'm happy to give the latest release a try, as I can always revert, but before I do that, is it likely to mess up my existing MySQL setup?

The fact that AsyncHTTP only uses the DNS server to resolve host names: my dns server is the router, which doesn't know about the local machine names. Perhaps I previously had a local dns server running on the old linux box without realising it. The box itself is dead, and I can't see anything suggestive in my archived init.d directory, but I'll scour through the backups a bit more to confirm.

andyg
2006-07-12, 16:25
I would suggest using the IP address for your local machine if you aren't able to add local entries to your router's DNS server.

mherger
2006-07-12, 23:33
> I'm happy to give the latest release a try, as I can always revert, but
> before I do that, is it likely to mess up my existing MySQL setup?

It comes with its own MySQL server, running on a different port. You
should be fine.

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

smc2911
2006-07-13, 02:45
I would suggest using the IP address for your local machine if you aren't able to add local entries to your router's DNS server.
For the moment, I'll stick with localhost for the moment (since it's still the same machine). I see that works because asyncHTTP explicitly catches localhost and maps it to 127.0.0.1.

I must admit I'm surprised that the hosts file is not checked first: I thought that this was standard operating procedure for all networking apps.


It comes with its own MySQL server, running on a different port.
Hmmm. I supposed that means pointing my php queries to a different port for pulling down music stats. Do you know the port number?

mherger
2006-07-13, 02:57
> Hmmm. I supposed that means pointing my php queries to a different port
> for pulling down music stats. Do you know the port number?

From slimserver.pref:

dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
SlimString Translation Helper (http://www.herger.net/slim/)

smc2911
2006-07-13, 23:17
Thanks. I might give the latest release a whirl this weekend. Given andyg's comments I don't suppose it will resolve my hostname issue though. Mind you, I'm still a bit mystified as to why it used to work for me. Scouring through my backup files (mainly looking through etc and etc/init.d) I can't find any evidence that I was running a dns server locally and I'm pretty sure my router cannot handle serving local addresses, so I just don't understand why it used to work if asyncHTTP only makes dns calls and doesn't interrogate the hosts file (or winbind).

andyg
2006-07-14, 05:45
I've checked in some new code that will use a direct lookup if a hostname contains no periods. This should fix your problem.

herbman
2006-07-14, 09:43
This may be out of context, but why isn't the code using the system default host resolution paths? Most applications should be able to use the system paths (I know linux uses nsswitch.conf for example) so that you can fall back on whats known to work? If files don't have it, then go to dns, etc..

andyg
2006-07-14, 09:52
Because if you try to lookup invalid.domain.com using the system library, you'll block the entire SlimServer for many seconds. What we do now is:

localhost => 127.0.0.1
single-word domain => use system library for lookup, it's probably in a hosts file or LAN DNS server, so lookup should be fast.
normal domain -> async lookup using first working nameserver (discovered at SlimServer startup time).

smc2911
2006-07-16, 16:49
single-word domain => use system library for lookup, it's probably in a hosts file or LAN DNS server, so lookup should be fast.
That's interesting. My domain is a single-word domain, which explains why it used to work, but not why it's not working now. Any suggestions greatly appreciated, as usual.

Thanks,
Sean.

andyg
2006-07-16, 17:18
It should work now, have you tried a recent nightly?

smc2911
2006-07-25, 04:00
OK, it's been a while, but I have now successfully upgraded to the latest nightly and YES! the single-word hostname works now. Strangely, localhost no longer seemed to work but that doesn't worry me too much.