Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - invalid characters for a local volume name #47

Open
valentinitnelav opened this issue Jun 4, 2021 · 2 comments
Open

Error - invalid characters for a local volume name #47

valentinitnelav opened this issue Jun 4, 2021 · 2 comments

Comments

@valentinitnelav
Copy link

Hi,

After installing, when I try to run

~/aerial_wildlife_detection$ sudo docker/docker_run_cpu.sh 

I get the following error messages:

: "aide_images\r" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
: "aide_db_data\r" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
: not founder_run_cpu.sh: 3: 
docker: invalid reference format.
See 'docker run --help'.
docker/docker_run_cpu.sh: 5: --rm: not found
docker/docker_run_cpu.sh: 6: -v: not found
docker/docker_run_cpu.sh: 7: -v: not found
docker/docker_run_cpu.sh: 8: -v: not found
docker/docker_run_cpu.sh: 9: -p: not found
docker/docker_run_cpu.sh: 10: -h: not found
: not founder_run_cpu.sh: 11: aide_app
: not founder_run_cpu.sh: 12: 

Not sure why I get the invalid character error. Most probably something went wrong during installation. I run on

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal

During installation I got this error message:

~/aerial_wildlife_detection$  cd docker
~/aerial_wildlife_detection/docker$ sudo docker-compose build
...
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libjemalloc1 amd64 3.6.0-11 [82.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 redis-tools amd64 5:4.0.9-1ubuntu0.2 [516 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 redis-server amd64 5:4.0.9-1ubuntu0.2 [35.4 kB]
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
Fetched 634 kB in 0s (2039 kB/s)
Selecting previously unselected package libjemalloc1.
(Reading database ... 41473 files and directories currently installed.)
Preparing to unpack .../libjemalloc1_3.6.0-11_amd64.deb ...
Unpacking libjemalloc1 (3.6.0-11) ...
Selecting previously unselected package redis-tools.
Preparing to unpack .../redis-tools_5%3a4.0.9-1ubuntu0.2_amd64.deb ...
Unpacking redis-tools (5:4.0.9-1ubuntu0.2) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../redis-server_5%3a4.0.9-1ubuntu0.2_amd64.deb ...
Unpacking redis-server (5:4.0.9-1ubuntu0.2) ...
Setting up libjemalloc1 (3.6.0-11) ...
Setting up redis-tools (5:4.0.9-1ubuntu0.2) ...
Setting up redis-server (5:4.0.9-1ubuntu0.2) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service → /lib/systemd/system/redis-server.service.
Processing triggers for systemd (237-3ubuntu10.47) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Removing intermediate container 32104a348723

When I try to execute with Docker Compose, I get the followings:

~/aerial_wildlife_detection$ cd docker
~/aerial_wildlife_detection/docker$ sudo docker-compose up
Creating network "docker_default" with the default driver
Creating volume "aide_db_data" with default driver
Creating volume "aide_images" with default driver
Creating docker_aide_app_1 ... done
Attaching to docker_aide_app_1
aide_app_1  | /home/aide/app/docker/container_init.sh: line 2: $'\r': command not found
aide_app_1  | Failed to enable unit, unit redis-server.service\x0d.service does not exist.
aide_app_1  | Starting redis-server: redis-server.
aide_app_1  | /home/aide/app/docker/container_init.sh: line 5: $'\r': command not found
aide_app_1  | =============================
aide_app_1  | Setup of database IS STARTING
aide_app_1  | =============================
aide_app_1  | /home/aide/app/docker/container_init.sh: line 9: $'\r': command not found
aide_app_1  | Usage: /etc/init.d/postgresql {start|stop|restart|reload|force-reload|status} [version ..]
aide_app_1  | /home/aide/app/docker/container_init.sh: line 13: $'\r': command not found
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | psql: could not connect to server: No such file or directory
aide_app_1  | 	Is the server running locally and accepting
aide_app_1  | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.17685"?
aide_app_1  | /home/aide/app/docker/container_init.sh: line 19: $'\r': command not found
': [Errno 2] No such file or directory'setup/setupDB.py
aide_app_1  | Failed to enable unit, unit postgresql.service\x0d.service does not exist.
aide_app_1  | Usage: /etc/init.d/postgresql {start|stop|restart|reload|force-reload|status} [version ..]
aide_app_1  | /home/aide/app/docker/container_init.sh: line 24: $'\r': command not found
aide_app_1  | ==============================
aide_app_1  | Setup of database IS COMPLETED
aide_app_1  | ==============================
aide_app_1  | 
aide_app_1  | /home/aide/app/docker/container_init.sh: line 29: $'\r': command not found
aide_app_1  | ==========================
aide_app_1  | RABBITMQ SETUP IS STARTING
aide_app_1  | ==========================
aide_app_1  | Usage: /etc/init.d/rabbitmq-server {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}
aide_app_1  | Error: unable to connect to node rabbit@aide_app_host: nodedown
aide_app_1  | 
aide_app_1  | DIAGNOSTICS
aide_app_1  | ===========
aide_app_1  | 
aide_app_1  | attempted to contact: [rabbit@aide_app_host]
aide_app_1  | 
aide_app_1  | rabbit@aide_app_host:
aide_app_1  |   * connected to epmd (port 4369) on aide_app_host
aide_app_1  |   * epmd reports: node 'rabbit' not running at all
aide_app_1  |                   no other nodes on aide_app_host
aide_app_1  |   * suggestion: start the node
aide_app_1  | 
aide_app_1  | current node details:
aide_app_1  | - node name: 'rabbitmq-cli-56@aide_app_host'
aide_app_1  | - home dir: /var/lib/rabbitmq
aide_app_1  | - cookie hash: weZIL9jjvo57iPkMljrfcQ==
aide_app_1  | 
aide_app_1  | Error: unable to connect to node rabbit@aide_app_host: nodedown
aide_app_1  | 
aide_app_1  | DIAGNOSTICS
aide_app_1  | ===========
aide_app_1  | 
aide_app_1  | attempted to contact: [rabbit@aide_app_host]
aide_app_1  | 
aide_app_1  | rabbit@aide_app_host:
aide_app_1  |   * connected to epmd (port 4369) on aide_app_host
aide_app_1  |   * epmd reports: node 'rabbit' not running at all
aide_app_1  |                   no other nodes on aide_app_host
aide_app_1  |   * suggestion: start the node
aide_app_1  | 
aide_app_1  | current node details:
aide_app_1  | - node name: 'rabbitmq-cli-91@aide_app_host'
aide_app_1  | - home dir: /var/lib/rabbitmq
aide_app_1  | - cookie hash: weZIL9jjvo57iPkMljrfcQ==
aide_app_1  | 
aide_app_1  | /home/aide/app/docker/container_init.sh: line 39: $'\r': command not found
aide_app_1  | Error: unable to connect to node rabbit@aide_app_host: nodedown
aide_app_1  | 
aide_app_1  | DIAGNOSTICS
aide_app_1  | ===========
aide_app_1  | 
aide_app_1  | attempted to contact: [rabbit@aide_app_host]
aide_app_1  | 
aide_app_1  | rabbit@aide_app_host:
aide_app_1  |   * connected to epmd (port 4369) on aide_app_host
aide_app_1  |   * epmd reports: node 'rabbit' not running at all
aide_app_1  |                   no other nodes on aide_app_host
aide_app_1  |   * suggestion: start the node
aide_app_1  | 
aide_app_1  | current node details:
aide_app_1  | - node name: 'rabbitmq-cli-33@aide_app_host'
aide_app_1  | - home dir: /var/lib/rabbitmq
aide_app_1  | - cookie hash: weZIL9jjvo57iPkMljrfcQ==
aide_app_1  | 
aide_app_1  | Error: unable to connect to node rabbit@aide_app_host: nodedown
aide_app_1  | 
aide_app_1  | DIAGNOSTICS
aide_app_1  | ===========
aide_app_1  | 
aide_app_1  | attempted to contact: [rabbit@aide_app_host]
aide_app_1  | 
aide_app_1  | rabbit@aide_app_host:
aide_app_1  |   * connected to epmd (port 4369) on aide_app_host
aide_app_1  |   * epmd reports: node 'rabbit' not running at all
aide_app_1  |                   no other nodes on aide_app_host
aide_app_1  |   * suggestion: start the node
aide_app_1  | 
aide_app_1  | current node details:
aide_app_1  | - node name: 'rabbitmq-cli-32@aide_app_host'
aide_app_1  | - home dir: /var/lib/rabbitmq
aide_app_1  | - cookie hash: weZIL9jjvo57iPkMljrfcQ==
aide_app_1  | 
aide_app_1  | /home/aide/app/docker/container_init.sh: line 42: $'\r': command not found
aide_app_1  | Error: unable to connect to node rabbit@aide_app_host: nodedown
aide_app_1  | 
aide_app_1  | DIAGNOSTICS
aide_app_1  | ===========
aide_app_1  | 
aide_app_1  | attempted to contact: [rabbit@aide_app_host]
aide_app_1  | 
aide_app_1  | rabbit@aide_app_host:
aide_app_1  |   * connected to epmd (port 4369) on aide_app_host
aide_app_1  |   * epmd reports: node 'rabbit' not running at all
aide_app_1  |                   no other nodes on aide_app_host
aide_app_1  |   * suggestion: start the node
aide_app_1  | 
aide_app_1  | current node details:
aide_app_1  | - node name: 'rabbitmq-cli-66@aide_app_host'
aide_app_1  | - home dir: /var/lib/rabbitmq
aide_app_1  | - cookie hash: weZIL9jjvo57iPkMljrfcQ==
aide_app_1  | 
aide_app_1  | Failed to enable unit, unit rabbitmq-server.service\x0d.service does not exist.
aide_app_1  | ===========================
aide_app_1  | RABBITMQ SETUP IS COMPLETED
aide_app_1  | ===========================
aide_app_1  | 
aide_app_1  | /home/aide/app/docker/container_init.sh: line 64: syntax error: unexpected end of file
docker_aide_app_1 exited with code 2

@bkellenb
Copy link
Collaborator

bkellenb commented Jul 20, 2021

Hello,

Thank you very much for your report. The invalid carriage return character is a recurring problem for which I have not yet found a clear answer. It might be related to the configuration of Git. Unfortunately, I cannot reproduce it on multiple systems; lines somehow always seem to end correctly.

What is the setting in your setup of git?

git config --global core.autocrlf

Meanwhile it might work to forcefully remove seemingly invalid CRLF characters using the tool dos2unix:

# run these two lines from the AIDE installation folder before building containers with docker or docker-compose
sudo apt install dos2unix -y
dos2unix *.sh docker/*.sh docker/Dockerfile

@valentinitnelav
Copy link
Author

Hi,

Thanks for looking into this case.

The line:

git config --global core.autocrlf

gives: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants