I can access the repository only when i run "aptly serve"

747 views
Skip to first unread message

NiteSupport

unread,
Apr 3, 2017, 9:32:11 AM4/3/17
to aptly-discuss

Hello,


I have just finished the installation of APTLY, and the publish command show this message:


Snapshot debian-jessie-main has been successfully published.

Please setup your webserver to serve directory '/mirrors/jessie/.aptly/public' with autoindexing.

Now you can add following line to apt sources:

  deb http://your-server/ jessie main

Don't forget to add your GPG key to apt with apt-key.

 

You can also use `aptly serve` to publish your repositories over HTTP quickly.

 

All seems to be OK, and for now I don’t care about the keys.

 

I first tried to connect without the aptly serve command.

In the web server under /etc/apache2/apache2.conf

I added

<Directory /mirrors/jessie/.aptly/public/>

                Options Indexes FollowSymLinks

                AllowOverride None

                Require all granted

</Directory>


 

And when I do

apt-get update from another Debian machine with

deb http://10.0.200.200/ jessie main

as repository, I receive this message:

 

root@debian-aptly-client:~# apt-get update

Ign http://10.0.200.200 jessie InRelease

Ign http://10.0.200.200 jessie Release.gpg

Ign http://10.0.200.200 jessie Release

Err http://10.0.200.200 jessie/main amd64 Packages  404  Not Found

Ign http://10.0.200.200 jessie/main Translation-en_US

Ign http://10.0.200.200 jessie/main Translation-en

W: Failed to fetch http://10.0.200.200/dists/jessie/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

root@debian-aptly-client:~#

 

And if I try to install something (VLC for the example)

I receive this error:


root@debian-aptly-client:~# apt-get install vlc

Reading package lists... Done

Building dependency tree      

Reading state information... Done

Package vlc is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

vlc-nox

 

E: Package 'vlc' has no installation candidate

root@debian-aptly-client:~#

 

 

But,

when I run this command: aptly serve

With this repository in the client

deb http://10.0.200.200:8080/ jessie main

(From the same “debian client of course”)

It works


root@debian-aptly-client:~# apt-get update

Get:1 http://10.0.200.200:8080 jessie InRelease [1,715 B]

Ign http://10.0.200.200:8080 jessie InRelease

Ign http://10.0.200.200:8080 jessie/main amd64 Packages/DiffIndex

Hit http://10.0.200.200:8080 jessie/main amd64 Packages

Ign http://10.0.200.200:8080 jessie/main Translation-en_US

Ign http://10.0.200.200:8080 jessie/main Translation-en

Fetched 1,715 B in 0s (2,493 B/s)

Reading package lists... Done

W: GPG error: http://10.0.200.200:8080 jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FF327B8C4979A90E


Apparently no problem with the amd64 packages

And the VLC install works


root@debian-aptly-client:~# apt-get install vlc

Reading package lists... Done

Building dependency tree      

Reading state information... Done

Suggested packages:

  videolan-doc

The following NEW packages will be installed:

  vlc

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 0 B/1,501 kB of archives.

After this operation, 4,787 kB of additional disk space will be used.

WARNING: The following packages cannot be authenticated!

  vlc

Install these packages without verification? [y/N]


(I've answered "yes" and VLC was installed)


Any idea?

Thanks a lot


Frederic Van Espen

unread,
Apr 3, 2017, 9:58:25 AM4/3/17
to NiteSupport, aptly-discuss
Hi,

It looks like your apache configuration is incorrect. If you just open http://10.0.200.200/ in your browser, does it display the indexes?

Cheers,

Frederic

--
You received this message because you are subscribed to the Google Groups "aptly-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aptly-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shmuel Touitou

unread,
Apr 4, 2017, 1:53:16 AM4/4/17
to Frederic Van Espen, aptly-discuss
Hello,

If I open this address http://10.0.200.200/
I get the default Apache page

cdgg...@gmail.com

unread,
Apr 4, 2017, 11:07:18 AM4/4/17
to aptly-discuss, frede...@gmail.com
I agree with Frederic, this looks like a problem with the apache configuration.

Also from the browser, what do you get if you try http://10.0.200.200/dists/?

For example, I have my aptly server is running on Xenial and Im also running apache.

I normally first tail apache logs like this and then run the apt update on the client and this is what I get logged on the logs:

# tail -f /var/log/apache2/*.log

...
==> /var/log/apache2/access.log <==
172.19.35.83 - - [04/Apr/2017:15:00:55 +0000] "GET /ubuntu/prod/dists/xenial/InRelease HTTP/1.1" 304 126 "-" "Debian APT-HTTP/1.3 (1.2.19)"
172.19.35.83 - - [04/Apr/2017:15:00:55 +0000] "GET /ubuntu/prod/dists/xenial-updates/InRelease HTTP/1.1" 304 126 "-" "Debian APT-HTTP/1.3 (1.2.19)"
172.19.35.83 - - [04/Apr/2017:15:00:55 +0000] "GET /ubuntu/prod/dists/xenial-security/InRelease HTTP/1.1" 304 126 "-" "Debian APT-HTTP/1.3 (1.2.19)"
...

Regards,
Carlos

cdgg...@gmail.com

unread,
Apr 4, 2017, 11:07:26 AM4/4/17
to aptly-discuss, frede...@gmail.com

Shmuel Touitou

unread,
Apr 5, 2017, 6:06:12 AM4/5/17
to cdgg...@gmail.com, aptly-discuss, Frederic Van Espen
Hello,

Indeed it was an Apache configuration problem.
I had to link the repository path to the DocumentRoot.

I had an Alias in /etc/apache2/apache2.conf
Alias "/dists" "/mirrors/jessie/.aptly/public/dists"

And now it works
Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "aptly-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aptly-discuss/-CO20NlEvms/unsubscribe.
To unsubscribe from this group and all its topics, send an email to aptly-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages