Skip to content

fish_config can't load localhost:8000 #673

Closed

Description

@haarts

I've just install fished from source (afe293c) and compiled without an issue. I'm also able to run the shell. However I'm unable to get fish_config to work. Running is starts w3m, the connection is accepted but then nothing happens. Pressing CTRL-C exits and shows:

Web config started at 'http://localhost:8000/'. Hit enter to stop.
w3m: Can't load http://localhost:8000/.

I'm on a Xen VPS Ubuntu 12.04, I have Apache installed, killing it didn't work. Curl shows (after starting fish_config):

$ curl -v http://localhost:8000
* About to connect() to localhost port 8000 (#0)
*   Trying 127.0.0.1... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8000
> Accept: */*
> 
* Recv failure: Connection reset by peer
* Closing connection #0
curl: (56) Recv failure: Connection reset by peer

I have no idea how to troubleshoot this further, perhaps someone can push me in the right direction?

Activity

  1. sugar700 commented on Apr 18, 2013

    @sugar700
    Contributor

    Could be firewall being so strict, that it even blocks access to machine itself using localhost.

  2. NielsH commented on Apr 21, 2013

    @NielsH

    I'm having the same issue, firewall logs don't show activity on port 8000, This is the make install output: http://pastebin.com/QhAsdNdK

    I do see it listening with netstat:

    tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      0          1241639     18956/python    

    tcpdump doesn't show any traffic on port 8000.

    This is a Debian Squeeze install:
    3.8.4-linode50 #1 SMP Mon Mar 25 15:50:29 EDT 2013 i686 GNU/Linux

    If you need additional information, please let me know. Thanks!

  3. ridiculousfish commented on Apr 22, 2013

    @ridiculousfish
    Member

    I installed Debian Squeeze i386 and could not reproduce the problem. The default web browser fell over on fish_config but Firefox did fine.

  4. haarts commented on Apr 22, 2013

    @haarts
    ContributorAuthor

    Super weird, I do not have any firewall running. I have a VPS (Xen) running Ubuntu 12.04 64bit. Is there a way to run the config program without firing up w3m immediately after?

  5. ridiculousfish commented on Apr 27, 2013

    @ridiculousfish
    Member

    fish_config is just a function wrapper that invokes a Python script at $__fish_datadir/tools/web_config/webconfig.py . You can poke around in there to see what it's doing.

  6. haarts commented on May 17, 2013

    @haarts
    ContributorAuthor

    I did some poking and found that the line https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/webconfig.py#L618 is the culprit.
    When I change the empty string to the name of my server the server starts and I'm able to connect with a browser (the w3m still tries to connect to localhost but that's expected). Like so:

    httpd = SocketServer.TCPServer(("myservername.net", PORT), Handler)
    

    Changing it to localhost doesn't work BTW.

    Note: I'm running Ubuntu server edition 13.04. I'm suspecting that has something to do with it.

    Many thanks for this amazing shell BTW!

  7. Philipp15b commented on Sep 8, 2013

    @Philipp15b
    Contributor

    For me the error happened after installing lynx on debian. It seems like it was waiting for lynx to exit, but lynx was waiting for the server to send the file. Commenting out this line:

    webbrowser.open(url)

    fixed my problem (although that did not start lynx anymore, of course).

  8. geoff-nixon commented on Feb 27, 2014

    @geoff-nixon
    Contributor

    @xfix I think there needs to be something there, you're right, but note that the original post:

    curl -v http://localhost:8000
    * About to connect() to localhost port 8000 (#0)
    *   Trying 127.0.0.1... connected
    

    So its resolving localhost to 127.0.0.1 fine. Can we do localhost instead, so it works with IPv6 too?

  9. modified the milestones: , fish-future on Sep 27, 2014
  10. locked as resolved and limited conversation to collaborators on Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions