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

Could not connect to Jasmin http api (http://127.0.0.1:1401) #1065

Open
mecatheclau opened this issue Jul 22, 2022 · 2 comments
Open

Could not connect to Jasmin http api (http://127.0.0.1:1401) #1065

mecatheclau opened this issue Jul 22, 2022 · 2 comments

Comments

@mecatheclau
Copy link

mecatheclau commented Jul 22, 2022

curl -X GET -H 'Authorization: Basic amNsaWFkbWluOmNsaXB3ZA==' http://127.0.0.1:8080/secure/balance
{"title": "Jasmin httpapi connection error", "description": "Could not connect to Jasmin http api (http://127.0.0.1:1401): HTTPConnectionPool(host='127.0.0.1', port=1401): Max retries exceeded with url: /balance?username=jcliadmin&password=clipwd (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2c68570670>: Failed to establish a new connection: [Errno 111] Connection refused'))"}

/etc/jasmin/jasmin.cfg

[http-api]
bind = 0.0.0.0
port = 8088
long_content_max_parts = 5
long_content_split = udh
access_log = /var/log/jasmin/http-access.log
log_level = DEBUG
log_file = /var/log/jasmin/http-api.log
log_format = %(asctime)s %(levelname)-8s %(process)d %(message)s
log_date_format = %Y-%m-%d %H:%M:%S

I tried with port 1401 refused to work I also change the port to 8088 but not listen in listeners

root@ip-172-26-7-147:~# sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8987 0.0.0.0:* LISTEN 2356775/python3
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2205945/nginx: mast
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 2355257/redis-serve
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2356785/python3
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2205945/nginx: mast
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 2400015/systemd-res
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30059/sshd: /usr/sb
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 6489/postgres
tcp6 0 0 ::1:6379 :::* LISTEN 2355257/redis-serve
tcp6 0 0 :::80 :::* LISTEN 2205945/nginx: mast
tcp6 0 0 :::22 :::* LISTEN 30059/sshd: /usr/sb
udp 0 0 127.0.0.53:53 0.0.0.0:* 2400015/systemd-res
udp 0 0 172.26.7.147:68 0.0.0.0:* 2399998/systemd-net
udp6 0 0 fe80::6:5bff:feb4:9:546 :::* 2399998/systemd-net

How to resolve this issue I am using ubuntu 20.4

@agossouvi
Copy link

Looks like there is no support around here anymore..

The contributors have deserted.

@Swabuu
Copy link

Swabuu commented Jul 31, 2022

Hi! Sorry if this is not very helpful but have you created a jasmin user by connecting via telnet & following the steps here -> https://docs.jasminsms.com/en/latest/installation/index.html#create-a-user

The reason I'm asking is because the username & password in your example is the same as the username & password for connecting to telnet.

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