Giter Site home page Giter Site logo

Comments (21)

chunlaw avatar chunlaw commented on June 23, 2024 12

Quick fix: set the isolate-worker in the .conf file to false

My colleague @jonathan-tan has found that it is the problem of the kernel function seccomp_init() and seccomp_rule_add() in the function disable_system_calls in the source code. You can see if you change the auth-timeout in the .conf file from 240 to 10, the reconnecting behaviour occurs every 10 seconds.

Edited: As it is the system function, it is related to Alpine Linux (the docker base image) has overriden alarm() to setitimer() and hence causing the misbehaviour.

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

It seems to be a problem(or designed to?) of ocserv.

This is just a Docker container of ocserv, it cannot solve the program issue running in Docker.

I will keep this open for awhile, and check whether the issue is related to Docker.

from docker-ocserv.

TheNomad11 avatar TheNomad11 commented on June 23, 2024

I observed the same issue. Now I installed a non-docker version of ocserv and the issue disappeared. The reconnecting issue might be related to Docker then

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

@TheNomad11 Thank you for your information. And it reminds me that mine got the same issues, the client will reconnect in a few minutes too. And before we know anything further, it might as you said it could be related to Docker itself.

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

image

hit this just now, running on google cloud on ubuntu 16.04

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

funny part, I used this - https://github.com/evshiron/docker-ocserv - and everything working ok, no reconnects

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

It seems that image is using Fedora as the base image, could it be the problem of the Linux system? Looking into it, thanks again for your information.

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

Are you using AnyConnect as the client, or you are just using OpenConnect as the client? I saw that Dockerfile had disabled Cisco compatibility in the config file.

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

ok, new attempt to use your solution:
docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d tommylau/ocserv

  • result: everything ok, user test working perfectly for 10 minutes.
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -d test
docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd -g "Route,All" tommy
  • result: when I try to connect as user tommy It is not working, in AnyConnect logs:
     10:56:16 AM    Contacting x.x.x.x.
     10:56:22 AM    User credentials entered.
     10:56:26 AM    User credentials entered.
     10:56:26 AM    Connection attempt has failed.
     10:56:26 AM    Ready to connect.

Nothing in docker logs.
and inside container I can see (passwd ommited by me):

/etc/ocserv # cat ocpasswd
tommy:Route,All:$1$xxxxxxxxxxxxx

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

looks like problem in chinese character in group description, for now fixed it by editing ./ocserv.conf
remove 'Route' group and set group 'All' as default

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

@s7lx Do you have time to look into this issue? I'm not using the group function, and I setup ocserv.conf file separately.

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

I guess it is cause I don`t have chinese lang support in my win10, and cisco anyconnect works ok for first connect, then it tries to cache group description, but fails to read cache afterwards. So first connect is ok, but all next fail.

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

Have you ever removed the Chinese characters and have another try? Whether it works correctly or not?

from docker-ocserv.

fxpester avatar fxpester commented on June 23, 2024

yes, I removed them, cleared anyconnect cache, and now I can connect to both groups

from docker-ocserv.

long1215 avatar long1215 commented on June 23, 2024

最新版本还是每4分钟重新连接

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

@long1215 Yup, looks like a program with Docker or maybe something else, which I have no clue at all.

from docker-ocserv.

itshaadi avatar itshaadi commented on June 23, 2024

I have the same problem openconnect keeps saying:

SSL read error: The TLS connection was non-properly terminated.; reconnecting.

it is worth mentioning that this error occurs on a TCP based connection. also UDP packets are unable to reach the server. (I'm guessing that my ISP is responsible for that)

DTLS handshake failed: Error in the push function.
(Is a firewall preventing you from sending UDP packets?)

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

@itshaadi Are you using UDP? Have you ever tried to use TCP protocol?

from docker-ocserv.

itshaadi avatar itshaadi commented on June 23, 2024

UDP is completely blocked in iran. I am using 443/TCP at the moment. and this problem occurs on TCP.

from docker-ocserv.

TommyLau avatar TommyLau commented on June 23, 2024

I cannot reproduce this issue, only the reconnect occurs to me, could it be the low level network issue from your Internet provider?

from docker-ocserv.

itshaadi avatar itshaadi commented on June 23, 2024

DTLS handshake failed: Error in the push function. is indeed a low level network issue from my ISP. as I said UDP ports are completely unreachable. however reconnect error could be an issue related to Docker. or your configuration for ocserv.

from docker-ocserv.

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.