Giter Club home page Giter Club logo

jasmin-web-panel's Introduction

Jasmin Web Panel

travis-ci

Jasmin Web Application to manage Jasmin SMS Gateway

Table Of Contents:

  1. Installing and Deployment
  2. Release Notes
  3. Tracking Issue
  4. Contact Us

Installing and Deployment

Before starting please make sure you have installed and running Jasmin SMS Gateway on your server.

Installation

Download and Extract folder We recommended installing python dependencies in virtualenv

Install dependencies:

This version using python >= 3.5 make sure you have installed on your system.

go to jasmin-web-panel/ and run

cd jasmin-web-panel/
pip install -r requirements.txt
cp Sample.env .env

Preparing your database by running migrate commads:

python manage.py migrate
python manage.py load_new # to load new user
python manage.py collectstatic

These commands used in production server, also you may edit Jasmin SMS Gateway credential connection

TELNET_HOST = 127.0.0.1
TELNET_PORT = 8990
TELNET_USERNAME = jcliadmin
TELNET_PW = jclipwd
TELNET_TIMEOUT = 10

for production make sure DEBUG=False in .env file to ensure security. You may run project manually

python manage.py runserver

Deployment with NGiNX and Systemd

Make sure you have installed gunicorn using pip.

Navigate to /etc/systemd/system and create new service called jasmin-web.service

[Unit]
Description=Jasmin Web Panel
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=jasminwebpanel
PermissionsStartOnly=true
User=username
Group=username
Environment="DJANGO_SETTINGS_MODULE=config.settings.pro"
WorkingDirectory=/opt/jasmin-web-panel
ExecStart=/opt/jasmin-web-panel/env/bin/gunicorn --bind 127.0.0.1:8000 config.wsgi -w 3 --timeout=120 --log-level=error
StandardOutput=file:/opt/jasmin-web-panel/logs/gunicorn.log
StandardError=file:/opt/jasmin-web-panel/logs/gunicorn.log
StandardOutput=journal+console
Restart=on-failure

[Install]
WantedBy=multi-user.target

Reload systemd

sudo systemctl daemon-reload

Now, you can do:

sudo systemctl enable jasmin-web.service
sudo systemctl start jasmin-web.service

To ensure web app running without issue:

sudo systemctl status jasmin-web.service

For NGiNX go to /etc/nginx/sites-available and create a new file jasmin_web

upstream jasmin_web{
    server 127.0.0.1:8000;
}
server {
    listen 80;
    charset utf-8;
    server_name example.com www.example.com;
    client_body_timeout 500;
    client_header_timeout 500;
    keepalive_timeout 500 500;
    send_timeout 30;
    access_log /var/log/nginx/jasmin_web_access.log combined;
    error_log /var/log/nginx/jasmin_web_error.log;

    location / {
        proxy_pass http://jasmin_web;
        proxy_http_version 1.1;
        proxy_read_timeout 86400;
        proxy_redirect     off;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_max_temp_file_size 1600m;
        proxy_buffering off;
        proxy_request_buffering on;
        client_max_body_size 20M;
        client_body_buffer_size  256K;
    }

    location ^~ /media/ {
        root /opt/jasmin-web-panel/public/;
        add_header Accept-Ranges bytes;
    }
    location ^~ /static/ {
        root /opt/jasmin-web-panel/public/;
        add_header Pragma public;
        add_header Cache-Control "public";
        expires 30d;
    }
}

Note: Don't forget to replace example.com with your real domain

Once you are done, test and restart the Nginx Service with:

ln -s /etc/nginx/sites-available/jasmin_web /etc/nginx/sites-enabled/jasmin_web
sudo nginx -t
sudo nginx -s reload
# or sudo service nginx restart
# or sudo systemctl restart nginx

Login information:

Username: admin
Password: secret

Note: Please change the password to avoid the security issue

Deployment using Docker

You could download the built image on docker hub:

docker pull tarekaec/jasmin_web_panel

also, you could build it on your local machine by navigating to the project directory

docker build -f config/docker/slim/Dockerfile -t jasmin_web_panel:1.0 .

You need to configure the environment variable in .env file

DJANGO_SETTINGS_MODULE=config.settings.pro
PRODB_URL=postgres://username:strong_password@postgre_hostname:5432/jasmin_web_db
SYSCTL_HEALTH_CHECK=False # this option is not useful on docker

to start docker container

docker stack deploy -c docker-compose.yml jasmin1

you could check service on terminal

docker service ls | grep jasmin

Submit Log

To work with Submit Log you need to install and configure Submit Log service, make sure you have SUBMIT_LOG (default False) in environment variable:

SUBMIT_LOG=True

Release Notes

What's new in version 2.0.0

  1. UI Improved, jQuery Fixed, jQuery Validation added.
  2. Backend fixing, upgrade to python3 and fresh Django version.
  3. Telnet connector fixing.
  4. Deployment made easier.
  5. Fixing common connection issues.
  6. Simple dashboard initialized.
  7. User Profile, Change Password, Add Avatar.
  8. Activity Log, to log your usage.

What's new in version 2.0.1

  1. Adding Submit Log report (DLR report)

What's new in version 2.0.2

  1. Adding FailOverRouter supports to MT / MO Router

Tracking Issue

You may submit issue here

Contacts

For question and suggestion: [email protected], Join Telegram Channel: https://t.me/jasminwebpanel, all suggestion and questions are welcomed.

jasmin-web-panel's People

Contributors

101t avatar alazark94 avatar dependabot[bot] avatar mawaki avatar rakibulinux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jasmin-web-panel's Issues

error with deploy.py

i keep getting this error when i run python3 deploy.py migrate

AttributeError: module 'collections' has no attribute 'MutableSet'

error when using python for migration

when using this command : python deploy.py migrate

and found many errors, thanks

Traceback (most recent call last):
File "/usr/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/usr/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/usr/lib/python3.8/logging/handlers.py", line 148, in init
BaseRotatingHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/handlers.py", line 55, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/init.py", line 1147, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.8/logging/init.py", line 1176, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/etc/jasmin-web-panel/logs/app.log'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "deploy.py", line 21, in
main()
File "deploy.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/komodo/.local/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/home/komodo/.local/lib/python3.8/site-packages/django/core/management/init.py", line 377, in execute
django.setup()
File "/home/komodo/.local/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/komodo/.local/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/usr/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/usr/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'default'

default password

Hello, I have deploy jasmin-web-panel but not able to login. what is the default user name and password?
Screenshot from 2021-02-22 18-32-43

Add SMPPCCM, HTTPCCM fail

