GithubHelp home page GithubHelp logo

Used DBs about papka24-core HOT 8 CLOSED

papka24 avatar papka24 commented on June 15, 2024
Used DBs

from papka24-core.

Comments (8)

MaximBelov avatar MaximBelov commented on June 15, 2024

I set 4 DBs up. And then it was start without errors.

from papka24-core.

VladyslavKurmaz avatar VladyslavKurmaz commented on June 15, 2024

@MaximBelov
Thanks!
...
Where can I define cassandra host name?
tried: localhost/127.0.0.1:9042
config.properties has no properties with cassandra substring in the name

from papka24-core.

MaximBelov avatar MaximBelov commented on June 15, 2024

@VladyslavKurmaz
try

docker run -p 127.0.0.1:9042:9042 -i -t scylladb/scylla

base/server/src/main/resources/config.properties

scylla.path=localhost
scylla.keyspace=papka24
scylla.port=9042
scylla.enable=true

from papka24-core.

VladyslavKurmaz avatar VladyslavKurmaz commented on June 15, 2024

@MaximBelov
With docker-compose use localhost is not a case.
As you can see scylla starts listening 9042 port, but server tries to connect to 127.0..0.1

scylla.path=scylla
scylla.keyspace=papka24
scylla.enable=true

Looks like server couldn't read local file with properties
image

from papka24-core.

VladyslavKurmaz avatar VladyslavKurmaz commented on June 15, 2024

@MaximBelov
Looks like, server for some reasons couldn't read parameters from config.properties
Once I hardcode scylla docker-compose DNS name

     scyllaPath = "scylla";//Main.property.getProperty("scylla.path");

server starts working fine.


I run server using next command

java -jar /home/papka-24.jar

Can this cause an error during reading parameters from config.properties?

from papka24-core.

VladyslavKurmaz avatar VladyslavKurmaz commented on June 15, 2024

I added simple output for one of the property and got next log:

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9042 (com.datastax.driver.core.exceptions.TransportException: [localhost/0:0:0:0:0:0:0:1:9042] Cannot connect), localhost/127.0.0.1:9042

INFO: Scanning for root resource and provider classes in the packages:
ua.papka24.server.api
server.domain: 95.85.56.80

I can assume that server tries to connect to the scylla before properties are read.

from papka24-core.

MaximBelov avatar MaximBelov commented on June 15, 2024
  1. Create postgress base papka24

  2. Create user papka24

  3. Replace in file server/src/main/resources/sql/CreateDB.sql
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO papka24_ro;
    with
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO papka24;

  4. Import from CreateDB.sql

  5. docker run -p 127.0.0.1:9042:9042 -i -t scylladb/scylla
    INFO 2017-06-27 21:47:48,896 [shard 0] storage_service - Starting listening for CQL clients on 172.17.0.2:9042...

  6. server/src/main/resources/config.properties
    scylla.path=172.17.0.2
    Recompile jar-file
    gradle shadowJar;

  7. Start your server
    example: java -jar papka-170624.jar

demo without error

from papka24-core.

VladyslavKurmaz avatar VladyslavKurmaz commented on June 15, 2024

@MaximBelov
Thanks!.
Postgres db issue is fixed now.
...
I will raise scylla issue in separate ticket.
...
This issue can be closed.

from papka24-core.

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.