IDE hangs on startup: "listen EADDRNOTAVAIL: address not available 127.0.0.1"

Arduino IDE will not open. Not even the splash screen. I click on the icon, it bounces for a bit, the dot under, which usually indicates that the app is running shows, then after about a minute, it goes away. Nothing else.

I've clean installed twice with no effect. I don't think there were any changes between the day or so I didn't open the app. Help will be appreciated.

Arduino IDE 2.1.0
Intel Mac book Air running MacOS Monterey V 12.6.6.

Clean all the tmp file with that remove the folder completely and try reinstalling it

Hi Krishna,

Which Temp file is this? I've previously deleted the Arduino folder in libraries as well as the app package before re-installing. So if it's the temp file in the Arduino15 folder in libraries, I already did that.

Hi @thousandlightyears. In order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to run Arduino IDE from the command line, then share the output.

Please do this:

  1. Close all Arduino IDE windows if the IDE is already running.
  2. Open your Applications folder in Finder.
  3. Open the Utilities folder.
  4. Double-click on "Terminal".
  5. Type the following command in the Terminal window:
    "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"
    
  6. Press Enter
  7. Wait until you are sure the IDE startup has gone into the hang state
    (as indicated by no additional output being printed to the Terminal window).
  8. Switch back to the Terminal window if the Arduino IDE window took the focus.
  9. Press +A.
    This will select all the text in the Terminal window.
  10. Press +C.
    This will copy the selected text to the clipboard.
  11. Open a forum reply here by clicking the Reply button.
  12. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the output is correctly formatted.
    Code tags icon on toolbar
  13. Press +V.
    This will paste the output into the code block.
  14. Move the cursor outside of the code block markup before you add any additional text to your reply.
  15. Click the Reply button to post the output.

Please let me know if you have any questions or problems while following those instructions.


