Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server socket: Permission denied errors #80

Closed
573 opened this issue Jul 9, 2024 · 6 comments
Closed

server socket: Permission denied errors #80

573 opened this issue Jul 9, 2024 · 6 comments

Comments

@573
Copy link

573 commented Jul 9, 2024

I got the "refused to connect" window when coming back to the computer after the weekend.

So I manually started M-x atomic-chrome-start-http in emacs to find the reason. I get a loop of:

error in process filter: websocket-server: Cannot bind server socket: Permission denied
error in process filter: Cannot bind server socket: Permission denied

I have 20230304.112 of atomic-text and 24.7.6 of GhostText installed in Emacs GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24 on Windows-Version: 10.0.19045.4529.

netstat -an | Select-String -Pattern ':4001 ' gives:

TCP 127.0.0.1:4001 0.0.0.0:0 ABHÖREN
TCP 127.0.0.1:4001 127.0.0.1:61279 HERGESTELLT
TCP 127.0.0.1:61279 127.0.0.1:4001 HERGESTELLT`

chrome-error___chromewebdata_(iPhone 12 Pro) (1)

@573
Copy link
Author

573 commented Jul 9, 2024

related #25

@573
Copy link
Author

573 commented Jul 9, 2024

Did M-: (atomic-chrome-start-websocket-server 62155) in emacs and tried calling http://localhost:62155/ in chrome, got this in emacs Messages:

>#<process websocket server on port 62155>
nil
Websocket client connection: Upgrade: websocket not found
Invalid client headers found in: GET / HTTP/1.1

Host: localhost:62155

Connection: keep-alive

sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"

sec-ch-ua-mobile: ?0

sec-ch-ua-platform: "Windows"

Upgrade-Insecure-Requests: 1

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7

Sec-Fetch-Site: none

Sec-Fetch-Mode: navigate

Sec-Fetch-User: ?1

Sec-Fetch-Dest: document

Accept-Language: en-US,en;q=0.9

Accept-Encoding: gzip, deflate, zstd

@573
Copy link
Author

573 commented Jul 9, 2024

GhostText on Firefox, same behaviour.

@573
Copy link
Author

573 commented Jul 9, 2024

After:

  • resetting all .emacs configuation to bare minimum, only line (require 'atomic-chrome) and line (atomic-chrome-start-server)
  • resetting GhostText's Options, Server Port back to default 4001
  • not logging into enterprise VPN
  • having runemacs.exe --fg-daemon running on autostart
  • having at least one emacs window open, emacsclientw.exe -n -t -a ""

I was able to write this comment in Firefox.

netstat -an | Select-String -Pattern ':4001 '

TCP 127.0.0.1:4001 0.0.0.0:0 ABHÖREN
TCP 127.0.0.1:4001 127.0.0.1:49296 WARTEND
TCP 127.0.0.1:4001 127.0.0.1:49302 WARTEND

@573
Copy link
Author

573 commented Jul 9, 2024

same with Chrome accordingly.

netstat -an | Select-String -Pattern ':4001 '

TCP 127.0.0.1:4001 0.0.0.0:0 ABHÖREN
TCP 127.0.0.1:4001 127.0.0.1:49345 WARTEND
TCP 127.0.0.1:4001 127.0.0.1:49347 HERGESTELLT
TCP 127.0.0.1:49347 127.0.0.1:4001 HERGESTELLT

@573 573 closed this as completed Jul 9, 2024
@573
Copy link
Author

573 commented Jul 10, 2024

Cause might have been this:

  • I placed a link to emacs (run as daemon) in shell:startup folder (Windows)
  • when locking my screen temporarily and logging in again, the former placement might have caused two daemon instances in parallel all of a sudden, at least I observed so in the task manager app
  • for surprise-free usage I should take care of only having one emacs daemon running at all times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant