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

Unable to Authenticate (13 INTERNAL: Received RST_STREAM with code 0) using default docker setup method #456

Open
tpallavi99 opened this issue Dec 9, 2022 · 16 comments

Comments

@tpallavi99
Copy link

Describe the bug
After setting up fonoster using docker (DO as well as on AWS) using default methods and then trying to auth via ctl, I get error : 13 INTERNAL: Received RST_STREAM with code 0

To Reproduce
Steps to reproduce the behavior:
ALLOW_INSECURE=true fonoster auth:login
? api endpoint localhost:51051
? access key id fonoster
? access key token
? ready? Yes
13 INTERNAL: Received RST_STREAM with code 0
Accessing endpoint localhost:51051... Invalid credentials or endpoint

Expected behavior
Authentication success

System information (please complete the following):

  • OS: Tried on ubuntu 22.04 / Mac Intel version as well
  • CTL version [0.3.19 ]
@psanders
Copy link
Member

Few questions. Can you docker ps on your instance and show the result? Also, can you share the installation steps? I'm curious to see which environment variables you used.

@tpallavi99
Copy link
Author

Hi @psanders ,
This is the output from docker ps.
image

The fonoster_mediaserver_1 container is always in the starting state. And fonoster_agents_1 is in restarting state. Upon printing the logs for these:

For fonoster_agents_1:
image

For fonoster_mediaserver_1 the logs gave:
image

The command I used for the installation is the default provided one:
`docker run -it --rm
-e CONFIG_PATH=$(pwd)/fonoster/config
--volume /var/run/docker.sock:/var/run/docker.sock
--volume $(pwd)/fonoster:/out:rw
fonoster/fonoster

`

@psanders
Copy link
Member

Can you try again with docker tag fonoster/fonoster:0.3.18?

@tpallavi99
Copy link
Author

Hi @psanders ,
I tried using tag 0.3.18 on a clean install machine on AWS but still it installed 0.3.17-alpha.3 as dependencies.

image

@psanders
Copy link
Member

That sounds like a bug on our side. I will take a look. Something you can try is change the version at fonoster/operator/.env and change the COMPOSE_PROJECT_VERSION to 0.3.18. Then run basic-network.sh stop and basic-network.sh start

@tpallavi99
Copy link
Author

I tried this but did not work either.

@Luskan777
Copy link

I have the same problem

@psanders
Copy link
Member

@Luskan777 @tpallavi99 thanks for reporting this issue.

I'm hoping to find time to take a deeper look at this early next week.

cc: @efraa

@psanders
Copy link
Member

psanders commented Jan 5, 2023

@Luskan777 @tpallavi99 Can you try 0.3.21 and confirm is working for you?

@prsasatt
Copy link

prsasatt commented Jan 13, 2023

