Author Topic: Intermud-3 router old status  (Read 36552 times)

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Intermud-3 router old status
« on: December 20, 2006, 03:11:53 PM »
Hey folks. I'm noticing some weird conflicts happening on yatmim.

Please let me know if you're having difficulty connecting.

Thanks.

-Crat
« Last Edit: July 20, 2013, 09:53:12 AM by cratylus »

Offline Tricky

  • BFF
  • ***
  • Posts: 189
  • I like what I code and I code what I like!
    • View Profile
Re: Intermud-3 router status
« Reply #1 on: December 21, 2006, 01:55:29 PM »
Was having trouble when my client went beserk... Just deleted the client data file and it connected first time.

Tricky

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #2 on: December 23, 2006, 03:43:04 PM »
There is now a router status page on LPMuds.net, at this url:

http://lpmuds.net/intermud.html

It's a one-click spot for outage warnings and connection info.

-Crat

Offline Tricky

  • BFF
  • ***
  • Posts: 189
  • I like what I code and I code what I like!
    • View Profile
Re: Intermud-3 router status
« Reply #3 on: December 28, 2006, 03:14:14 PM »
I'm getting that bad-mojo - FD collision error again.

It connects, gets some mudlists and processes them and then suddenly the connection is dropped, dunno by whom. My client re-connects after 30 seconds sends the startup and receives the bad-mojo error.

I've deleted the I3 client cache file so it can't be that.

Tricky

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #4 on: December 29, 2006, 11:18:00 PM »
I have to apologize a bit for the unhelpfulness of that error message.

There wasn't an error type that clearly indicated "i have no idea why this is failing",
so I went with the first thing that occurred to me.

My current opinion is that this is a symptom of a problem with the driver and the
lib disagreeing on the socket's file descriptor. What is happening is a
conflict between two muds trying to use the same FD. Because my investigation
strongly suggests the lib has no reason to get it wrong, I'm inclined to think there
is an error somewhere between the lib and driver.

This theory is supported by the fact that the fd's in contention usually
are bracketed by used ports, so that being off by one would cause this kind
of error. The fact that resetting the router clears the problem is also
evidence that the issue is local to the router, and not a connection problem.

I'm looking into it. I'll take some time. If anyone who is up to speed on
MudOS sockets reads this and wants to pitch in, please feel free.

-Crat

Offline Tricky

  • BFF
  • ***
  • Posts: 189
  • I like what I code and I code what I like!
    • View Profile
Re: Intermud-3 router status
« Reply #5 on: December 30, 2006, 11:01:03 AM »
I've changed the behaviour of my client to bind the socket to a system selected socket. Before I was relying on the system to do it automatically as it should...
Quote
From MudOS LPC Sockets Tutorial

Clients

So far we have discussed a connection from the server's perspective. Now let's back up and walk through the client. Just like the server a client must call socket_create() to create a socket. Since a client does not intend that another client connect to it there is no need to bind the port to socket. Does this mean that it cannot do so? No. It is possible for either a client or server to bind to a port.

But why would a client wish to do so? Well the truth of the matter is this, every socket must be bound before a connection can be established. Every one. However, since clients don't really care what port they are bound to, a special bind is used. It was alluded to above, we're just catching up to it now. If a client calls socket_bind() with a second argument of 0, this indicates that the caller doesn't care what port is selected, just pick any one that is available. And this makes it easy for a client. If the caller did bind to a specific port, what happens if another client is already bound to it? The bind fails. So why not let the system do the work of choosing the port?

