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: read: Input/output error #131

Closed
snbakos opened this issue May 28, 2017 · 8 comments
Closed

ERROR: read: Input/output error #131

snbakos opened this issue May 28, 2017 · 8 comments

Comments

@snbakos
Copy link

snbakos commented May 28, 2017

I have downloaded master and installed in raspberry pi.

I get ERROR: read: Input/output error, can you help me?

log:
sudo openfortivpn --version
1.3.1

sudo openfortivpn -v
DEBUG: Loaded config file "/etc/openfortivpn/config".
DEBUG: Config host = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DEBUG: Config realm = ""
DEBUG: Config port = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DEBUG: Config username = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DEBUG: Config password = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
INFO: Connected to gateway.
INFO: Authenticated.
DEBUG: Cookie: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
INFO: Remote gateway has allocated a VPN.
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
DEBUG: ssl_read_thread
DEBUG: ssl_write_thread
DEBUG: if_config thread
DEBUG: pppd_read_thread
DEBUG: pppd_write thread
DEBUG: gateway ---> pppd (12 bytes)
ERROR: read: Input/output error
INFO: Cancelling threads...
DEBUG: Waiting for pppd to exit...
INFO: Terminated pppd.
INFO: Closed connection to gateway.
DEBUG: Gateway certificate validation failed.
DEBUG: Gateway certificate digest found in white list.
INFO: Logged out.

@mrbaseman
Copy link
Collaborator

This error can appear for several reasons.
Did you check the possible causes discussed in #56 already?

@snbakos
Copy link
Author

snbakos commented May 28, 2017

thanks, for your help

I had to install ppp package
sudo apt-get install ppp

One more (little I hope) problem.

How I can make it autostart and run some iptables commands after start?

If I put it on /etc/rc.local boot hangs because of openfortivpn output, and commands after does not start.

@mrbaseman
Copy link
Collaborator

mrbaseman commented May 28, 2017

Startup scripts quite strongly depend on the distribution you are using. As a template you can use one of some network service like smb or nfs or so, which should already include the proper dependencies that network interfaces should be up and running, have an IP assinged and network routes set up.

If the output of openfortivpn causes trouble, you can decrease verbosity with the -q switch, or you suppress it via &>/dev/null in your startup script.

There are also a few github issues which contain hints that may help you:
#109 is about integration into network manager
in the context of #81 and #107 Debian packages have been built (I'm not sure if they contain startup scripts)
in #116 a GUI for Ubuntu has been presented
#93 was about running as a system daemon (although problems with automatically restarting the service weren't discussed to the end)
Edit: corrected issue number on the last line

@DimitriPapadopoulos
Copy link
Collaborator

Debian and RPM packages do not contain startup scripts, they simply provide the openfortivpn executable.

@mrbaseman
Copy link
Collaborator

Should we include examples? There are traditional init scripts, upstart, system.d, and maybe even more. One could put a proposal for each flavor in the doc directory

@DimitriPapadopoulos
Copy link
Collaborator

I really don't know. I am myself using openfortivpn with one time passwords generated by a token. In that context you cannot use startup scripts and I wasn't even aware there are cases where the VPN should be started automatically.

@mrbaseman
Copy link
Collaborator

Me too, I have mobile tokens which (hopefully) can not be generated in a startup script. Without them, and when storing the password in the config file (which is not recommended) you could start up the vpn during boot after networking has become functional. I don't know how widespread this use case is.
Perhaps we should not encourage people storing their credentials in a file by providing startup scripts that rely on exactly this practice.

@mrbaseman
Copy link
Collaborator

@snbakos did you solve your autostart problem by redirecting the output? The commits from #134 might also be important in this context, so it might be worth trying 1.4.0

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

3 participants