Arduino IDE 2.1.0
Starting backend process. PID: 10674
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///Users/User/.theia'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-06-22T01:10:54.523Z root INFO Backend Object.initialize: 8.4 ms [Finished 2.884 s after backend start]
2023-06-22T01:10:54.523Z root INFO Backend Object.configure: 7.3 ms [Finished 2.884 s after backend start]
2023-06-22T01:10:54.523Z root INFO Backend MessagingContribution.onStart: 3.0 ms [Finished 2.884 s after backend start]
2023-06-22T01:10:54.524Z root INFO Backend OSBackendApplicationContribution.configure: 0.6 ms [Finished 2.997 s after backend start]
2023-06-22T01:10:54.525Z root INFO Backend DefaultWorkspaceServer.onStart: 0.5 ms [Finished 2.997 s after backend start]
2023-06-22T01:10:54.528Z root INFO Backend PluginLocalizationBackendContribution.configure: 0.2 ms [Finished 2.997 s after backend start]
2023-06-22T01:10:54.529Z root WARN Backend PluginLocalizationBackendContribution.initialize took longer than the expected maximum 50 milliseconds: 112.9 ms [Finished 2.997 s after backend start]
2023-06-22T01:10:54.530Z root INFO Backend TaskBackendApplicationContribution.onStart: 0.3 ms [Finished 2.997 s after backend start]
2023-06-22T01:10:54.531Z root INFO Backend ElectronTokenBackendContribution.configure: 1.2 ms [Finished 2.999 s after backend start]
2023-06-22T01:10:54.532Z config INFO >>> Initializing CLI configuration...
2023-06-22T01:10:54.532Z root INFO Backend PluginDeployerContribution.initialize: 0.6 ms [Finished 2.999 s after backend start]
2023-06-22T01:10:54.533Z root INFO Backend ConfigServiceImpl.onStart: 1.1 ms [Finished 3.000 s after backend start]
2023-06-22T01:10:54.533Z config INFO Loading CLI configuration from /Users/User/.arduinoIDE/arduino-cli.yaml...
2023-06-22T01:10:54.534Z root INFO Backend WebviewBackendSecurityWarnings.initialize: 1.9 ms [Finished 3.002 s after backend start]
2023-06-22T01:10:54.534Z root INFO Backend ArduinoDaemonImpl.onStart: 3.1 ms [Finished 3.004 s after backend start]
2023-06-22T01:10:54.534Z root INFO Backend NodeFileUploadService.configure: 4.5 ms [Finished 3.004 s after backend start]
2023-06-22T01:10:54.534Z daemon INFO Starting daemon from /Applications/Arduino IDE.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli...
2023-06-22T01:10:54.535Z discovery-log INFO start
2023-06-22T01:10:54.535Z discovery-log INFO start new deferred
2023-06-22T01:10:54.535Z root INFO Backend HostedPluginLocalizationService.initialize: 0.6 ms [Finished 3.006 s after backend start]
2023-06-22T01:10:54.535Z root INFO Backend BoardDiscovery.onStart: 1.5 ms [Finished 3.007 s after backend start]
2023-06-22T01:10:54.535Z root INFO Backend FileDownloadEndpoint.configure: 1.2 ms [Finished 3.007 s after backend start]
2023-06-22T01:10:54.535Z root INFO Backend AuthenticationServiceImpl.onStart: 0.6 ms [Finished 3.009 s after backend start]
2023-06-22T01:10:54.535Z root INFO Backend PluginApiContribution.configure: 0.6 ms [Finished 3.009 s after backend start]
2023-06-22T01:10:54.537Z root INFO Backend HostedPluginReader.configure: 0.5 ms [Finished 3.010 s after backend start]
2023-06-22T01:10:54.537Z root INFO Backend HostedPluginReader.configure: 0.1 ms [Finished 3.010 s after backend start]
2023-06-22T01:10:54.538Z root INFO Backend PlotterBackendContribution.configure: 1.9 ms [Finished 3.012 s after backend start]
2023-06-22T01:10:54.545Z root ERROR Failed to start the backend application:
2023-06-22T01:10:54.545Z root ERROR Error: listen EADDRNOTAVAIL: address not available 127.0.0.1
    at Server.setupListenHandle [as _listen2] (node:net:1298:21)
    at listenInCluster (node:net:1363:12)
    at GetAddrInfoReqWrap.doListen [as callback] (node:net:1501:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
2023-06-22T01:10:54.546Z root ERROR Uncaught Exception: 
2023-06-22T01:10:54.546Z root ERROR Error: listen EADDRNOTAVAIL: address not available 127.0.0.1
    at Server.setupListenHandle [as _listen2] (node:net:1298:21)
    at listenInCluster (node:net:1363:12)
    at GetAddrInfoReqWrap.doListen [as callback] (node:net:1501:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
2023-06-22T01:10:54.547Z root WARN The local plugin referenced by local-dir:/Users/User/.arduinoIDE/plugins does not exist.
2023-06-22T01:10:54.548Z root WARN The local plugin referenced by local-dir:/Users/User/.arduinoIDE/extensions does not exist.


This is the output.
Thanks.

Here is the relevant part of the output:

Arduino IDE communicates with some of its helper tools via an internal TCP/IP port in your computer on "localhost". This error shows that it is not able to connect to localhost, which causes the startup to fail.

Have you made any modifications, or is there anything notable about your "hosts file", especially in regards to the definition of localhost?

The "hosts file" is located at /etc/hosts (AKA /private/etc/hosts).

@ptillisch
This does make sense. I use the laptop as a print server periodically and had to setup a password protected adhoc. This issue started right after I set it up per some instructions I found to run these commands in terminal.

sudo networksetup -createnetworkservice AdHoc lo0
sudo networksetup -setmanual AdHoc 192.168.1.88 255.255.255.255

Can you see how this would affect Arduino's connection?

Here is what my hosts file looks like.
Screen Shot 2023-06-23 at 3.18.29 AM

Thank you.

I was able to fix it by running the following command.

sudo networksetup -createnetworkservice Loopback lo0
sudo networksetup -setmanual Loopback 127.0.0.1 255.255.255.255

Nothing changed in my hosts file but another network service was created and i guess that fixed it. I can only imagine that creating the Adhoc network somehow narrowed the scope of the loopback (feel free to elaborate please.) No idea if more issues are going to crop up but at least, now I know I just have to delete the manually created network services if I encounter network issues.

Thanks for the help @ptillisch. Much appreciated.

Nice work finding a solution to the problem! Thanks for taking the time to post an update with your findings.

Regards,
Per

1 Like

A post was split to a new topic: Hang on startup with error "Failed to initialize the CLI configuration"

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.