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

"No such file or directory" error #12

Closed
AntouanK opened this issue Jun 27, 2018 · 15 comments
Closed

"No such file or directory" error #12

AntouanK opened this issue Jun 27, 2018 · 15 comments
Assignees
Labels

Comments

@AntouanK
Copy link

Hi there.

I'm trying to use that script in my macbook, but I get this error:

➜  docker-f5fpc git:(master) sudo ./f5fpc-client.py connect.something.com someUser
Enter your VPN password:
2018-06-27 11:26:38,028 INFO (root) Connecting to connect.something.com...
Traceback (most recent call last):
  File "./f5fpc-client.py", line 155, in <module>
    sys.exit(main())
  File "./f5fpc-client.py", line 68, in main
    container_exec(container_name, '/opt/connect.sh')
  File "./f5fpc-client.py", line 132, in container_exec
    process = subprocess.Popen(command_splitted, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I did pip install, and I have python 2.7 installed ( I used brew to install that if I remember correctly ).
Trying a wrong password or removing sudo yields the same error.

Any ideas what's wrong?

@MatthiasLohr
Copy link
Owner

Do you have docker installed on your system? That seems to be a problem when executing /usr/bin/docker (https://github.com/MatthiasLohr/docker-f5fpc/blob/master/f5fpc-client.py#L128).

If that's true, I should consider a test for checking the docker setup.

@AntouanK
Copy link
Author

AntouanK commented Jul 2, 2018

Those lines above were from my macbook.
I have docker installed, but I don't see a /usr/bin/docker.
Seems like it's in /usr/local/bin/docker

➜  docker-f5fpc git:(master) which docker
/usr/local/bin/docker

Btw, I also tried it in a linux box.
Docker is installed in /usr/bin/docker there.

antouank@antergos-vm [09:07:33] [~] 
-> % docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
antouank@antergos-vm [09:07:36] [~] 
-> % file /usr/bin/docker
/usr/bin/docker: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=651a1e6e03c7d193f8781800ec8a53b88199693a, not stripped, with debug_info

But I get this error there.

antouank@antergos-vm [09:10:57] [~/_REPOS_/docker-f5fpc] [master]
-> % sudo ./f5fpc-client.py connect.something.com someuser
  File "./f5fpc-client.py", line 37
    if os.getuid() <> 0 and args.networks and len(args.networks) > 0:
                    ^
SyntaxError: invalid syntax

I actually care more about the linux version, because I want to switch from a macbook to a linux laptop.
Would that script for f5 vpn work there?

@MatthiasLohr
Copy link
Owner

I'm using that script with Ubuntu 17.10 (and was also developed with this OS). It would be nice to get it also running with Mac, so if you are willing to test it there, i would appreciate that.

SyntaxError is fixed in 5332123 (python 3 related).

@AntouanK
Copy link
Author

AntouanK commented Jul 2, 2018

Of course, I'm happy to help you test it on a mac.
Can we also try to make it with my arch distro? ( I use antergos )

@AntouanK
Copy link
Author

AntouanK commented Jul 2, 2018

deleted

@MatthiasLohr
Copy link
Owner

Can you please open a ticket for each problem? Handling multiple problems in a single ticket is quite difficult. Could you also pleas provide your python version? Thx!

@AntouanK
Copy link
Author

AntouanK commented Jul 2, 2018

sure.

-> #13

@MatthiasLohr
Copy link
Owner

@AntouanK could you please test if this is working now? Thx!

@MatthiasLohr MatthiasLohr self-assigned this Jul 10, 2018
@AntouanK
Copy link
Author

AntouanK commented Jul 10, 2018

@MatthiasLohr ok, so in the MacBook Pro, with docker running, this is what I get on this bugfix branch

➜  docker-f5fpc git:(bugfix/dockerpath) ./f5fpc-client.py connect.something.com Antonisk
Enter your VPN password:
2018-07-10 17:23:03,458 INFO (root) Connecting to connect.something.com...
2018-07-10 17:23:06,693 INFO (root) Logging in...
2018-07-10 17:23:07,814 ERROR (root) Login was denied.

@MatthiasLohr
Copy link
Owner

To the error from your first post is gone?

@AntouanK
Copy link
Author

Yes. On master I get it again.

@MatthiasLohr
Copy link
Owner

Merged.

@AntouanK
Copy link
Author

Thank you @MatthiasLohr 👍

Let's hope we'll get the RSA part also done :D

@alex-golts
Copy link
Contributor

I got a similar "No such file or directory" error on Mac, but only when using the "network" flag. Not related to the docker installation issue.
Turned out I had to install iproute2mac (using homebrew) to fix it. FYI

@MatthiasLohr
Copy link
Owner

Added this info to README (b052030). Thx!

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

No branches or pull requests

3 participants