Code Monkey home page Code Monkey logo

Comments (11)

KarelStudnicka avatar KarelStudnicka commented on August 18, 2024 1

solved by linux line endings

from nominatim-docker.

Gitii avatar Gitii commented on August 18, 2024

A quick fix could be:
docker run --entrypoint "/bin/sleep" -d -p 8080:8080 nominatim "99999999"
After that enter the container with:
docker exec -i -t <container id> /bin/bash

In the container locate /app/start.sh and check it:

  • is it there?
  • Are the permissions correct?
  • Are the line endings correct?

And last but not least:

  • can you execute the script?

I encountered the same issue, hopefully this helps someone.

from nominatim-docker.

KarelStudnicka avatar KarelStudnicka commented on August 18, 2024

I have a same problem:

/bin/sh: 1: /app/start.sh: not found

file is there and is executable. should incorrect line endings appear as "file not found" error?

from nominatim-docker.

alexsandro-xpt avatar alexsandro-xpt commented on August 18, 2024

Same problem here.... what do you mean solved by linux line endings @KarelStudnicka ?

from nominatim-docker.

alexsandro-xpt avatar alexsandro-xpt commented on August 18, 2024

Really bad output

J:\Alex\nominatim-docker\3.1>docker run -t -v "j:/nominatimdata":/data nominatim sh /app/init.sh /data/brazil-latest.osm.pbf postgresdata 4
: not foundh: 4: /app/init.sh:
mkdir: cannot create directory ‘/data/postgresdata\r’: No such file or directory
: not foundh: 6: /app/init.sh:
chown: cannot access '/data/postgresdata'$'\r': No such file or directory
: not foundh: 8: /app/init.sh:
: not foundh: 9: /app/init.sh:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

": No such file or directorye directory "/data/postgresdata
" does not existy "/data/postgresdata
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createuser: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createuser: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
: not foundh: 15: /app/init.sh:
: not foundh: 16: /app/init.sh:
ERROR: the path supplied to --osm-file does not exist
the path supplied to --osm-file does not exist
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
" does not existy "/data/postgresdata
chown: cannot access '/data/postgresdata'$'\r': No such file or directory

But if I run a ls command, all files is there:

J:\Alex\nominatim-docker\3.1>docker run -t nominatim ls /app
init.sh  src  start.sh  startapache.sh  startpostgres.sh

from nominatim-docker.

Gitii avatar Gitii commented on August 18, 2024

Please check that all scripts have only linux line endings (\n).

Edit:
Please see here for an explanation of the different line endings.

Use Notepad++ (windows) to correct the line endings or dos2unix (*unix, example here)

from nominatim-docker.

alexsandro-xpt avatar alexsandro-xpt commented on August 18, 2024

@Gitii Is this just because I build the Docker Image under Windows and about CRLF git manager while clone this repository?!

from nominatim-docker.

Gitii avatar Gitii commented on August 18, 2024

Exactly!

from nominatim-docker.

alexsandro-xpt avatar alexsandro-xpt commented on August 18, 2024

I suspected from the beginning 😬

Thanks!!!

from nominatim-docker.

geomark avatar geomark commented on August 18, 2024

https://willi.am/blog/2016/08/11/docker-for-windows-dealing-with-windows-line-endings/

from nominatim-docker.

philipkozeny avatar philipkozeny commented on August 18, 2024

We've changed quite a lot with the latest releases (3.6 & 3.7). You can check the latest version out and give us feedback, the problem should be fixed.

from nominatim-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.