Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
hello What would be the cause of getting the error " The connection was refused when attempting to connect to 127.0.0.1:901 " When I try to go to http://localhost:901 I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2002
    Posts
    5

    Samba problem with localhost:901


    hello

    What would be the cause of getting the error " The connection was refused when attempting to connect to 127.0.0.1:901 " When I try to go to http://localhost:901 I get a failed search on the internet for LOCALHOST. I am trying to connect from the box that has Samba installed.

    I am using the xinetd.d
    I have the file /etc/xinetd.d./swat, it's not disabeld, and I am running it as root. I have also restarted the daemon and rebooted. No luck. Samba is also installed on this same box. I am not trying to access it remotely. .

  2. #2
    Linux User
    Join Date
    Jul 2002
    Location
    Daytona Beach, FL
    Posts
    487
    localhost (which is the name for 127.0.0.1) is the local machine, or the machien you are working on - it always means the current machine, so going to http://localhost will take you to yourself, or your own web browser (assuming it is set to listen to 127.0.0.1)


    What are you trying to do then, once you find the localhost?
    majorwoo

    Quiet brain, or I\'ll stab you with a Q-tip.

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    port 901 is swat, that is what he is trying to do. Localhost might not be aliased in /etc/hosts . try http://127.0.0.1:901
    I respectfully decline the invitation to join your delusion.

  4. #4
    Just Joined!
    Join Date
    Dec 2002
    Posts
    5
    wassy121 & majorwoo,

    I have tried to use http://localhost:901 and http://127.0.0.1:901. When I use http://127.0.0.1:901 I get the pop up error message that the connection is refused. When I try to use http://localhost:901 it gives me a failed internet search for "localhost".

    I also checked the etc/hosts file and there is an entry for 127.0.0.1 localhost.

  5. #5
    Linux User
    Join Date
    Jul 2002
    Location
    Daytona Beach, FL
    Posts
    487
    are you running any sort of a firewall on your machine that is blocking port 901? (its unusual for a firewall to block ANY access to 127.0.0.1 but some do)
    majorwoo

    Quiet brain, or I\'ll stab you with a Q-tip.

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Check if port 901 is really listening with "netstat -antp"

  7. #7
    Just Joined!
    Join Date
    Dec 2002
    Posts
    5
    Here is some info for you guys. Thanks for all the help. Just to rule out the firewall, how would I go about shutting it down ???
    Thanks



    [root@localhost root]# netstat -antp
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN 782/rpc.statd
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 754/portmap
    tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1170/X
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 950/sshd
    tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1023/sendmail: acce
    tcp 0 0 127.0.0.1:1146 0.0.0.0:* LISTEN 3186/xinetd
    [root@localhost root]#
    ******
    [root@localhost etc]# cat hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    *****

  8. #8
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    make sure xinetd did not disable the service when it started up for some reason or another. This information would be in /var/logs/messages or /var/adm/messages (or somewhere similar). It looks like swat is not running as a daemon by your netstat output, but that is the way it should be, it should not run unless it is asked for (then inetd will start it). So all in all, check your syslog, and post your /etc/xinetd.d/swat file if you still can't find it. It might be trying to run as a user that doesn't exist (took me a couple days to find that).
    I respectfully decline the invitation to join your delusion.

  9. #9
    Just Joined!
    Join Date
    Dec 2002
    Posts
    5
    wassy121
    I posted my swat file for you. I also checked the var/messages fiile and posted them below. Let me know what you think. Thanks for all the help.

    Rob


    [root@localhost xinetd.d]# cat swat
    # default: off
    # description: SWAT is the Samba Web Admin Tool. Use swat \
    # to configure your Samba server. To use SWAT, \
    # connect to port 901 with your favorite web browser.
    service swat
    {
    disable = no
    port = 901
    socket_type = stream
    wait = no
    only_from = 127.0.0.1
    user = root
    server = /usr/sbin/swat
    log_on_failure += USERID
    }
    [root@localhost xinetd.d]#

    *****

    Dec 22 13:24:54 localhost smb: smbd startup succeeded
    Dec 22 13:24:54 localhost smb: nmbd startup succeeded
    Dec 22 13:30:34 localhost xinetd[3186]: Exiting...
    Dec 22 13:30:35 localhost xinetd: xinetd shutdown succeeded
    Dec 22 13:30:36 localhost xinetd[12812]: Server /usr/sbin/swat is not executable [line=13]
    Dec 22 13:30:36 localhost xinetd[12812]: chargen disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: chargen disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: daytime disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: daytime disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: echo disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: echo disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: finger disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: ntalk disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: exec disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: login disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: shell disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: rsync disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: talk disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: telnet disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: time disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: time disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: ftp disabled, removing
    Dec 22 13:30:36 localhost xinetd[12812]: Service swat missing attribute server
    Dec 22 13:30:37 localhost xinetd[12812]: xinetd Version 2.3.3 started with libwrap options compiled in.
    Dec 22 13:30:37 localhost xinetd[12812]: Started working: 1 available service
    Dec 22 13:30:39 localhost xinetd: xinetd startup succeeded
    Dec 22 13:38:49 localhost xinetd[12856]: warning: can't get client address: Transport endpoint is not connected
    Dec 22 13:38:49 localhost fam[12856]: fd 4 message length 1195725856 bytes exceeds max of 4135.
    Dec 22 13:39:20 localhost last message repeated 3379 times
    Dec 22 13:40:10 localhost last message repeated 5789 times
    Dec 22 13:49:50 localhost xinetd[12871]: warning: can't get client address: Transport endpoint is not connected
    Dec 22 13:49:50 localhost fam[12871]: fd 4 message length 1195725856 bytes exceeds max of 4135.
    Dec 22 13:50:21 localhost last message repeated 3287 times
    Dec 22 13:51:17 localhost last message repeated 6048 times
    Dec 23 04:02:23 localhost syslogd 1.4.1: restart.
    [root@localhost log]#

  10. #10
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, apparently, your swat file is missing the "server" attribute. The server attribute specifies what file to run when the service is being connected to by another end. Since I don't use swat, I don't know where it is, but log in as root and run "type -p swat" and you're sure to find out. Then, just add "server = <path>", where <path> of course is the path to the swat file as revealed by 'type -p swat".

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •