Greg86
Greg86

Reputation: 67

JFROG Artifactory installation and setup error 404

Dear who may read this topic,

I'm looking for help in setting up properly my jfrog oss. I downloaded and unpacked the package suggested in the installation steps. I modified the ports in the docker-compose.yaml and ran a shot. Error 404 - http://0.0.0.0:8184/artifactory

Below the outputs of several files and execution.

System Diagnostic

└──╼ $sudo ./systemDiagnostics.sh 

************** Start Artifactory Diagnostics *******************

Discovered compose installer, proceeding with var directory as :[/root/.jfrog/artifactory/var]


******************************** CHECK PORTS AVAILABLITY
********************************

Running: lsof -i:$ports_needed [ERROR] RESULT: NOT OK
---


Access 8040 AVAILABLE AccessGrpc 8045 AVAILABLE MetaData 8086 AVAILABLE FrontEnd 8070 AVAILABLE Replicator 8048 AVAILABLE Router 8046 AVAILABLE RouterTraefik 8049 AVAILABLE RouterGrpc 8047 AVAILABLE

[ERROR] Artifactory 8184 NOT AVAILABLE used by processName docker-pr processId 30261 [ERROR] Either stop the process or change the port by configuring artifactory.port in system.yaml

[ERROR] RouterExternal 8183 NOT AVAILABLE used by processName docker-pr processId 30274 [ERROR] Either stop the process or change the port by configuring router.entrypoints.externalPort in system.yaml


******************************** CHECKING MAX OPEN FILES
********************************

Running: ulimit -n [ERROR] RESULT: NOT OK
---

[ERROR] Number found 1024 is less than recommended minimum of 32000 for USER "root"


******************************** CHECKING MAX OPEN PROCESSES
********************************

Running: ulimit -u RESULT: OK

******************************** CHECK FIREWALL SETTINGS
********************************

RESULT: FirewallD is not configured

******************************** CHECK FIREWALL IPTABLES SETTINGS
********************************

Running: iptables -L INPUT -n -v | grep $ports_needed | grep -i -E "REJECT|DROP" RESULT: OK

Artifactory 8184 AVAILABLE Access 8040 AVAILABLE AccessGrpc 8045 AVAILABLE MetaData 8086 AVAILABLE FrontEnd 8070 AVAILABLE Replicator 8048 AVAILABLE Router 8046 AVAILABLE RouterExternal 8183 AVAILABLE RouterTraefik 8049 AVAILABLE RouterGrpc 8047 AVAILABLE


******************************** CHECK FIREWALL IP6TABLES SETTINGS
********************************

Running: ip6tables -L INPUT -n -v | grep $ports_needed | grep -i -E "REJECT|DROP" RESULT: OK

Artifactory 8184 AVAILABLE Access 8040 AVAILABLE AccessGrpc 8045 AVAILABLE MetaData 8086 AVAILABLE FrontEnd 8070 AVAILABLE Replicator 8048 AVAILABLE Router 8046 AVAILABLE RouterExternal 8183 AVAILABLE RouterTraefik 8049 AVAILABLE RouterGrpc 8047 AVAILABLE


******************************** CHECKING LOCALHOST PING
********************************

Running: ping localhost -c 1 > /dev/null 2>&1 RESULT: OK

******************************** PROXY LIST
********************************

Checking proxy configured in HTTP_PROXY RESULT: OK Checking proxy configured in HTTPS_PROXY RESULT: OK Checking proxy configured in NO_PROXY RESULT: OK Checking proxy configured in ALL_PROXY RESULT: OK

************** End Artifactory Diagnostics *******************

docker-compose.yaml

version: '3' services:   postgres:
    image: ${DOCKER_REGISTRY}/postgres:9.6.11
    container_name: postgresql
    environment:
     - POSTGRES_DB=artifactory
     - POSTGRES_USER=artifactory
     - POSTGRES_PASSWORD=r00t
    ports:
      - 5437:5437
    volumes:
     - ${ROOT_DATA_DIR}/var/data/postgres/data:/var/lib/postgresql/data
     - /etc/localtime:/etc/localtime:ro
    restart: always
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "10"
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000   artifactory:
    image: ${DOCKER_REGISTRY}/jfrog/artifactory-oss:${ARTIFACTORY_VERSION}
    container_name: artifactory
    volumes:
     - ${ROOT_DATA_DIR}/var:/var/opt/jfrog/artifactory
     - /etc/localtime:/etc/localtime:ro
    restart: always
    depends_on:
    - postgres
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    environment:
      - JF_ROUTER_ENTRYPOINTS_EXTERNALPORT=${JF_ROUTER_ENTRYPOINTS_EXTERNALPORT}
    ports:
      - ${JF_ROUTER_ENTRYPOINTS_EXTERNALPORT}:${JF_ROUTER_ENTRYPOINTS_EXTERNALPORT}
# for router communication
      - 8185:8185 # for artifactory communication
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "10"

system.yaml

──╼ $sudo cat /root/.jfrog/artifactory/var/etc/system.yaml 
shared:
  node:
    ip: 127.0.1.1
    id: parrot
    name: parrot
  database:
    type: postgresql
    driver: org.postgresql.Driver
    password: r00t
    username: artifactory
    url: jdbc:postgresql://127.0.1.1:5437/artifactory
router:
  entrypoints:
    externalPort: 8185

Could someone please help me out through this issue ?

EDIT 1.

catalina localhost.log

04-Jun-2020 07:07:55.585 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath 04-Jun-2020 07:07:55.624 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Using artifactory.home at '/opt/jfrog/artifactory' resolved from: System property 04-Jun-2020 07:07:58.411 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext 04-Jun-2020 07:09:59.503 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext

