frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

When Curl Works but IntelliJ Doesn't: The Ollama Connection Mystery

https://blog.tymscar.com/posts/intellijollamaconnectionmystery/
82•tymscar•4mo ago

Comments

syntaxing•4mo ago
Fun read, but you probably could have installed mitmproxy with brew, pointed your IntelliJ instance through this proxy (you can either set it in your settings or run it with environment variable HTTP_PORT or HTTPS_PORT). This allows you intercept the request like wireshark and diagnose. You honestly can just intercept the interface request using wireshark but the learning curve is stepper.
tymscar•4mo ago
Good point! Wireshark was the next step actually if this didnt work!
devmor•4mo ago
Even if you know how to use Wireshark already, a lot of times it’s faster and easier to use mitmproxy for something simple.

I use it for reverse engineering IoT apps on android emulators regularly.

ofrzeta•4mo ago
You have to work around TLS, though. Although it is possible with Wireshark, extracting the shared keys through from the browser, I never could get it to work. With mitmproxy I was more successful and could even get iOS Safari to accept my self-issued certificate and read HTTP traffic from a third-party app that I re-routed through my own proxy.
syntaxing•4mo ago
It’s not that hard to use your own CA cert on macOS, you just add it in Keychain. Mitmproxy takes like 5 minute to setup on macOS, they provide a CA self signed cert for you out of the box
bauruine•4mo ago
In this case it's possible that it would have worked if he had used mitmproxy.
pixl97•4mo ago
Yep, pretty much any proxy would have resolved the issue, unless of course it was java based and used the same connection methods.
bigiain•4mo ago
There's nothing more frustrating than having your debugging tools change the behaviour enough to hide the bug...
misja111•4mo ago
From the Oracle/Java documentation:

java.net.preferIPv4Stack (default: false) If IPv6 is available on the operating system the underlying native socket will be, by default, an IPv6 socket which lets applications connect to, and accept connections from, both IPv4 and IPv6 hosts. However, in the case an application would rather use IPv4 only sockets, then this property can be set to true. The implication is that it will not be possible for the application to communicate with IPv6 only hosts.

It's strange that things didn't work with this flag to false. It should be able to connect to both IPv4 and IPv6. Now that the author has set it to true, the drawback is that his IntelliJ won't be able to connect to IPv6-only hosts anymore.

delfinom•4mo ago
>Now that the author has set it to true, the drawback is that his IntelliJ won't be able to connect to IPv6-only hosts anymore.

I'm very sure the author has no such need.

tymscar•4mo ago
Yeah, I am aware of this and its totally fine for me for now!
rileytg•4mo ago
i wasted days on a similar issue… thanks for the write up, hopefully this saves someone else in the future
gopalv•4mo ago
It is a meme, but it's always DNS

This error can happen if there's an AAAA record, but it contains the ipv4 address packed inside a ipv6 mask.

If the AAAA record says ::ffff:10.0.0.105, then you can either fix DNS or do what's in the blog, which should stop checking for quad A records.

re•4mo ago
It's a good write-up but I wish this blog post went just a little bit deeper with the investigation to confirm whether this is the issue (ollama.tymscar.com having an AAAA record); it's missing the answer to "Why is the JVM trying (or initializing toward) an IPv6 path first and not gracefully falling back?"
miyuru•4mo ago
I think it was the split DNS setup.

He might have setup IPv4 internal DNS server and java might have used the public IPv6 DNS to resolve the domain.

piperswe•4mo ago
Honestly I think this is InteiJ's fault for not running Happy Eyeballs
frogger8•4mo ago
macOS doesn’t give you a built-in toggle — but you can use a resolver config tweak. sudo nano /etc/gai.conf Add this..

precedence ::ffff:0:0/96 100

it will boosts IPv4 preference when resolving hostnames that return both A (IPv4) and AAAA (IPv6) records. (The file may not exist; if so, you’re creating it. It’s honored by getaddrinfo, which Java ultimately uses through the OS.)

