When the model cannot be downloaded on first startup
Bareun does not put the models and dictionaries used for morphological analysis in the installer. It downloads them automatically the first time you run the server.
So an empty model folder right after installation is normal, and if the download is blocked on first startup, the server cannot start analyzing. Let's check
this one step at a time.
Symptoms
- Installation finished, but the server stalls during startup or exits with an error that the model could not be prepared.
- The place where models are stored (
var/modelsin the installation folder) is empty or has only some of the files. - When you request an analysis, you get a response that the server is not ready yet.
- In Docker, startup takes a long time every time you recreate the container (the case where the model is downloaded again every time).
Wait first
On first startup, it downloads hundreds of MB. Depending on the network, it can take from tens of seconds to several minutes, so don't judge it a failure right away; watch for a moment to see whether the startup log is progressing.
Causes
| Cause | Description |
|---|---|
| Outbound connections blocked | A firewall or proxy blocks external HTTPS access, so files cannot be downloaded |
| Name resolution (DNS) failure | The internal network DNS cannot resolve external addresses |
| Not enough disk space | Not enough room to store the models and dictionaries |
| Insufficient write permission | The account running the server cannot write to the data area (var) |
| Docker volume not mounted | var is not attached as a volume, so everything is downloaded from scratch each time the container is recreated |
| Air-gapped network | An environment where external access is impossible in the first place |
How to fix it
-
Look at the startup log. Where it stopped is the fastest clue. Connection failures, permission errors, and lack of disk space can be told apart by the log messages.
-
Check outbound connections. Check whether the host where the server is installed can make external HTTPS (TCP 443) connections. If you use a firewall or proxy, allow outbound connections to
storage.googleapis.com.curl -sSI https://storage.googleapis.com | head -n 1curl.exe -sSI https://storage.googleapis.com | Select-Object -First 1 -
Check free disk space and write permission. The models and dictionaries are hundreds of MB, so we recommend at least 2 GB of free space. The account running the server must be able to write under
varin the installation folder. -
If you use Docker, attach the data area as a volume. With the
-v ~/bareun/var:/bareun/varmount, the downloaded models stay on the host, so they are not downloaded again even if you recreate the container.mkdir -p ~/bareun/var docker run -d -p 5656:5656 -v ~/bareun/var:/bareun/var bareunai/bareun:latest -
Try starting again. After you fix the cause and start the server again, it continues downloading only the files it couldn't get. Files that were already downloaded are not downloaded again.
You do not need to reinstall
The models are not in the installer, so an empty model folder does not mean the installation is broken. Reinstalling repeatedly leads to the same state, so check the connection, permissions, and disk first. If the ONNX Runtime library itself is the problem, see Checking ONNX Runtime load failures.
If you installed in an air-gapped network
In a network that the internet cannot reach, the server cannot download the models. In that case, prepare the models in advance and place them in the data area, and the server will use them as they are. The preparation method and file layout vary by environment, so check Model update, and if needed, contact helpdesk@bareun.ai.
Prevention and tips
- If you plan to install on several machines, finish the first startup on one machine and then copy its data area as it is, which speeds up the first startup of the other servers.
- In Docker and Kubernetes, always keep the data area on a persistent volume. The more often you recreate containers, the higher the cost of downloading again.
- How to switch to a new model is covered in Model update.
Frequently asked questions
Q. I installed it, but the model folder is empty. Is the installation wrong?
No. Bareun does not put the models in the installer and downloads them on first startup. Start the server once and
wait until the startup log finishes.
Q. Do I need an internet connection on first startup?
Yes, you need an outbound HTTPS connection once to download the models. After that, it works over the internal network alone. In an air-gapped network, you must prepare the models in advance.
Q. The download was interrupted partway. Does it start over from the beginning?
Files that were already downloaded are not downloaded again. When you start the server again, it continues downloading only the missing files.
Q. In Docker, it downloads the model again every time I recreate the container.
This is the case where the data area is not mounted, so the downloaded models disappear along with the container.
Attach a volume, like -v ~/bareun/var:/bareun/var.