Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Snipe-IT
  3. env variables missing in cron job

env variables missing in cron job

Scheduled Pinned Locked Moved Snipe-IT
3 Posts 2 Posters 48 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    G
    Günter
    wrote last edited by
    #1

    Hello!

    We've migrated our Snipe-IT installation to Cloudron. Everything seems to work fine, but following stack trace keeps coming into the laravel.log.
    It seems like the cron job does not resolve the environment variables from the /app/data/env file.
    Since we migrated Snipe-IT from another host (DB Dump + uploads directory + some settings in /app/data/env), I'm not sure if we broke something, or if this something happening to others too.
    Have you seen this issue elsewhere already?

    [2026-09-12 20:46:00] production.ERROR: PDOException: PDO::connect(): php_network_getaddresses: getaddrinfo for ${CLOUDRON_MYSQL_HOST} failed: Name or service not known in /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67
    Stack trace:
    #0 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(67): PDO::connect()
    #1 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(85): Illuminate\Database\Connectors\Connector->createPdoConnection()
    #2 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection()
    #3 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection()
    #4 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(186): Illuminate\Database\Connectors\MySqlConnector->connect()
    #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->{closure:Illuminate\Database\Connectors\ConnectionFactory::createPdoResolverWithHosts():181}()
    #6 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1257): call_user_func()
    #7 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(605): Illuminate\Database\Connection->getPdo()
    #8 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(827): Illuminate\Database\Connection->{closure:Illuminate\Database\Connection::affectingStatement():597}()
    #9 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(999): Illuminate\Database\Connection->runQueryCallback()
    #10 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(978): Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
    #11 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(796): Illuminate\Database\Connection->handleQueryException()
    #12 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(597): Illuminate\Database\Connection->run()
    #13 /app/code/vendor/laravel/framework/src/Illuminate/Database/Connection.php(561): Illuminate\Database\Connection->affectingStatement()
    #14 /app/code/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(4426): Illuminate\Database\Connection->delete()
    #15 /app/code/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php(155): Illuminate\Database\Query\Builder->delete()
    #16 /app/code/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php(32): Illuminate\Auth\Passwords\DatabaseTokenRepository->deleteExpired()
    #17 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Auth\Console\ClearResetsCommand->handle()
    #18 /app/code/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
    #19 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
    #20 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
    #21 /app/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(799): Illuminate\Container\BoundMethod::call()
    #22 /app/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
    #23 /app/code/vendor/symfony/console/Command/Command.php(341): Illuminate\Console\Command->execute()
    #24 /app/code/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
    #25 /app/code/vendor/symfony/console/Application.php(1117): Illuminate\Console\Command->run()
    #26 /app/code/vendor/symfony/console/Application.php(356): Symfony\Component\Console\Application->doRunCommand()
    #27 /app/code/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun()
    #28 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\Component\Console\Application->run()
    #29 /app/code/artisan(33): Illuminate\Foundation\Console\Kernel->handle()
    #30 {main}
    
    
    1 Reply Last reply
    1
    • G
      G
      Günter
      wrote last edited by Günter
      #2

      I've now checked on a fresh install what the laravel.log will look like. Yesterday - after writing this post - i created a new and fresh Snipe-IT instance on my server. I've not made any changes or edits on that instance what so ever. Today I downloaded the laravel.log and it has the same errors as my original laravel.log.
      I'm not allowed to upload the log file (no permissions to do so in this forum). So I pasted a shortened version in a public pastebin (will be removed in 1 month): https://pastes.io/k3q2pkIG

      1 Reply Last reply
      1
      • jamesJ
        jamesJ
        james
        Staff
        wrote last edited by
        #3

        Hello @günter
        In the future you can use https://paste.cloudron.io/
        Thanks for reporting this issue, we will have to look into it.

        1 Reply Last reply
        1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search