Keeps IPv6 alive but prefers IPv4

jeroenhd•4mo ago
I don't see the point in applying such a hack when the problem is a DNS server that they themselves control. Fix/remove the AAAA record and the problem goes away without leaving a footgun on your system to hurt you years down the line by altering the network priority order.
JSR_FDED•4mo ago
TIL, thanks!
JohnMakin•4mo ago
This sounds similar to an infuriating issue I've been dealing with AWS Client VPN for at least a year - it does not support ipv6, but depending on your setup, requests may try to resolve a ipv6 address first, not find one, and then stall/fail. Only solution seems to be trying to guarantee ipv6 resolution is disabled.
cyberax•4mo ago
I had a similar issue with Python long ago. We had a server running in AWS that was configured for IPv4 and IPv6 addresses, but we accidentally forgot to set up the firewall rules to allow inbound routing for IPv6.

Everything worked fine in Go, because the built-in client uses the Happy Eyeballs protocol. But Python clients silently failed for _some_ people when working from home. Why? Because they had IPv6 enabled, and Python tried to use it exclusively.

I'm now convinced that the lack of Happy Eyeballs early in the IPv6 deployment was the main culprit for its sad state.

jeroenhd•4mo ago
In the situation you're describing, Happy Eyeballs would've kept spamming unnecessary packets across the internet from any framework/language. Python's (technically correct) usage of IPv6 forced someone to actually fix the problem (the misconfigured firewall or DNS).

The more of these half-solutions you make default, the more fragile and confusing networks become. Things like these are what I find so infuriating about "opinionated" frameworks like Go's standard library, because they'll happily apply patch jobs that'll probably mostly work most of the time as a default and leave you to reverse engineer the problem when the workaround eventually collapses.

cyberax•4mo ago
And we didn't fix it. We just disabled the IPv6.
ActorNightly•4mo ago
The problem here is that Java is being used.
o1bf2k25n8g5•4mo ago
Sometimes, when people have a problem, they think, "I know! I'll use Java."

Then they have 2 problems.

WatchDog•4mo ago
So I understand why preferring ipv4 would fix an issue while using DNS, but why would Java fail to connect when directly using the ip address?
LilBytes•4mo ago
Not too dissimilar to what I and some colleagues went through with our local dev tooling yesterday. Not related to DNS, but the frustration was on par.

Went around in circles deleting the repo, deleting packages from homebrew, reimporting the tool chain from our private repo, constantly got HTTP 400 errors from the Rails Console when we were attempting to use our local dev instance to talk to third party APIs.

Eventually found out it was because of a recent release of OpenSSL:

1. https://github.com/ruby/openssl/issues/949#issuecomment-3367... 2. https://github.com/openssl/openssl/issues/28758#issuecomment...

Had to rollback OpenSSL to a prior version, we were dangerously close to "time to wipe the Mac".

Logic Puzzles: Why the Liar Is the Helpful One

https://blog.szczepan.org/blog/knights-and-knaves/
1•wasabi991011•1m ago•0 comments

Optical Combs Help Radio Telescopes Work Together

https://hackaday.com/2026/02/03/optical-combs-help-radio-telescopes-work-together/
1•toomuchtodo•6m ago•1 comments

Show HN: Myanon – fast, deterministic MySQL dump anonymizer

https://github.com/ppomes/myanon
1•pierrepomes•12m ago•0 comments

The Tao of Programming

http://www.canonical.org/~kragen/tao-of-programming.html
1•alexjplant•14m ago•0 comments

Forcing Rust: How Big Tech Lobbied the Government into a Language Mandate

https://medium.com/@ognian.milanov/forcing-rust-how-big-tech-lobbied-the-government-into-a-langua...
1•akagusu•14m ago•0 comments

PanelBench: We evaluated Cursor's Visual Editor on 89 test cases. 43 fail

https://www.tryinspector.com/blog/code-first-design-tools
2•quentinrl•16m ago•1 comments

Can You Draw Every Flag in PowerPoint? (Part 2) [video]