console.log 2020-06-03T21:16:48.869Z [1;32m[jfrt ][0;39m [34m[INFO ][0;39m [ ] [o.j.c.w.FileWatcher:147 ] [Thread-5 ] - Starting watch of folder configurations 2020-06-03T21:16:48.938L [35m[tomct][0m [SEVERE] [ ] [org.apache.tomcat.jdbc.pool.ConnectionPool] [org.apache.tomcat.jdbc.pool.ConnectionPool init] - Unable to create initial connections of pool. org.postgresql.util.PSQLException: Connection to 127.0.1.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

.env

## This file contains environment variables used by the docker-compose yaml files

## IMPORTANT: During installation, this file may be updated based on user choices or existing configuration

## Docker registry to fetch images from
DOCKER_REGISTRY=docker.bintray.io

## Version of artifactory to install
ARTIFACTORY_VERSION=7.5.5

## The Installation directory for Artifactory. IF not entered, the script will prompt you for this input. Default [$HOME/.jfrog/artifactory]
ROOT_DATA_DIR=/root/.jfrog/artifactory

# Router external port mapping. This property may be overridden from the system.yaml (router.entrypoints.externalPort)
JF_ROUTER_ENTRYPOINTS_EXTERNALPORT=8185

EDIT 2. I'm facing the same issue when trying to follow another tutorial.

artifactory@1cdf04cd9ed1:/opt/jfrog/artifactory/app/bin$ ./systemDiagnostics.sh           

************** Start Artifactory Diagnostics *******************

Discovered debian installer, proceeding with var directory as :[/opt/jfrog/artifactory/var]


********************************
CHECK PORTS AVAILABLITY
********************************

Running: lsof -i:$ports_needed
RESULT: OK

Artifactory 8081 AVAILABLE
Access 8040 AVAILABLE
AccessGrpc 8045 AVAILABLE
MetaData 8086 AVAILABLE
FrontEnd 8070 AVAILABLE
Replicator 8048 AVAILABLE
Router 8046 AVAILABLE
RouterExternal 8082 AVAILABLE
RouterTraefik 8049 AVAILABLE
RouterGrpc 8047 AVAILABLE


********************************
CHECKING MAX OPEN FILES
********************************

BusyBox v1.30.1 (2019-02-14 18:11:39 UTC) multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

        -H      Add 'filename:' prefix
        -h      Do not add 'filename:' prefix
        -n      Add 'line_no:' prefix
        -l      Show only names of files that match
        -L      Show only names of files that don't match
        -c      Show only count of matching lines
        -o      Show only the matching part of line
        -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
        -v      Select non-matching lines
        -s      Suppress open and read errors
        -r      Recurse
        -i      Ignore case
        -w      Match whole words only
        -x      Match whole lines only
        -F      PATTERN is a literal (not regexp)
        -E      PATTERN is an extended regexp
        -m N    Match up to N times per file
        -A N    Print N lines of trailing context
        -B N    Print N lines of leading context
        -C N    Same as '-A N -B N'
        -e PTRN Pattern to match
        -f FILE Read pattern from file
[WARN] User does not exist, skipping max open files check for this user

********************************
CHECKING MAX OPEN PROCESSES
********************************

BusyBox v1.30.1 (2019-02-14 18:11:39 UTC) multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)

        -H      Add 'filename:' prefix
        -h      Do not add 'filename:' prefix
        -n      Add 'line_no:' prefix
        -l      Show only names of files that match
        -L      Show only names of files that don't match
        -c      Show only count of matching lines
        -o      Show only the matching part of line
        -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
        -v      Select non-matching lines
        -s      Suppress open and read errors
        -r      Recurse
        -i      Ignore case
        -w      Match whole words only
        -x      Match whole lines only
        -F      PATTERN is a literal (not regexp)
        -E      PATTERN is an extended regexp
        -m N    Match up to N times per file
        -A N    Print N lines of trailing context
        -B N    Print N lines of leading context
        -C N    Same as '-A N -B N'
        -e PTRN Pattern to match
        -f FILE Read pattern from file
[WARN] User does not exist, skipping max open processes check for this user

********************************
CHECK FIREWALL SETTINGS
********************************

RESULT: FirewallD is not configured

********************************
CHECK FIREWALL IPTABLES SETTINGS
********************************

RESULT: Iptables is not configured

********************************
CHECK FIREWALL IP6TABLES SETTINGS
********************************

RESULT: Ip6tables is not configured

********************************
CHECKING LOCALHOST PING
********************************

Running: ping localhost -c 1 > /dev/null 2>&1
[ERROR] RESULT: NOT OK
---

[ERROR] Unable to resolve localhost. check if localhost is well defined in /etc/hosts

********************************
PROXY LIST
********************************

Checking proxy configured in HTTP_PROXY
RESULT: OK
Checking proxy configured in HTTPS_PROXY
RESULT: OK
Checking proxy configured in NO_PROXY
RESULT: OK
Checking proxy configured in ALL_PROXY
RESULT: OK

************** End Artifactory Diagnostics *******************

artifactory@1cdf04cd9ed1:/opt/jfrog/artifactory/app/bin$ cat /etc/host
host.conf  hostname   hosts      
artifactory@1cdf04cd9ed1:/opt/jfrog/artifactory/app/bin$ cat /etc/host
host.conf  hostname   hosts      
artifactory@1cdf04cd9ed1:/opt/jfrog/artifactory/app/bin$ cat /etc/hosts
127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2      1cdf04cd9ed1

Upvotes: 0

Views: 2631

Answers (1)

Prasanna Raghavendra
Prasanna Raghavendra

Reputation: 765

Thanks for your answers to my questions. Your postgres URL is going within artifactory container.

Please change url to jdbc:postgresql://postgres:5437/artifactory and try. Or add the both service with network_mode: host

Upvotes: 0

Related Questions