question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] [Errno 99] error while attempting to bind on address

See original GitHub issue

I tried to write a dockerfile for Chia:

FROM ubuntu:20.04

# run updates
RUN apt-get update && apt-get upgrade -y && apt-get install git screen nano lsb-release sudo -y

# checkout and install chia
RUN git clone https://github.com/Chia-Network/chia-blockchain.git -b latest --recurse-submodules 
WORKDIR chia-blockchain
RUN chmod +x ./install.sh && sh install.sh 

# create mountpoints for ssd temporary storage and persistent hdd storage
WORKDIR /
RUN mkdir /ssd && mkdir /hdd

# copy over ".chia" folder if it exists in the build folder
COPY .chia /root/.chia

WORKDIR chia-blockchain

# manually activate virtual env (replaces the ". ./activate" command)
ENV VIRTUAL_ENV="/chia-blockchain/venv"
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# run Chia init
RUN chia init

You can build it by running:

sudo docker build -t chia-docker .

You can login to the container by running:

sudo docker run -it chia-docker

Activate the Python environment in the container:

. ./activate

Trying to run the daemon or any command dependent on the daemon:

chia run_daemon

Unfortunately fails with: OSError: [Errno 99] error while attempting to bind on address ('::1', 55400, 0, 0): cannot assign requested address

There is not much information why this error occurs, does anyone here have an idea?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
ghostcommented, Apr 24, 2021

I went though the code and ended up in the .chia/mainnet/config/config.yaml.

Since this whole issue seems to be related to something around localhost not being resolves I changed the line containing: self_hostname: &self_hostname "localhost" to self_hostname: &self_hostname "127.0.0.1" and chia start node successfully starts.

0reactions
github-actions[bot]commented, Jul 18, 2021

This issue was automatically closed because it has been flagged as stale and subsequently passed 7 days with no further activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Errno 99] error while attempting to bind on address ('::1', 8265 ...
I am building a Docker image with my branch and am unable to start the dashboard. Node 13.x is installed. The issue appears...
Read more >
socket.error:[errno 99] cannot assign requested address and ...
When you bind(), you are associating the socket with a local IP address and a port. So, as long as the address is...
Read more >
[Errno 99] error while attempting to bind on address ('::1', 8080 ...
Hi! This error typically measns that there's already something else running on localhost:8080 – maybe your Jupyter notebook, maybe an old ...
Read more >
CURL error after upgrading v2.7 — bind failed with errno 99
In the “shared host” situations (unless defined in that constant ) it was using the first IP address on the network, and that...
Read more >
How I fixed Python OSError: [Errno 99] Cannot assign ...
Solution: In my case, the issue was that I was trying to bind the specific IP address 192.168.1.100 but the computer running the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found