https://www.youtube.com/watch?v=BztF7MODsKI
1•fgclue•21m ago•0 comments

Show HN: MCP-baepsae – MCP server for iOS Simulator automation

https://github.com/oozoofrog/mcp-baepsae
1•oozoofrog•25m ago•0 comments

Make Trust Irrelevant: A Gamer's Take on Agentic AI Safety

https://github.com/Deso-PK/make-trust-irrelevant
2•DesoPK•29m ago•0 comments

Show HN: Sem – Semantic diffs and patches for Git

https://ataraxy-labs.github.io/sem/
1•rs545837•30m ago•1 comments

Hello world does not compile

https://github.com/anthropics/claudes-c-compiler/issues/1
14•mfiguiere•36m ago•1 comments

Show HN: ZigZag – A Bubble Tea-Inspired TUI Framework for Zig

https://github.com/meszmate/zigzag
2•meszmate•38m ago•0 comments

Metaphor+Metonymy: "To love that well which thou must leave ere long"(Sonnet73)

https://www.huckgutman.com/blog-1/shakespeare-sonnet-73
1•gsf_emergency_6•40m ago•0 comments

Show HN: Django N+1 Queries Checker

https://github.com/richardhapb/django-check
1•richardhapb•55m ago•1 comments

Emacs-tramp-RPC: High-performance TRAMP back end using JSON-RPC instead of shell

https://github.com/ArthurHeymans/emacs-tramp-rpc
1•todsacerdoti•1h ago•0 comments

Protocol Validation with Affine MPST in Rust

https://hibanaworks.dev
1•o8vm•1h ago•1 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
3•gmays•1h ago•0 comments

Show HN: Zest – A hands-on simulator for Staff+ system design scenarios

https://staff-engineering-simulator-880284904082.us-west1.run.app/
1•chanip0114•1h ago•1 comments

Show HN: DeSync – Decentralized Economic Realm with Blockchain-Based Governance

https://github.com/MelzLabs/DeSync
1•0xUnavailable•1h ago•0 comments

Automatic Programming Returns

https://cyber-omelette.com/posts/the-abstraction-rises.html
1•benrules2•1h ago•1 comments

Why Are There Still So Many Jobs? The History and Future of Workplace Automation [pdf]

https://economics.mit.edu/sites/default/files/inline-files/Why%20Are%20there%20Still%20So%20Many%...
2•oidar•1h ago•0 comments

The Search Engine Map

https://www.searchenginemap.com
1•cratermoon•1h ago•0 comments

Show HN: Souls.directory – SOUL.md templates for AI agent personalities

https://souls.directory
1•thedaviddias•1h ago•0 comments

Real-Time ETL for Enterprise-Grade Data Integration

https://tabsdata.com
1•teleforce•1h ago•0 comments

Economics Puzzle Leads to a New Understanding of a Fundamental Law of Physics

https://www.caltech.edu/about/news/economics-puzzle-leads-to-a-new-understanding-of-a-fundamental...
3•geox•1h ago•1 comments

Switzerland's Extraordinary Medieval Library

https://www.bbc.com/travel/article/20260202-inside-switzerlands-extraordinary-medieval-library
3•bookmtn•1h ago•0 comments

A new comet was just discovered. Will it be visible in broad daylight?

https://phys.org/news/2026-02-comet-visible-broad-daylight.html
4•bookmtn•1h ago•0 comments

ESR: Comes the news that Anthropic has vibecoded a C compiler

https://twitter.com/esrtweet/status/2019562859978539342
2•tjr•1h ago•0 comments

Frisco residents divided over H-1B visas, 'Indian takeover' at council meeting

https://www.dallasnews.com/news/politics/2026/02/04/frisco-residents-divided-over-h-1b-visas-indi...
5•alephnerd•1h ago•5 comments

If CNN Covered Star Wars

https://www.youtube.com/watch?v=vArJg_SU4Lc
1•keepamovin•1h ago•1 comments