Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. felfert
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    felfert

    @felfert

    1
    Reputation
    37
    Posts
    3
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location Germany

    felfert Follow

    Best posts made by felfert

    • ProGet bug - Regression: RPM feed repodata broken since 25.0.8

      Hi,

      Just noticed after update to proget (docker) 25.0.8:

      In the gui, the version of a rpm package is displayed correctly:
      Screenshot 2025-08-20 at 09-39-47 cloudtools Versions.png

      But dnf (or yum) cannot find the package anymore. sudo dnf update should update the locally installed cloudtools, but instead the following is displayed:
      Screenshot_20250820_094822.png

      Notice the release number in the listing is cut off (dash remains) and when the actual download is attempted, both the dash and the number are missing.

      Suspect: PG-3074 (just a gut feeling 😏)

      Cheers,
      -Fritz

      posted in Support
      felfert
      felfert

    Latest posts made by felfert

    • RE: proget 500 Internal server error when pushing to a proget docker feed

      @atripp said in proget 500 Internal server error when pushing to a proget docker feed:

      we can also try to add something that allows you to patch via the UI as well!!

      Huh? Well, I don't think this would be such a good idea. I assume you guys already have some code in proget for upgrading your DB-Schema when a new version is required. That's where the function should be replaced. This script is only meant as a intermediate solution until you guys have updated the function.

      Cheers
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: ProGet bug - Regression: RPM feed repodata broken since 25.0.8

      @gdivis I just updated to 25.0.9 (aka 2025.9 Build 16), but unfortunately it still behaves the same.

      I digged a little deeper and found out, that the files below repodata/ are not updated at all anymore. I tried the following things:

      1. using the reindex link in the feed's "Storage and retention management page"
      INFO : 2025-08-30 17:43:00Z - Performing reindex for Rpm feed 13: cloudtools-rpm
      INFO : 2025-08-30 17:43:00Z - Deactivating feed.
      DEBUG: 2025-08-30 17:43:06Z - Checking for orphaned FeedPackages...
      DEBUG: 2025-08-30 17:43:06Z - No orphaned FeedPackages found.
      DEBUG: 2025-08-30 17:43:06Z - Recalculating latest versions of packages...
      DEBUG: 2025-08-30 17:43:06Z - Health check complete; recording results...
      INFO : 2025-08-30 17:43:06Z - Re-activating feed.
      
      1. Deleted the latest package of the feed an d then re-uploaded it.

      Here ist a listing of the feed's storage (mapped here to /var/data/proget/packages/.rpm/F13):

      ls -ltrR
      .:
      total 8
      drwxr-xr-x. 2 root root 4096 Aug 30 19:41 packages
      drwxr-xr-x. 2 root root 4096 Aug 30 19:44 repodata
      
      ./packages:
      total 309796
      -rw-r--r--. 1 root root 12490071 Jun 29  2024 cloudtools-2.5.233-1.noarch.rpm
      -rw-r--r--. 1 root root 12490704 Jun 29  2024 cloudtools-2.5.234-1.noarch.rpm
      -rw-r--r--. 1 root root 12495077 Jun 29  2024 cloudtools-2.5.236-1.noarch.rpm
      -rw-r--r--. 1 root root 12494704 Jun 29  2024 cloudtools-2.5.235-1.noarch.rpm
      -rw-r--r--. 1 root root 12495445 Jun 29  2024 cloudtools-2.5.237-1.noarch.rpm
      -rw-r--r--. 1 root root 12495891 Jun 29  2024 cloudtools-2.5.240-1.noarch.rpm
      -rw-r--r--. 1 root root 12691058 Jun 29  2024 cloudtools-2.5.241-1.noarch.rpm
      -rw-r--r--. 1 root root 12691053 Jun 29  2024 cloudtools-2.5.242-1.noarch.rpm
      -rw-r--r--. 1 root root 12691035 Jun 29  2024 cloudtools-2.5.243-1.noarch.rpm
      -rw-r--r--. 1 root root 12684216 Jul  5  2024 cloudtools-2.5.244-1.noarch.rpm
      -rw-r--r--. 1 root root 12684455 Jan 19  2025 cloudtools-2.5.246-1.noarch.rpm
      -rw-r--r--. 1 root root 12678409 Apr 12 10:42 cloudtools-2.5.249-1.noarch.rpm
      -rw-r--r--. 1 root root 12678450 May 20 14:30 cloudtools-2.5.250-1.noarch.rpm
      -rw-r--r--. 1 root root 12678452 May 20 14:48 cloudtools-2.5.251-1.noarch.rpm
      -rw-r--r--. 1 root root 12678743 May 27 05:56 cloudtools-2.5.252-1.noarch.rpm
      -rw-r--r--. 1 root root 12678824 May 27 10:01 cloudtools-2.5.253-1.noarch.rpm
      -rw-r--r--. 1 root root 12678806 May 29 08:45 cloudtools-2.5.254-1.noarch.rpm
      -rw-r--r--. 1 root root 12871348 Jun  1 22:59 cloudtools-2.6.255-1.noarch.rpm
      -rw-r--r--. 1 root root 12896455 Jun  2 08:36 cloudtools-2.6.256-1.noarch.rpm
      -rw-r--r--. 1 root root 12896459 Jun  2 11:39 cloudtools-2.6.257-1.noarch.rpm
      -rw-r--r--. 1 root root 12896469 Jun  2 11:41 cloudtools-2.6.258-1.noarch.rpm
      -rw-r--r--. 1 root root 12785737 Jun  2 15:22 cloudtools-2.6.262-1.noarch.rpm
      -rw-r--r--. 1 root root 12785736 Jun  6 09:55 cloudtools-2.6.263-1.noarch.rpm
      -rw-r--r--. 1 root root 12786981 Jun 11 17:24 cloudtools-2.6.265-1.noarch.rpm
      -rw-r--r--. 1 root root 12787141 Aug 30 19:41 cloudtools-2.6.267-1.noarch.rpm
      
      ./repodata:
      total 12
      -rw-r--r--. 1 root root 1468 Aug 20 09:02 2b01ecf5699ac41767bfacd995e22b274cfdb81920751989325f34678e402232-filelists.xml.gz
      -rw-r--r--. 1 root root 2846 Aug 20 09:02 dd5a0e1508733bde65393ae882018efb96c8af3433913ce07be20e08fad96fae-primary.xml.gz
      -rw-r--r--. 1 root root 1354 Aug 20 09:02 280d74eede038f8fede238c851204ad378e0373e473374541891b0937dbc99e9-other.xml.gz
      

      As you can see in this listing, the package cloudtools-2.6.267-1.noarch.rpm has a timestamp from today (because I just uploaded it), but the *.xml.gz files have not been touched since Aug 20.
      And it is those files which contain the actual index and all the info necessary for downloading/installing a package.

      If you want these files, I can provide them, but unfortunately this forum has no facility to attach files. (At least I can't find some)

      Later:
      I just noticed 2 errors in the Diagnostic Center from the time I deleted the cloudtools-2.6.267-1.noarch.rpm:

      An error occurred in the web application: cloudtools 2.6.267-1 not found.
      
      URL: http://proget.graudatastorage.intern/feeds/cloudtools-rpm/cloudtools/2.6.267-1
      Referrer: http://proget.graudatastorage.intern/feeds/cloudtools-rpm
      User: felfert
      User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
      Stack trace:    at Inedo.ProGet.WebApplication.Pages.Packages.PackagePageBase.CreateChildControlsAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E589193\Src\src\ProGet\WebApplication\Pages\Packages\PackagePageBase.cs:line 85
         at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E589193\Src\src\ProGet\WebApplication\Pages\ProGetSimplePage.cs:line 69
         at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync()
         at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context)
         at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)
      
      ::Web Error on 08/30/2025 19:39:13::
      
      An error occurred in the web application: cloudtools 2.6.267-1 not found.
      
      URL: http://proget.graudatastorage.intern/feeds/cloudtools-rpm/cloudtools/2.6.267-1
      Referrer: http://proget.graudatastorage.intern/feeds/cloudtools-rpm
      User: felfert
      User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
      Stack trace:    at Inedo.ProGet.WebApplication.Pages.Packages.PackagePageBase.CreateChildControlsAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E589193\Src\src\ProGet\WebApplication\Pages\Packages\PackagePageBase.cs:line 85
         at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E589193\Src\src\ProGet\WebApplication\Pages\ProGetSimplePage.cs:line 69
         at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync()
         at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context)
         at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)
      
      ::Web Error on 08/30/2025 19:39:00::
      

      Thanks
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      As announced above, I have created a little shell script for applying the fix for the bug discussed in this thread.

      Prerequisites:

      • ProGet >= 5.0.8 running in a docker container and already migrated to postgres DB
      • backup-directory mapped to /var/proget/backups in the proget container

      Usage:

      • Copy the script from below and save it in the backup-directory using a name that makes sense for you (e.g. fix-docker-push.sh)
      • Backup your database
      • On the docker host running the proget container, execute the following cmdline (obviously inserting your container's name here and supplying the correct script-filename)
      docker exec -it InsertYourContainersNameHere /bin/bash /var/proget/backups/fix-docker-push.sh
      
      • The script will abort, if it cannot find the connection string of the postgres DB
      • The script will abort, if it detects, that the fix has already applied
      • Otherwise it will show a final warning and will abort, if you do not enter YES (all capitals)
      • If you enter YES, it will apply the fix and psql will print CREATE FUNCTION

      Here is the script:

      #! /bin/bash
      
      sqlconn=/var/proget/database/.pgsqlconn
      if [ -f "${sqlconn}" ] ; then
          . ${sqlconn}
          PGPASSWORD="${Password}" psql -h ${Host} -p ${Port} -U ${Username} ${Database} <<-"EOF" |
      		\sf "DockerBlobs_CreateOrUpdateBlob"
      EOF
      	grep -q "FOR UPDATE;"
          if [ $? = 0 ] ; then
              echo "It looks like the fix was already applied. Aborting"
              exit 0
          fi
          cat<<-EOF
              This script applies a fix for pushing images to a proget docker feed.
      
              WARNING: This modifies your proget postgres database. BACKUP YOUR DATABASE FIRST.
      
              Enter YES if you want to continue or hit Ctrl-C to abort.
      EOF
          read resp; if [ "${resp}" != "YES" ] ; then
              echo "Aborting"
              exit 0
          fi
          PGPASSWORD="${Password}" psql -h ${Host} -p ${Port} -U ${Username} ${Database} <<-"EOF"
      	    CREATE OR REPLACE FUNCTION "DockerBlobs_CreateOrUpdateBlob"
      	    (
      	        "@Feed_Id" INT,
      	        "@Blob_Digest" VARCHAR(128),
      	        "@Blob_Size" BIGINT,
      	        "@MediaType_Name" VARCHAR(255) = NULL,
      	        "@Cached_Indicator" BOOLEAN = NULL,
      	        "@Download_Count" INT = NULL,
      	        "@DockerBlob_Id" INT = NULL
      	    )
      	    RETURNS INT
      	    LANGUAGE plpgsql
      	    AS $$
      	    BEGIN
      	    
      	        SELECT "DockerBlob_Id"
      	        INTO "@DockerBlob_Id"
      	        FROM "DockerBlobs"
      	        WHERE ("Feed_Id" = "@Feed_Id" OR ("Feed_Id" IS NULL AND "@Feed_Id" IS NULL))
      	        AND "Blob_Digest" = "@Blob_Digest"
      	    FOR UPDATE;
      	    
      	        WITH updated AS
      	        (
      	            UPDATE "DockerBlobs"
      	            SET "Blob_Size" = "@Blob_Size",
      	                "MediaType_Name" = COALESCE("@MediaType_Name", "MediaType_Name"),
      	                "Cached_Indicator" = COALESCE("@Cached_Indicator", "Cached_Indicator")
      	            WHERE ("Feed_Id" = "@Feed_Id" OR ("Feed_Id" IS NULL AND "@Feed_Id" IS NULL)) 
      	            AND "Blob_Digest" = "@Blob_Digest"
      	            RETURNING *
      	        )        
      	        INSERT INTO "DockerBlobs"
      	        (
      	            "Feed_Id",
      	            "Blob_Digest",
      	            "Download_Count",
      	            "Blob_Size",
      	            "MediaType_Name",
      	            "Cached_Indicator"
      	        )
      	        SELECT
      	            "@Feed_Id",
      	            "@Blob_Digest",
      	            COALESCE("@Download_Count", 0),
      	            "@Blob_Size",
      	            "@MediaType_Name",
      	            COALESCE("@Cached_Indicator", 'N')
      	        WHERE NOT EXISTS (SELECT * FROM updated)
      	        RETURNING "DockerBlob_Id" INTO "@DockerBlob_Id";
      	    
      	        SELECT "DockerBlob_Id"
      	        INTO "@DockerBlob_Id"
      	        FROM "DockerBlobs"
      	        WHERE ("Feed_Id" = "@Feed_Id" OR ("Feed_Id" IS NULL AND "@Feed_Id" IS NULL))
      	        AND "Blob_Digest" = "@Blob_Digest";
      	    
      	        RETURN "@DockerBlob_Id";
      	    
      	    END $$;
      EOF
      else
          echo "Postgres connection parameters (${sqlconn}) not found. Aborting"
      fi
      

      Disclaimer
      I am NOT an inedo engineer and not affiliated with them.
      You are responsible to backup you database before running this script.
      You run this script at your own risk.
      I take no responsibility whatsoever for any damages that might occur.

      Have fun
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      @atripp said in proget 500 Internal server error when pushing to a proget docker feed:

      The only thing I can imagine happening is that the PUT is happening immediately after the PATCH finishes, but before the client receives a 200 response.

      Just to confirm your assumption: Thats exactly what is happening as one can see in my first wireshark stream analysis of this above.

      you can patch the stored procedure (painfully) as a workaround for now.

      I'm writing a small shell (bash) script, that can be invoked inside the proget container in order to easily apply the fix. I will post this here later. Stay tuned.

      Cheers
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      @pariv_0352 said in proget 500 Internal server error when pushing to a proget docker feed:

      Then I tried 25.0.9-ci.14, same result.

      I don't think the newer builds contain any fix for this yet. I was able to fix it myself locally in the postgres DB with guidance by @atripp, however she most likely did not see my success report yet, otherwise she very likely would have acknowledged it here.
      The newer builds > 25.0.9-ci.7 are probably other developers working on different things.

      And yes, the - 500 1091 part in your error message looks suspiciously like mine (before I fixed it locally).

      So: Just wait, until @atripp confirms here, that she has actually applied that fix.

      Cheers
      -Fritz

      posted in Support
      felfert
      felfert
    • proget - Enhancement request: show value of X-Forwarded-For header

      Hi guys,

      If running proget behind a reverse-proxy (or a load-balancer), currently the IP address of that reverse-proxy is shown if some client-related error (or exception) happens.
      I had some cases where a client (apt) in the local net was misconfigured and sent requests to obsolete feeds. In order to figure out which client was the culprit, I had to correlate log timestamps from proget and the reverse-proxy.

      Therefore:

      It would be very useful, to use the value of the X-Forwarded-For http header (if it exists) when generating Warnings or Exceptions in the logs. So the actual IP-Address of the client causing an error would be shown instead of the proxy address. This also should be configurable to happen only, if the remote address (or perhaps a subnet in case of load balancers) is a proxy known to the administrator in order to prevent spoofing by malicious users.

      At least apache and caddy set this header by default, if running in reverse proxy mode. Nginx can do that with a single line in the config which is well documented: proxy_set_header X-Forwarded-For $remote_addr;

      What do you think?

      Cheers
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      @atripp Ok this is definitively working now. Pushed approx. 20 different images from 80MiB up to 2GiB. None of them produced an error anymore.

      Excellent Support!!!

      Thanks alot
      -Fritz

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      Going to push some more images to be on the safe side ...

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      @atripp
      If you don't mind trying one other patch, where we select out the Blob_Id again in the end.

      Yippieh - That one did the Trick. Error is gone 👍

      There is a semicolon missing after the additional selct before the return

      posted in Support
      felfert
      felfert
    • RE: proget 500 Internal server error when pushing to a proget docker feed

      BTW:
      Did you guys generate a different password for the postgres DB than for MSQL
      during migration?

      I'm asking, because i vaguely remember that i could access the postgres DB using the same password (taken from the mssql connection-string environment var).

      Now, this didn't work anymore and I had to disable password-auth in pg_hba.conf in order to use pg_dump and psql inside the proget container.

      Thanks
      -Fritz

      posted in Support
      felfert
      felfert