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
Docker 'network=host' doesn't start - too many positional options have been specified #4141
Comments
checked locally on my machine works maybe related to running on ubuntu - although its not clear how that can cause an issue. |
#4203 would help to solve such issues |
I'm hitting the same issue running Docker on mac |
Fixes scylladb#4203 and scylladb#4141. Command line arguments are parsed twice in Scylla: once in main and once in Seastar's app_template::run. The first parse is there to check if the "--version" flag is present --- in this case the version is printed and the program exists. However, most of the arguments were improperly treated as positional arguments the first time they were parsed (e.g., "--network host" would treat "host" as a positional argument). This commit fixes the issue and prints the parsed arguments. Signed-off-by: Kamil Braun <kbraun@scylladb.com>
Command line arguments are parsed twice in Scylla: once in main and once in Seastar's app_template::run. The first parse is there to check if the "--version" flag is present --- in this case the version is printed and the program exists. The second parsing is correct; however, most of the arguments were improperly treated as positional arguments during the first parsing (e.g., "--network host" would treat "host" as a positional argument). This happened because the arguments weren't known to the command line parser. This commit fixes the issue by moving the parsing code until after the arguments are registered. Solves scylladb#4141. Signed-off-by: Kamil Braun <kbraun@scylladb.com>
Command line arguments are parsed twice in Scylla: once in main and once in Seastar's app_template::run. The first parse is there to check if the "--version" flag is present --- in this case the version is printed and the program exists. The second parsing is correct; however, most of the arguments were improperly treated as positional arguments during the first parsing (e.g., "--network host" would treat "host" as a positional argument). This happened because the arguments weren't known to the command line parser. This commit fixes the issue by moving the parsing code until after the arguments are registered. Resolves scylladb#4141. Signed-off-by: Kamil Braun <kbraun@scylladb.com>
" Fixes #4203 and #4141. " * 'cmdline' of https://github.com/kbr-/scylla: Add logging of parsed command line options Fix command line argument parsing in main.
Command line arguments are parsed twice in Scylla: once in main and once in Seastar's app_template::run. The first parse is there to check if the "--version" flag is present --- in this case the version is printed and the program exists. The second parsing is correct; however, most of the arguments were improperly treated as positional arguments during the first parsing (e.g., "--network host" would treat "host" as a positional argument). This happened because the arguments weren't known to the command line parser. This commit fixes the issue by moving the parsing code until after the arguments are registered. Resolves #4141. Signed-off-by: Kamil Braun <kbraun@scylladb.com> (cherry picked from commit f155a2d)
Command line arguments are parsed twice in Scylla: once in main and once in Seastar's app_template::run. The first parse is there to check if the "--version" flag is present --- in this case the version is printed and the program exists. The second parsing is correct; however, most of the arguments were improperly treated as positional arguments during the first parsing (e.g., "--network host" would treat "host" as a positional argument). This happened because the arguments weren't known to the command line parser. This commit fixes the issue by moving the parsing code until after the arguments are registered. Resolves #4141. Signed-off-by: Kamil Braun <kbraun@scylladb.com> (cherry picked from commit f155a2d)
Backported to 3.1, 3.0. |
@CountZukula please check with latest Scylla Docker 3.0.10 |
@tzach It's been a while but I tried to reproduce my environment and ran the docker command as stated in the first post. Getting the same result, full output:
|
(for reference, LATEST in the above was 3.0.10) |
@penberg ? |
when you set network mode to host, scylla docker's entrypoint will look for network interfaces to set the listen address, but when it will reach too many options to set as listen address, so for running container with network mode host, just add listen address argument to cmd. docker run --name scylla -it --network host scylladb/scylla --listen-address $HOST_IP |
Is also caused when using multiple Solution for me was: using only one network - then scylla sorted it out by itself. Initially used |
Issue #9240 seems to have encountered this bug again. He was trying to run Alternator but it doesn't seem that there is anything in "too many positional options" specific to Alternator - rather the problem appears to be that our startup script passes to Scylla both IPv4 and IPv6 addresses with a space between them, where just a single IP address is expected. |
An explanation what the user in #9240 was trying to do when encountering this bug: HENNGE/aiodynamo#27 (comment) |
Is there an workaround to handle this in a dual stacked docker test system? |
This is Scylla's bug tracker, to be used for reporting bugs only.
If you have a question about Scylla, and not a bug, please ask it in
our mailing-list at scylladb-dev@googlegroups.com or in our slack channel.
Installation details
Scylla version (or git commit hash): Docker version 3.0.1 / LATEST
Cluster size: Not relevant
OS (RHEL/CentOS/Ubuntu/AWS AMI): Ubuntu (Docker)
Hardware details (for performance issues) Delete if unneeded
Platform (physical/VM/cloud instance type/docker): docker, running on physical node managed on cluster
Hardware: sockets= cores=4 hyperthreading=no memory=16G
Disks: (SSD/HDD, count) SSD, 16GB
I am trying to run Scylla on multiple virtual nodes, on which I have administrator access. The nodes can ping each other and are available on the same network. Currently, I'm trying to get it up and running using Docker, as I have tried beforehand on my local machine (which seemed to be going fine).
Now, on one of the virtual nodes, I am executing the following (simplified command as this already triggers my problem):
sudo docker run --name scylla -it --network host scylladb/scylla
I'm getting the following error, resulting in Scylla not starting up (
error: too many positional options have been specified on the command line
):When removing 'network host' from the docker command, however, Scylla starts as expected.
The text was updated successfully, but these errors were encountered: