Getting ERROR: [Errno 98] Address already in use across npm and brew
What version of Codex is running?
0.20.0
Which model were you using?
n/a
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64 (Ubuntu 22.04.5)
What steps can reproduce the bug?
-
Remove previous version
npm uninstall -g @openai/codex&rm -rf ~/.codex -
Reinstall
npm install -g @openai/codex@latest -
codex loginfails with:
ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:
-
Uninstall codex & remove config
-
Install with linuxbrew
brew install codex -
codexfails with:
>_ Welcome to Codex, OpenAI's command-line coding agent
> Sign in with ChatGPT to use Codex as part of your paid plan
or connect an API key for usage-based billing
> 1. Sign in with ChatGPT
Usage included with Plus, Pro, and Team plans
2. Provide your own API key
Pay for what you use
Press Enter to continue
ERROR: [Errno 98] Address already in use
- and
codex login
ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:
What is the expected behavior?
To be prompted to login with a link or browser open
What do you see instead?
ERROR: [Errno 98] Address already in use
Error logging in: login_with_chatgpt subprocess failed:
Additional information
Debugging
ss -tulnpdoes not display anything in use for the OAuth required port1455. Why is this hardcoded?lsof -i :1455 -P -nreturns nothing- navigating to http://localhost:1455 errors with
ERR_CONNECTION_REFUSEDobviously netstat -ano | findstr :1455returns nothing- No docker containers using 1455
version 0.22.0 replaces the web server implementation, so this issue no longer arises. Could you try npm -g i @openai/codex@latest?
I have updated to latest and I still get this error Address in use (os error 98). I am using codex in VsCode at the same time
version 0.22.0 replaces the web server implementation, so this issue no longer arises. Could you try
npm -g i @openai/codex@latest?
I no longer get this issue in the latest version of Codex and have since switched to native. Thanks!
I have updated to latest and I still get this error Address in use (os error 98). I am using codex in VsCode at the same time
What version? Have you tried native? npm -g i @openai/codex@native has been working fine for me.
edit: should also mention I upgraded my WSL2 instance to Ubuntu 24.04 since attempting to get Codex working with my subscription.
I tried, but it requires a Git repo or so it seems. What I want is to use the CLI giving it permissions to use my actual computer. For repo use I'm using codex on Vscode
Same Issue
Duplicate of #2671