You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Artifactory安装后配置异常:500错误与Router注册失败求助

Solution for Artifactory 500 Error & Access Service Registration Failure

Root Cause

The 500 error (Cannot invoke "org.artifactory.opentracing.ArtifactoryTracer.startSpanOnCurrentThread(...) because "this.artifactoryTracer" is null) is a downstream issue caused by the Access (jfac) service failing to register with the Artifactory Router on localhost:8046. Without successful registration, critical components like the tracer aren't initialized properly.

Step-by-Step Fixes

1. Confirm Router Service is Running & Listening on Port 8046

  • Check if the Artifactory Router service is active:
    systemctl status artifactory-router  # For systemd-based systems
    # Or for non-systemd environments:
    service artifactory-router status
    
  • Verify port 8046 is being used by the router process:
    netstat -tulpn | grep 8046
    # Alternative with ss:
    ss -tulpn | grep 8046
    
    If the port isn't listening, start the router service:
    systemctl start artifactory-router
    

2. Fix Network Connectivity Between Access Service & Router

  • Ensure local firewall rules aren't blocking loopback traffic on port 8046:
    # Check iptables rules
    iptables -L INPUT -n | grep 8046
    # Allow loopback access if blocked:
    iptables -A INPUT -i lo -p tcp --dport 8046 -j ACCEPT
    
  • For firewalld users:
    firewall-cmd --add-port=8046/tcp --zone=trusted --permanent
    firewall-cmd --reload
    
  • Test connectivity from the host to localhost:8046:
    telnet localhost 8046
    # Or using netcat:
    nc -zv localhost 8046
    

3. Validate Artifactory Configuration Files

  • Edit the Access service config ($ARTIFACTORY_HOME/etc/access/access.properties):
    Ensure the router endpoint points to the correct address (adjust if not using localhost):
    router.url=http://localhost:8046/router/api/v1/system
    
  • Check the Router config ($ARTIFACTORY_HOME/etc/router/router.properties):
    Confirm the router binds to all interfaces (not just a specific IP):
    router.bind.port=8046
    router.bind.host=0.0.0.0
    
    Restart the router service after making changes.

4. Free Up Port 8046 if Occupied by Another Process

  • Identify the process using port 8046:
    lsof -i :8046
    
  • Kill the conflicting process (replace <PID> with the process ID):
    kill -9 <PID>
    
    Alternatively, change the router's port in router.properties and restart the service.

5. Restart Services in Correct Order

After resolving connectivity/config issues, restart services in this sequence to ensure proper initialization:

  1. Stop all Artifactory services:
    systemctl stop artifactory-access artifactory-artifactory artifactory-router
    
  2. Start the Router first:
    systemctl start artifactory-router
    
  3. Wait 1-2 minutes for the router to fully initialize, then start the Access service:
    systemctl start artifactory-access
    
  4. Finally, start the main Artifactory service:
    systemctl start artifactory-artifactory
    

6. Verify Fixes

  • Check Artifactory logs ($ARTIFACTORY_HOME/logs/artifactory.log) for lines confirming the tracer initialized successfully:

    ArtifactoryTracer initialized successfully

  • Access the Artifactory UI again to confirm the 500 error is resolved.

Additional Checks

  • Ensure all Artifactory services run under the same user with proper permissions to access configuration files.
  • Review recent changes to Artifactory config or system network settings that might have triggered the issue.

内容的提问来源于stack exchange,提问作者dinesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 18:46:14