Screen Shot 2021-02-26 at 09 53 28
I got an error when add new connection smppccm, httpccm. but add new group or new user is ok.
I need more help, thanks :(

Password issue

Is there a way to reset the login password..

Thanks
Geeth

html not showing properly

just wondering why the html not showing properly and the image is not showing too. is it related to the NGiNX?

Spaces in Sample.env for telnet settings

Settings for TELNET_* in Sample.env file have spaces in them. If we copy Sample.env to .env file it will makes environ in config/settings/com.py failed to read TELNET_* variables and use default instead.

I found that by removing spaces between = in TELNET_* setting fix the issue.

Jasmin Web Service not start

Hi ,
i am issue facing of jasmin web service starting .

:-sudo systemctl status jasmin-web.service
โ— jasmin-web.service - Jasmin Web Panel
Loaded: loaded (/etc/systemd/system/jasmin-web.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-08-18 15:26:28 IST; 4s ago
Process: 44965 ExecStart=/opt/jasmin-web-panel/env/bin/gunicorn --bind 127.0.0.1:8000 config.wsgi -w 3 --timeout=120 --log-level=e>
Main PID: 44965 (code=exited, status=217/USER)

Aug 18 15:26:28 inextrix-virtual-machine systemd[1]: Started Jasmin Web Panel.
Aug 18 15:26:28 inextrix-virtual-machine systemd[44965]: jasmin-web.service: Failed to determine user credentials: No such process
Aug 18 15:26:28 inextrix-virtual-machine systemd[44965]: jasmin-web.service: Failed at step USER spawning /opt/jasmin-web-panel/env/bi>
Aug 18 15:26:28 inextrix-virtual-machine systemd[1]: jasmin-web.service: Main process exited, code=exited, status=217/USER
Aug 18 15:26:28 inextrix-virtual-machine systemd[1]: jasmin-web.service: Failed with result 'exit-code'.

Installing requirements emit error on Fedora 38

Hello there I was trying to execute this command
pip install -r requirements.txt but I it didn't completed successively, check out the log.

Installing collected packages: pysha3, itypes, django-autoslug, zope.event, xlrd, user-agents, uritemplate, tablib, sqlparse, psycopg2-binary, Markdown, importlib-metadata, gunicorn, greenlet, dnspython, django-environ, asgiref, gevent, email-validator, Django, coreschema, djangorestframework, django-jet-reboot, django-filter, django-crequest, coreapi
  DEPRECATION: pysha3 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pysha3 ... error
  error: subprocess-exited-with-error
  
  ร— Running setup.py install for pysha3 did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [20 lines of output]
      running install
      /usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      copying sha3.py -> build/lib.linux-x86_64-cpython-311
      running build_ext
      building '_pysha3' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/Modules
      creating build/temp.linux-x86_64-cpython-311/Modules/_sha3
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPY_WITH_KECCAK=1 -I/usr/include/python3.11 -c Modules/_sha3/sha3module.c -o build/temp.linux-x86_64-cpython-311/Modules/_sha3/sha3module.o
      In file included from Modules/_sha3/sha3module.c:20:
      Modules/_sha3/backport.inc:78:10: fatal error: pystrhex.h: No such file or directory
         78 | #include "pystrhex.h"
            |          ^~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/lib64/ccache/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

ร— Encountered error while trying to install package.
โ•ฐโ”€> pysha3

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

View messages.log / http-api.log in web UI

I'm looking for the best way to implement the ability for my employees to view the log files, specifically messages.log and htp-api.log, as well as the logs from the configured SMPPCCM's in the web UI (it is infeasible to give them all SSH access...).

Submit Log issue in docker !

Hello
I installed Jasmin SMS Gateway, and Jasmin web panel successfully docker but I have an issue to setup the Submit Log in the docker with the project, can you help me do it?
** jasmin web panel compose file**


services:
  jasmin_web:
    image: tarekaec/jasmin_web_panel:1.1
    ports:
      - "8077:8000"
    deploy:
      replicas: 1
      update_config:
        order: start-first
    env_file:
      - .env
    environment:
      DEBUG: '1'
      DJANGO_SETTINGS_MODULE: config.settings.pro
      ALLOWED_HOSTS: '*'
      PRODB_URL: postgres://jasmin:jasmin@jasmin_postgres:5432/jasmin
      REDIS_URI: redis://jasmin_redis:6379/1
      TELNET_HOST: 10.0.10.5
      SUBMIT_LOG: 1
    volumes:
      - web_public:/app/public
      - web_logs:/app/logs
    depends_on:
      - jasmin_redis
      - jasmin_postgres

  jasmin_celery:
    image: tarekaec/jasmin_web_panel:1.1
    entrypoint: bash ./docker-entrypoint-celery.sh
    deploy:
      replicas: 1
    env_file:
      - .env
    environment:
      DEBUG: 0
      PRODB_URL: postgres://jasmin:[email protected]:5432/jasmin
      DJANGO_SETTINGS_MODULE: config.settings.pro
      CELERY_BROKER_URL: redis://jasmin_redis:6379/0
      CELERY_RESULT_BACKEND: redis://jasmin_redis:6379/0
      CELERY_LOG_LEVEL: info
    healthcheck:
      disable: true
    depends_on:
      - jasmin_redis
      - jasmin_postgres

  jasmin_redis:
    image: redis:alpine
    tty: true
    volumes:
      - redis_data:/data
    command:
      - 'redis-server'
      - '--appendonly yes'
      - '--save 60 1'
    environment:
      REDIS_REPLICATION_MODE: master
      ALLOW_EMPTY_PASSWORD: "yes"

  sms_logger:  # New service
    image: tarekaec/jasmin_log:1.1
    volumes:
      - ./config/docker/jasmin/jasmin/resource/amqp0-9-1.xml:/etc/jasmin/resource/amqp0-9-1.xml  
    environment:
      DB_TYPE_MYSQL: '0'  # Indicates the use of PostgreSQL
      DB_HOST: '127.0.0.1'  # Hostname or IP for your database
      DB_DATABASE: 'jasmin'  # The name of your database
      DB_USER: 'jasmin'  # The user for your database
      DB_PASS: 'jasmin'  # The password for your database
  jasmin_postgres:
    image: postgres:latest
    environment:
      POSTGRES_USER: jasmin
      POSTGRES_PASSWORD: jasmin
      POSTGRES_DB: jasmin
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  redis_data:
    driver: local
  web_public:
    driver: local
  web_logs:
    driver: local
  postgres_data:
    driver: local

networks:
  default:
    external:
      name: jasmin_swarm_network

jasmin compose file


services:
  redis:
    image: redis:alpine
    restart: unless-stopped
    healthcheck:
      test: redis-cli ping | grep PONG
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  rabbit-mq:
    image: rabbitmq:3.10-management-alpine
    restart: unless-stopped
    healthcheck:
      test: rabbitmq-diagnostics -q ping
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  prometheus:
    image: prom/prometheus:latest
    restart: unless-stopped
    ports:
      - '9091:9090'
    volumes:
      - ./docker/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
      - monitoring_data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/etc/prometheus/console_libraries'
      - '--web.console.templates=/etc/prometheus/consoles'
      - '--web.enable-lifecycle'
    depends_on:
      - jasmin
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  grafana:
    image: grafana/grafana
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource"
    volumes:
      - ./docker/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
      - ./docker/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
      - ./docker/grafana/dashboards:/opt/grafana-dashboards:ro

      - monitoring_data:/var/lib/grafana
    depends_on:
      - prometheus
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  jasmin:
    build:
      context: ./
      dockerfile: ./docker/Dockerfile.dev
    restart: unless-stopped
    volumes:
      - ./jasmin:/usr/jasmin/jasmin
    ports:
      - 2777:2775
      - 9880:8990
      - 1404:1401
    depends_on:
      redis:
        condition: service_healthy
      rabbit-mq:
        condition: service_healthy
    environment:
      REDIS_CLIENT_HOST: redis
      AMQP_BROKER_HOST: rabbit-mq
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

volumes:
  monitoring_data: { }
 

networks:
  default:
    external:
      name: jasmin_swarm_network

Selecting multiple filters via UI not working

In the MT router definition using jcli, you can add multiple filters, delimited by a semicolon.

Observed behaviour:

jcli : mtrouter -a
Adding a new MT Route: (ok: save, ko: exit)
type StaticMTRoute
jasmin.routing.Routes.StaticMTRoute arguments:
filters, connector
filters filter_1;filter_2
order 10
connector smppc(smppcc_1)
rate 0.0
ok

See here: Check the documentation here: https://docs.jasminsms.com/en/latest/management/jcli/modules.html#mt-router-manager

However, when I select "Add New" under MT Router the UI grants me the ability to select multiple SMPP connectors and filters, but when I click "Add new MT router", only the first in the list is selected, confirmed by the output in jcli (mtrouter -l)

Programming Error at relation "django_site" does not exist

Hi, friend @101t,
Can you please take a look why I'm getting this error?

relation "django_site" does not exist
LINE 1: ..."django_site"."domain", "django_site"."name" FROM "django_si...
                                                             ^
Request Method: GET
http://76.25.81.158:8000/
4.2.11
ProgrammingError
relation "django_site" does not exist LINE 1: ..."django_site"."domain", "django_site"."name" FROM "django_si... ^
/usr/local/lib/python3.10/dist-packages/psycopg/cursor.py, line 732, in execute
main.web.views.home.dashboard_view
/usr/bin/python3
3.10.12
['/opt/jasmin-web-panel', '/opt/jasmin-web-panel', '/usr/local/bin', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']

image

Error While installing Web Interface

DEPRECATION: distro-info 0.23ubuntu1 has a non-standard version number. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of distro-info or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at pypa/pip#12063
DEPRECATION: python-debian 0.1.36ubuntu1 has a non-standard version number. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of python-debian or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at pypa/pip#12063
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

and
python deploy.py migrate
python: can't open file 'deploy.py': [Errno 2] No such file or directory

Please suggest on this how to install.

Installing on different server

Is it possible to install on different server for example jasmin installed on server a than this gui installed on server b

Thanks

error message when doing pip install -r requirements.txt

Hello, I got this error message when doing pip install, my server is ubuntu 20.4, thank you, appreciated.

Using cached psycopg2-2.8.5.tar.gz (380 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2sanyi4y/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-2sanyi4y/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info
cwd: /tmp/pip-install-2sanyi4y/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info/psycopg2.egg-info
writing /tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-2sanyi4y/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Missing docker-entrypoint.yml file for docker deployment

In the main Readme, under Deployment using Docker heading, there is following command to execute
docker stack deploy -c docker-entrypoint.yml jasmin1

But there neither is a construct it nor is a sample file

Please add it or help me if I am misunderstanding the instructions here

Does not allow you to create Failover MT Route

DefaultRoute: A route without a filter, this one can only set with the lowest order to be a default/fallback route
StaticMTRoute: A basic route with Filters and one Connector
RandomRoundrobinMTRoute: A route with Filters and many Connectors, will return a random Connector if its Filters are matching, can be used as a load balancer route
FailoverMTRoute: A route with Filters and many Connectors, will return an available (connected) Connector if its Filters are matched

Hi i try to start jasmin-web.service but getting failed

sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$ sudo nano jasmin-web.service
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$ sudo systemctl daemon-reload
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$ sudo systemctl enable jasmin-web.service
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$ sudo systemctl start jasmin-web.service
sms@iZrj9f22ge5wsb14ybl485Z:/etc/systemd/system$ sudo systemctl status jasmin-web.service
ร— jasmin-web.service - Jasmin Web Panel
Loaded: loaded (/etc/systemd/system/jasmin-web.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-01-31 21:24:43 CST; 3s ago
Process: 2260 ExecStart=/opt/jasmin-web-panel/env/bin/gunicorn --bind 127.0.0.1:8000 config.wsgi -w 3 --timeout=120 --log-l>
Main PID: 2260 (code=exited, status=222/STDERR)
CPU: 2ms

Jan 31 21:24:43 iZrj9f22ge5wsb14ybl485Z systemd[1]: jasmin-web.service: Scheduled restart job, restart counter is at 5.
Jan 31 21:24:43 iZrj9f22ge5wsb14ybl485Z systemd[1]: Stopped Jasmin Web Panel.
Jan 31 21:24:43 iZrj9f22ge5wsb14ybl485Z systemd[1]: jasmin-web.service: Start request repeated too quickly.
Jan 31 21:24:43 iZrj9f22ge5wsb14ybl485Z systemd[1]: jasmin-web.service: Failed with result 'exit-code'.
Jan 31 21:24:43 iZrj9f22ge5wsb14ybl485Z systemd[1]: Failed to start Jasmin Web Panel.

Deploy.py issue

when i run
sudo python deploy.py migrate

I get the following error

File "deploy.py", line 16
   ) from exc
        ^
SyntaxError: invalid syntax

deploy.py missing

getting "can't open file 'deploy.py': [Errno 2] No such file or directory" on following command regarding database preparation

python3 deploy.py migrate

Load-Persist configuration files

Hi! I started using your web panel and it's great.
But i wanted to know how do you handle loading / persisting jasmin configuration files!

The command was not found or was not executable telnet, jasmin-web-panel with docker

I am trying to use the docker compose yaml file to configure jasmin with jasmin-web-panel

When I open the panel this error appears in the response of all api
The command was not found or was not executable: telnet.

docker-compose.yaml:

version: "3.9"

services:
  redis:
    image: redis:alpine
    container_name: jasmin_redis
    tty: true
    volumes:
      - redis_data:/data
    command:
      - 'redis-server'
      - '--appendonly yes'
      - '--save 60 1'
    restart: unless-stopped
    environment:
      REDIS_REPLICATION_MODE: master
      ALLOW_EMPTY_PASSWORD: "yes"

  rabbit-mq:
    image: rabbitmq:alpine
    container_name: jasmin_rabbit-mq
    restart: unless-stopped

  jasmin:
    image: jookies/jasmin:0.10
    restart: unless-stopped
    container_name: jasmin
    volumes:
      - jasmin_log:/var/log/jasmin
      - jasmin_store:/etc/jasmin/store
      - jasmin_conf:/etc/jasmin
    ports:
      - 2775:2775
      - 8990:8990
      - 1401:1401
    depends_on:
      - redis
      - rabbit-mq
    environment:
      REDIS_CLIENT_HOST: redis
      AMQP_BROKER_HOST: rabbit-mq
    networks:
      - jasmin

  postgresdb:
    image: postgres
    # container_name: postgres
    container_name: postgresdb
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=123
      - POSTGRES_DB=jasmin_web_db
    ports:
      - "5433:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data
    networks:
      - jasmin

  jasmin_web:
    # image: jasmin_web_panel:1.0
    image: tarekaec/jasmin_web_panel:1.0-alpine
    # restart: unless-stopped
    ports:
      - "8000:8000"
    deploy:
      replicas: 1
    # env_file:
    #   - .env
    environment:
      - JASMIN_PORT=8000
      - DEBUG=True
      # - SECRET_KEY=8na#(#x@0i*3ah%&$-q)b&wqu5ct_a3))d8-sqk-ux*5*lolwb
      - DJANGO_SETTINGS_MODULE=config.settings.pro
      - ADMIN_URL=admin/
      - TIME_ZONE=Etc/GMT-3
      - LANGUAGE_CODE=en
      - SITE_ID=1
      # - MYSQLDB_URL=mysql://root:123456@mysqldb/jasmin_web_db
      - SQLITE3_URL=sqlite:///db.sqlite3
      - POSTGRE_URL=postgres://postgres:123@postgresdb:5432/jasmin_web_db
      - DEVDB_URL=sqlite:///db.sqlite3
      - PRODB_URL=postgres://postgres:123@postgresdb:5432/jasmin_web_db
      # - REDIS_HOST=127.0.0.1
      # - REDIS_PORT=6379
      # - REDIS_DB=0
      - ACTIVE_APP=web
      - ALLOWED_HOSTS=*
      - TELNET_HOST=127.0.0.1
      - TELNET_PORT=8990
      - TELNET_USERNAME=jcliadmin
      - TELNET_PW=jclipwd
      - TELNET_TIMEOUT=10
      - SUBMIT_LOG=True
      - SYSCTL_HEALTH_CHECK=False
      - SYSCTL_HEALTH_CHECK_SERVICES=jasmind
    healthcheck:
      disable: true
    volumes:
      - ./jasmin-web:/jasmin/public
    depends_on:
      - redis
      - jasmin
      - postgresdb
    links:
      - postgresdb
    networks:
      - jasmin

  jasmin_celery:
    # image: jasmin_web_panel:1.0
    image: tarekaec/jasmin_web_panel:1.0-alpine
    # restart: unless-stopped
    deploy:
      replicas: 1
    # env_file:
    #   - .env
    environment:
      - DEBUG=True
      # - SECRET_KEY=8na#(#x@0i*3ah%&$-q)b&wqu5ct_a3))d8-sqk-ux*5*lolwb
      - DJANGO_SETTINGS_MODULE=config.settings.pro
      - ADMIN_URL=admin/
      - TIME_ZONE=Etc/GMT-3
      - LANGUAGE_CODE=en
      - SITE_ID=1
      # - MYSQLDB_URL=mysql://root:123456@mysqldb/jasmin_web_db
      - SQLITE3_URL=sqlite:///db.sqlite3
      - POSTGRE_URL=postgres://postgres:123@postgresdb:5432/jasmin_web_db
      - DEVDB_URL=sqlite:///db.sqlite3
      - PRODB_URL=postgres://postgres:123@postgresdb:5432/jasmin_web_db
      # - REDIS_HOST=127.0.0.1
      # - REDIS_PORT=6379
      # - REDIS_DB=0
      - ACTIVE_APP=web
      - ALLOWED_HOSTS=*
      - TELNET_HOST=127.0.0.1
      - TELNET_PORT=8990
      - TELNET_USERNAME=jcliadmin
      - TELNET_PW=jclipwd
      - TELNET_TIMEOUT=10
      - SUBMIT_LOG=True
      - SYSCTL_HEALTH_CHECK=False
      - SYSCTL_HEALTH_CHECK_SERVICES=jasmind
    healthcheck:
      disable: true
    depends_on:
      - redis
      - jasmin
      - postgresdb
    entrypoint: /jasmin/celery_run.sh
    links:
      - postgresdb
    # networks:
    #   - jasmin

volumes:
  redis_data:
    driver: local
  pgdata:
    driver: local
  jasmin_log:
    driver: local
  jasmin_store:
    driver: local
  jasmin_conf:
    driver: local

networks:
  jasmin:

Screenshot from 2022-09-19 18-12-21
Screenshot from 2022-09-19 18-15-15
Screenshot from 2022-09-19 18-15-36

response error:
https://drive.google.com/file/d/1fhmAeSTEMQL_gg511WLIrTVtlgjzwuAm/view?usp=sharing

Failed to start gunicorn server

โ— jasmin-web.service - Jasmin Web Panel
Loaded: loaded (/etc/systemd/system/jasmin-web.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-07-18 18:47:29 UTC; 8s ago
Process: 12551 ExecStart=/home/dev/jasmin-web-panel/env/bin/gunicorn --bind 0.0.0.0:8000 config.wsgi -w 3 --timeout=120 --log>
Main PID: 12551 (code=exited, status=203/EXEC)

Jul 18 18:47:29 cyfubuntu systemd[1]: jasmin-web.service: Scheduled restart job, restart counter is at 5.
Jul 18 18:47:29 cyfubuntu systemd[1]: Stopped Jasmin Web Panel.
Jul 18 18:47:29 cyfubuntu systemd[1]: jasmin-web.service: Start request repeated too quickly.
Jul 18 18:47:29 cyfubuntu systemd[1]: jasmin-web.service: Failed with result 'exit-code'.
Jul 18 18:47:29 cyfubuntu systemd[1]: Failed to start Jasmin Web Panel.

python deploy.py migrate not works Ubuntu 18

username@ns3075654:/var/www/html$ python --version
Python 3.5.0
username@ns3075654:/var/www/html$ python deploy.py migrate
Traceback (most recent call last):
File "deploy.py", line 10, in main
from django.core.management import execute_from_command_line
ImportError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "deploy.py", line 21, in
main()
File "deploy.py", line 16, in main
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

User deafult

To reset the password I need the username, can u tell me that default user name of Jasmin web panel

psycopg2.OperationalError: server closed the connection unexpectedly

Traceback (most recent call last):
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection
self.connect()
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/src/jasmin-web-panel/env/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Is the error I'm seeing...Any advice?

can not add more than 3 users

when I try to add more than 3 users it just replaces the last user and the list of users keeps being not more than three, but when I add a user via Jasmin CLI manually all fine, and the web panel shows 4 users but still can not add more via web panel.

jasmin_celery docker don't start

Hello,
i'm trying to setup jasmin web panel using docker compose, and the jasmin_celery is failing to start with that error:

jasmin-web-panel_celery | /usr/local/lib/python3.8/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
jasmin-web-panel_celery | absolutely not recommended!
jasmin-web-panel_celery | 
jasmin-web-panel_celery | Please specify a different user using the --uid option.
jasmin-web-panel_celery | 
jasmin-web-panel_celery | User information: uid=0 euid=0 gid=0 egid=0
jasmin-web-panel_celery | 
jasmin-web-panel_celery |   warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
jasmin-web-panel_celery exited with code 0

and here my docker-compose file:

version: '3.7'

services:
  jasmin_web:
    image: tarekaec/jasmin_web_panel:1.0
    container_name: jasmin-web-panel_web
    ports:
      - 8000:8000
    env_file:
      - .env
    environment:
      JASMIN_PORT: 8000
    healthcheck:
      disable: true
    volumes:
      - /opt/jasmin-web-panel/_data/public:/web/public
    depends_on:
      - db
    networks:
      - jasmin

  jasmin_celery:
    image: tarekaec/jasmin_web_panel:1.0
    container_name: jasmin-web-panel_celery
    env_file:
      - .env
    environment:
      DEBUG: 0
    healthcheck:
      disable: true
    depends_on:
      - jasmin_web_redis
    entrypoint: /web/celery_run.sh
    networks:
      - jasmin

  jasmin_web_redis:
    image: redis:alpine
    container_name: jasmin-web-panel_redis
    tty: true
    networks:
      - jasmin

networks:
  jasmin:
    external: true

any idea on how to solve that?

Thanks

Not Connecting to server

Traceback (most recent call last):
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection
self.connect()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect
self.connection = self.get_new_connection(conn_params)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection
connection = Database.connect(**conn_params)
File "/var/www/html/newenv/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "deploy.py", line 21, in
main()
File "deploy.py", line 17, in main
execute_from_command_line(sys.argv)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/base.py", line 369, in execute
output = self.handle(*args, **options)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 86, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in init
self.loader = MigrationLoader(self.connection)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 49, in init
self.build_graph()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 212, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 76, in applied_migrations
if self.has_table():
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 56, in has_table
return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 260, in cursor
return self._cursor()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 236, in _cursor
self.ensure_connection()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection
self.connect()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection
self.connect()
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect
self.connection = self.get_new_connection(conn_params)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/var/www/html/newenv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection
connection = Database.connect(**conn_params)
File "/var/www/html/newenv/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432

What could be the possible fault?

Cant Login to Panel

I run the panel but can't login with default username / password { admin - secret} , i tried to reset the password through this command line python manage.py changepassword admin but it give me an error user 'admin' does not exist

File name or path Required

Hi,
Which file and path i edit or add below

TELNET_HOST = 127.0.0.1
TELNET_PORT = 8990
TELNET_USERNAME = jcliadmin
TELNET_PW = jclipwd
TELNET_TIMEOUT = 10

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.