Strange if you don't change migrations! Can you re-create* your db and rod the test.
- php artisan migrate:refresh
I get this error when jobs fail, I have not modified the table or the migration. It's a fresh queue:failed-table table.
I don't understand what the problem is and I cannot find any results on this issue. The closest was someone modifing the ID column, which I have not.
If you need to see some code, let me know what I should post as I'm not sure, it's just the failed jobs that.. fails :P The why the job fails isn't a problem.
Laravel: 8.13.0 DB: sqlite Queue: database
Error:
[2021-01-22 08:49:20] local.ERROR: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: failed_jobs.uuid (SQL: insert into "failed_jobs" ("connection", "queue", "payload", "exception", "failed_at") values (database, default, {"uuid":"eb703fcd-e5f4-4c3e-aa5e-ee807a5ea685","displayName":"App
\Mail\ServiceMessageEmail","job":"Illuminate\Queue\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"backoff":"","timeout":null,"retryUntil":null,"data":{"commandName":"Illuminate\Mail\SendQueuedMailable","command":"O:34:\"Illuminate\Mail\SendQueuedMailable\":3:{s:8:\"mailable\";O:28:\"App\Mail\
\ServiceMessageEmail\":27:{s:17:\"\u0000*\u0000serviceMessage\";O:45:\"Illuminate\Contracts\Database\ModelIdentifier\":4:{s:5:\"class\";s:18:\"App\ServiceMessage\";s:2:\"id\";i:1;s:9:\"relations\";a:0:{}s:10:\"connection\";s:6:\"sqlite\";}s:6:\"locale\";N;s:4:\"from\";a:0:{}s:2:\"to\";a:1:{i:0;a:2:{s:4:\"name\";
N;s:7:\"address\";s:23:\"<my-email>\";}}s:2:\"cc\";a:0:{}s:3:\"bcc\";a:0:{}s:7:\"replyTo\";a:0:{}s:7:\"subject\";N;s:11:\"\u0000*\u0000markdown\";N;s:7:\"\u0000*\u0000html\";N;s:4:\"view\";N;s:8:\"textView\";N;s:8:\"viewData\";a:0:{}s:11:\"attachments\";a:0:{}s:14:\"rawAttachments\";a:0:{}s:15:\"diskAtt
achments\";a:0:{}s:9:\"callbacks\";a:0:{}s:5:\"theme\";N;s:6:\"mailer\";s:4:\"smtp\";s:10:\"connection\";N;s:5:\"queue\";N;s:15:\"chainConnection\";N;s:10:\"chainQueue\";N;s:19:\"chainCatchCallbacks\";N;s:5:\"delay\";N;s:10:\"middleware\";a:0:{}s:7:\"chained\";a:0:{}}s:5:\"tries\";N;s:7:\"timeout\";N;}"}}, Swift_Tra
nsportException: Connection could not be established with host <server> :stream_socket_client(): unable to connect to tcp://<server>:25 (Connection timed out) in /<project-path>/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:269
No need! I fixed it. I missed this in config/queue.php:
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), // I did not have this line before
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
I must have failed to notice it during the upgrade at some point and never hit the problem until now.
ref: https://github.com/laravel/laravel/blob/8.x/config/queue.php
Please or to participate in this conversation.