0.3.21 is also not working.

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
04d9e28e7151 fonoster/monitor:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_monitor_1
13ab12c2fbf2 fonoster/auth:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_auth_1
0891b6e84d76 fonoster/fluent:0.3.21 "tini -- /bin/entryp…" 2 hours ago Up 2 hours 5140/tcp, 24224/tcp fonoster_logsdriver_1
ff61ecbeb1d3 fonoster/callmanager:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_callmanager_1
503d79afa24d fonoster/redis:0.3.21 "docker-entrypoint.s…" 2 hours ago Up 2 hours (healthy) 6379/tcp fonoster_datasource_1
eec129c9440f fonoster/storage:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_storage_1
207f0e9e0314 fonoster/agents:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_agents_1
d2e3e27b5efb fonoster/providers:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_providers_1
b025297859d9 fonoster/rtpengine:0.3.21 "/entrypoint.sh rtpe…" 2 hours ago Up 2 hours (healthy) fonoster_rtpengine_1
23eb7ab47be7 fonoster/routr:0.3.21 "/tini -v -e 143 -- …" 2 hours ago Up 2 hours (healthy) 4567/tcp, 0.0.0.0:5060-5063->5060-5063/tcp, 0.0.0.0:5060->5060/udp, :::5060-5063->5060-5063/tcp, :::5060->5060/udp fonoster_sipproxy_1
7ae90fab068c fonoster/autoheal:0.3.21 "/docker-entrypoint …" 2 hours ago Up 2 hours (healthy) fonoster_autoheal_1
8a0053fefb5e fonoster/users:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_users_1
11e42757106a fonoster/healthcheck:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours 3000/tcp fonoster_healthcheck_1
a6d09f413026 fonoster/whoami:0.3.21 "/whoami" 2 hours ago Up 2 hours 80/tcp fonoster_placeholder_service_1
97dcf296ded5 fonoster/minio:0.3.21 "/usr/bin/docker-ent…" 2 hours ago Up 2 hours (healthy) 9000/tcp fonoster_fs_1
65edea0f212f fonoster/limiter:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_limiter_1
146a6e03000a fonoster/projects:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_projects_1
168944d62fab fonoster/mediaserver:0.3.21 "tini -v -- /run.sh" 2 hours ago Up About a minute (health: starting) fonoster_mediaserver_1
0aa46929c0b0 fonoster/numbers:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_numbers_1
ece52524af79 fonoster/domains:0.3.21 "tini -v -e 143 -- r…" 2 hours ago Up 2 hours (healthy) 50052/tcp fonoster_domains_1
6dda6f10466d fonoster/elasticsearch:0.3.21 "/bin/tini -- /usr/l…" 2 hours ago Up 2 hours 9200/tcp, 9300/tcp fonoster_logsaggregator_1

@prsasatt
Copy link

prsasatt@prsasatt-conv-1:~/fonoster$ sudo docker logs 168944d62fab | head -50
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Connected!
[
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
Waiting for localhost:8088.
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Waiting for localhost:8088.
Connected!
[
'This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'
]
[INFO tini (1)] Main child exited with signal (with signal 'Terminated')
[INFO tini (1)] Spawned child process '/run.sh' with pid '7'
Unable to open specified master config file '/etc/asterisk/asterisk.conf', using built-in defaults

@psanders
Copy link
Member

psanders commented Apr 8, 2023

@prsasatt have you had any luck with this issue? Also, I just noticed you are using port 51051. Was that intentional?

@preetesh30
Copy link

preetesh30 commented Apr 9, 2023

@psanders, I checked this issue. user_credentials with accessKeyId fonoster generated after docker installation in fonoster/config/user_credentials file doesn't work while authenticating via @fonoster/ctl . It shows invalid credentials or endpoint.
In discord discussion: salami suggested workaround:

  1. Get into the redis container and connect using redis-cli, password is the DS_SECRET value
  2. List the Keys (KEYS *), find the one with kind: User
  3. Decode the accessSecret for user_credentials
  4. Replace the accessKeyId in the decoded data, with the KEY in step 2.
  5. Create a new jwt secret using the value in config/private_key as signing key.
  6. Connect with new accessKeyId & accessKeySecret
    I tried method suggested by salami, it doesn't seem to work.
    Curious,
    [1] Does the following default credential generated should be stored in redis? If yes, then credential generated are not stored in redis container. May be it could be the reason of error while authentication. Please check it
    <{"accessKeyId":"fonoster","accessKeySecret":"eyJ.xxxx","endpoint":null}>
    [2] Also, I don't understand, why endpoint is null.

@psanders
Copy link
Member

psanders commented Apr 9, 2023

@preetesh30 this is very helpful. Do you mind sharing the content of your user_credentials (Please be sure to redact the credentials)

@preetesh30
Copy link

@psanders, Here, I attach arbitrary credentials:
{"accessKeyId":"fonoster","accessKeySecret":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJmb25vc3RlciIsInJvbGUiOiJVU0VSIiwiYWNjZXNzS2V5SWQiOiJmb25vc3RlciIsImlhdCI6MTY4MTA1MTAxNywiZXhwIjoxNzEyNjA4NjE3fQ.ahmjakQ_pYsrQchcHPSuPGUQ64MJohPiZWH-_y19D3o","endpoint":null}

@InformComms
Copy link

Any resolution with for this issue?

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

6 participants