Now there is one more trick up our sleeve, however. The operating system is pretty smart. It knows whether a sosket is bound or not. It knows when you do a connect (It knows when you've been bad or good). So, seeing how common it would be for a client to wish to connect to a server the designers of the 4.2/4.3BSD networking system put in a neat feature. If you connect on a socket, and the socket is not yet bound, the system will do a socket_bind(s, 0) for you automatically! In fact if you read BSD networking applications you will notice that almost no sockets that are used to initiate connect requests on ever bother doing the bind call. Laziness is bliss.

Before I bound to a socket, netstat (in the mud) reported *.* for the local address. Now I bind to a socket it reports *.<portnum> (where portnum is a port that is available for use).

Tricky

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #6 on: December 30, 2006, 11:05:36 AM »
Ah, again I've been imprecise. Rather than "bracketed by used ports" I should have written
"bracketed by used fd's". The port binding isn't the problem, so much as the fd assignment
on socket creation.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #7 on: January 06, 2007, 02:02:33 PM »
I spent some time last night poking at the router to see if I could gain
new information as to why a small number of folks still has connection problems.

The "incorrect fd" theory I had turns out to be really a symptom of a
different problem. I can say this quite confidently because I've tested
numerous scenarios where the "wrong fd" bug would hose things up,
and it didn't. Instead, the problem *looks* like it's a wrong fd bug, under specific
conditions.

The conditions appear to be a flaky network connection.

If your connection to intermud flakes out in mid-transmission, the router
may detect this drop and remove you from the connected list. It
does so by sending a socket_close() to the router.

Under some circumstances, it appears that the socket is in a
"CLOSING" state for a brief time and not actually closed. If your mud tries
to reconnect right at that moment, it will try to reclaim that closing
socket. Sadness occurs. This is most often seen as an error from
the router claiming "bad mojo" or "your mud is already connected".
This triggers unfortunate events in the router that make it
even more difficult to connect later on.

Last night's maintenance let me find correct some stuff in the router that
I believe will dramatically reduce the incidence of these disharmonies.

However, if you still have problems, please let me know. It is important for
you to provide me with the errors you are receiving. If you are on
a Dead Souls mud, you can monitor packets by typing:

arch
go down

To go to the network monitoring room.

However, it may be that I cannot eliminate all such problems, because
the source is network communitcations I do not understand. To be
precise, these errors occur under one or more of the following conditions:

1) Your network connection occasionally sucks.
2) Your network connection is wireless.

Both of which are beyond my expertise.

I am not raising a white flag here. Simply commenting that fixing the
router to handle these situations may be beyond the scope of my expertise.

-Crat

 

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #8 on: January 07, 2007, 10:38:33 AM »
Did further maintenance last night.

In this case, it was for an issue separate from what we've been talking about so far.

It appears that the old *gjs router was very forgiving of certain errors in
startup packets. If your header info was wrong, it seems that it would tolerate it
as long as the rest of the packet elements were ok.

By default, *yatmim did not exercise this forgiveness. If you said you're an I3
protocol 2 startup packet and you have 20 elements, you get rejected, even if
the 20 elements are correctly formatted for a protocol 3 startup.

This is now less strict. If you claim to be protocol 2 but provide protocol 3 startup
data, you will no longer be denied access. Your protocol will get automatically
kicked up a notch to 3, and you should be able to access.

If you've been trying to connect to *yatmim and never were able, this is a
good time to retry.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #9 on: January 08, 2007, 06:31:45 AM »
Dead-souls.net and the router are both on a machine on a university network. Sometimes,
during inclement weather, this network goes down.

This is one of those times.

Hopefully things will get straightened out later this morning. If not, I'll
start implementing a workaround.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #10 on: January 08, 2007, 08:50:01 AM »
There is a new page now available with connection information for the alternate router.

The ETA for the university to fix things for yatmim is currently unknown.

If you need your intermud fix without delay, please read:

http://lpmuds.net/alternate_router.html

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #11 on: January 09, 2007, 12:40:07 AM »
I visited the box to see what the problem was.

Apparently it took a power hit, hard, and chunks of it are fried.
The chunks were obviously marginal to begin with, but they are fried all the same.

So much for the university's ups outlets.

I'm rebuilding it. Should be done in a day or two.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #12 on: January 09, 2007, 11:36:18 AM »
The rebuild is complete, and yatmim is back online. As usual, please let me know
of any gliatches you run into.

The router page has been revamped a bit, to consolidate information spread out
over a few pages, which I think was confusing.

Please use http://lpmuds.net/intermud.html to stay updated on current status,
planned outages, the faqs and the rules.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #13 on: February 07, 2007, 06:55:45 PM »
A couple of muds chose today to go bananas and spam the router with hyperaggressive
reconnects at the same time. This has hosed things up. If you are having trouble connecting to
the router, it's because I'm playing whack-a-mole with these guys as they change ip's
and dos the router.

I hate to firewall block networks, but it might wind up happening.

In any case, if your intermud connection doesn't get better by tomorrow, send me a PM here
and we'll work something out.

-Crat

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Intermud-3 router status
« Reply #14 on: March 13, 2007, 05:22:28 PM »
I've lost connectivity to the *yatmim box. I'll be investigating this evening.

In the meantime, you can use the *i4 router with the command:

switchrouter i4 204.209.44.3 8080

-Crat