Categories
Development

ResultSetMetadata strange column size for int value

I have a postgres table create table test ( id int, name varchar(2), active boolean, long_id bigint, created timestamptz); ) I want to get name,type,size of each column in this table This is my code public static void main(final String[] args) throws SQLException { final Connection connection = DriverManager.getConnection(“jdbc:postgresql://127.0.0.1:5432/test”, “postgres”, “123”); final DatabaseMetaData metaData = […]

Categories
Development System & Network

Can’t push docker image into GitLab registry

Summary I have self-hosted gitlab, installed with apt. I don’t have git_data_dir in default location (see config). I can’t push docker image into docker registry, directory <shared_path>/registry does not exists. No migrations, no backup/restore procedure, last version. Pushing image from remote device root@remote:cat Dockerfile FROM alpine root@remote:~/playground# docker login gitlab.mydomain.com:5050 Authenticating with existing credentials… WARNING! […]

Categories
Development Linux Ubuntu

Are the default ubuntu/debian systemd cgroups documented?

In numerous systemd man pages on my Ubuntu 18.04.3 system, I see references to machine.slice. I do not seem to have this slice (tested by running several containers and using systemd-cgls) Instead, containers and multiple other items are only shown as belonging to init.scope. I see no reference to this in the man pages. I’m […]

Categories
Development Docker

Unhandled rejection SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432 with dockers

I am trying to build a docker-compose file for my Postgres which uses sequelize as ORM (https://sequelize.org/). Here is my docker-compose.yml version: “2” services: web: build: context : . dockerfile: Dockerfile image : testorganization ports: – “5000:5000” links: – db db: image: postgres expose: – 5432 volumes: – ./data/db:/data/db environment: POSTGRES_HOST: db POSTGRES_DB: postgres POSTGRES_USER: […]

Categories
Development Docker

Unhandled rejection SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432 with dockers

I am trying to build a docker-compose file for my postgres which uses sequelize as ORM. Here is my docker-compose.yml version: “2” services: web: build: context : . dockerfile: Dockerfile image : testorganization ports: – “5000:5000” links: – db db: image: postgres expose: – 5432 volumes: – ./data/db:/data/db environment: POSTGRES_HOST: db POSTGRES_DB: postgres POSTGRES_USER: postgres […]

Categories
Development

allowNull:false and required:true did not validate null string input

My app is running nodejs 10.16 and sequelizejs 5.7 with postgresql 11. The initial connection is setup as: const Sql = require(“sequelize”); const db = new Sql(‘mydb’, ‘postgres’, `${process.env.DB_PASSWORD}`, { host: ‘localhost’, dialect: ‘postgres’, port:5432, } ); A Group model is defined as: const Joi = require(‘@hapi/joi’); const Sql = require(‘sequelize’); const db = require(“../startup/db”); […]

Categories
Development Heroku Ruby

Rails – PG::UndefinedTable: ERROR: relation “customers” does not exist

Rails 5.0.4, Ruby 2.5.1, Postgres, Ubuntu 18.04 I’ve read several posts here in stackoverflow similar to my problem, but nothing that helps me or is similar to mine. Back story I developed a personal app on my laptop. I pushed to github and heroku and everything works just fine. I wanted to be able to […]

Categories
Database Development

Posting from servlet to database is throwing a “column does not exist error”. How can I fix and complete this?

I am new to java and am trying to add appointments to a table in a database using a servlet. I am able to get the information and display it but I cannot figure out how to properly insert new records into my table. Currently, the error is saying that the column named “first” does […]

Categories
Development HTTP

HTTP 404 with Nodejs app on ubuntu 18.04 AWS server running Nginx reverse proxy

I have moved my Nodejs (10.16) app to AWS ubuntu 18.04 running Nginx (17.4) reverse proxy from development after full testing. The problem I have is that there is http 404 to front end React Native request. Here is the log output on my front end: [12:50:39] I | ReactNativeJS ︎ ‘response in signup: ‘, […]

Categories
Database Development

Is there any compliance test suite for SQL Database? [on hold]

For Database Testing, I’m looking for an already-written test suite for SQL Database. (Unit-tests that will allow me to detect common problems in my database) I’m going to work with MySQL, Postgres, SQL Server, etc. So I’ll need tests written in SQL or something that would work with all, rather than T-SQL or PL-SQL. I’ve […]