The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   Running SWAT in 10.2 (http://hintsforums.macworld.com/showthread.php?t=5095)

jdera 01-22-2004 10:46 AM

Okay... first off, reading back through, it looks like you have swat enabled in both inetd and xinetd. My first suggestion is to completely disable inetd by commenting out its entry in /System/Library/StartupItems/IPServices/IPServices, then restarting your machine. This will ensure that only xinetd is vying for the port in question.

Now, two things. 1) Make sure you have the DevTools installed. For some reason, I've seen all kinds of issues with swat if they are not installed. Might have something to do with a supporting library.

2) To make swat work on Panther, I had to add an entry to /etc/services that basically contains:

Code:

swat  901/tcp
Not sure if you'll have to do the same, but what I recommend is getting inetd out of the picture, then using the Console app to view /var/log/system.log as you try to connect. You should see something like:

Jan 22 10:42:54 localhost xinetd[316]: START: swat pid=4741 from=127.0.0.1

One last thing... do you have the root account enabled? If not, enable it. swat tries to authenticate as root. If the root account is disabled, that might cause issues.

stetner 01-22-2004 04:50 PM

Quote:

Originally posted by denn88
Nope Connection refused:
Code:

[Mm4:~] mm4% telnet localhost 901
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
[Mm4:~] mm4% ps -ax | grep swat
  713 std  R+    0:00.00 grep swat
[Mm4:~] mm4%

As you can see, it is running... I presume? I followed some hints to get SWAT to run but al of them let to this, no connection to SWAT in my browser.
Actually, no it is not (not that I know what swat is :) ) but you are seeing your grep command in the ps output, not your swat running. And if telnet is not connecting to that port, Safari won't either. I usually use
Code:

$ ps -auxww | grep [x]inetd
root      445  0.0  0.0    27484    264  ??  Ss  Sat11AM  0:02.31 xinetd -inetd_compat -pidfile /var/run/xinetd.pid
$ ps -auxww | grep [x]foobar
$

to be safe. using the 'ww' extends the output so you see as much info as possible no matter what size the terminal is, and the '[x]' pattern will make it miss the grep command itself.


You can see what ports are being listened on with:
Code:

$ netstat -na | grep LISTEN
tcp46      0      0  *.22                  *.*                    LISTEN
tcp4      0      0  *.995                  *.*                    LISTEN
tcp4      0      0  *.110                  *.*                    LISTEN
tcp4      0      0  *.993                  *.*                    LISTEN
tcp4      0      0  *.143                  *.*                    LISTEN
...
...


gatorparrots 01-23-2004 02:05 AM

Quote:

Originally posted by stetner
You can see what ports are being listened on with:
Code:

$ netstat -na | grep LISTEN
tcp46      0      0  *.22                  *.*                    LISTEN
tcp4      0      0  *.995                  *.*                    LISTEN
tcp4      0      0  *.110                  *.*                    LISTEN
tcp4      0      0  *.993                  *.*                    LISTEN
tcp4      0      0  *.143                  *.*                    LISTEN


If you have root access, lsof is also a good utility in cases like this:
sudo lsof -i :901

denn88 01-23-2004 03:09 AM

SWAT is running and I'm accessing it in Safari. Like 'jdera' wrote:

Comment the 'inetd' line in this file and reboot:
'/System/Library/StartupItems/IPServices/IPServices'

Though I already tried some of the other suggestions before this one, putting 'swat 901/tcp' in the '/etc/services' file etc. This was the final piece of the SWAT puzzle...

Even learned some new Unix things along the way, thanx for the help guys!!


All times are GMT -5. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.