![]() Please edit the hostname mapped with the IP address "127.0.1.1".ĥ. Hence, it is very important that you edit the hostname in the file. The "hosts" file maps the hostname to IP addresses. Check the "/etc/hosts" file and edit the hostname same as in "/etc/hostname". The new hostname should be displayed on the screen.Ĥ. Once you have saved the file with your new hostname, run the command "hostname" to confirm. However, you can choose any text editor of your liking.)ģ. (Note: In this case we are using the "vi" editor to edit the file. (Note: You will need root permission to edit the file) You can use the following command to edit the file. As an example, I have assigned the hostname as "inspiron-3558". Edit the "/etc/hostname" file in which the hostname is stored in your system. The result will be blank as there is no hostname assigned.Ģ. Check in your hostname by running the command "hostname" on your terminal. Troubleshooting "sudo: unable to resolve host(none)"ġ. It is mapped to the network for communication. The hostname is stored locally in the file "/etc/hostname". Hostname is the name of your device that the network identifies with. When the terminal is stuck on "sudo: unable to resolve host(none)", it means that you have not provided a hostname to your system. So the final docker-compose.yml looks like this: version: '3' I have found a solution: removing networks' definition. LOG: database system is ready to accept connections ![]() LOG: MultiXact member wraparound protections are now enabled LOG: database system was shut down at 07:02:04 UTC PostgreSQL Database directory appears to contain a database Skipping initialization I wonder if I must specify a driver for this situation.Īlso I would like a way to test if I can reach db service with this hostname from the container of web and so, if the problem is in the code (that I highly doubt but I want to be sure).ĮDIT1: Logs of db service showing that the service seems to be running fine and ready to accept connections $ sudo docker logs -f mastodon_db_1 I already used the combination of Docker-Compose and Podman 3.0 with several projects and I never had any issue with hostname resolving inside networks. PG::ConnectionBad: could not translate host name "db" to address: Name or service not known Generating secrets was fine, but it failed on this command: $ sudo docker-compose run -rm web bundle exec rails db:migrateĬreating network "mastodon_internal_network" with the default driverĬreating network "mastodon_external_network" with the default driver (tl dr: I added options to health-checks and an env variable to authorize running postgres without password and commented build option to use image from the repo, as building was failing too) $ git diff docker-compose.ymlĭiff -git a/docker-compose.yml b/docker-compose.yml Here is a diff with remote version of the file on the repository: # http_proxy= # ALLOW_ACCESS_TO_HIDDEN_SERVICE=true # Uncomment to enable federation with tor instances along with adding the following ENV variables elasticsearch:/usr/share/elasticsearch/dataĬommand: bash -c "rm -f /mastodon/tmp/pids/server.pid bundle exec rails s -p 3000" # image: /elasticsearch/elasticsearch-oss:6.8.10 I had to do some changes into the docker-compose.yml to make it work with Podman. You can see my whole config file below. $ docker-compose -versionĭocker-compose version 1.27.4, build unknown ![]() I am running Docker-Compose and Podman on a Fedora 33 server. I am trying to deploy a mastodon server using this project:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |