Closed mandraid closed 1 year ago
Hello
So the mount point has to be - /shared:/shared
I'm not sure why this was closed. It was never confirmed to fix the issue, as is the case.
Your volume mount is wrong and the error you are getting is expected given your setup.
If you updated it to /shared:/shared and get the same issue, please post update details after reading through the docs on the feature again.
Here's the error message I am receiving:
`Error asset: {
file: '/shared/20160424_131545905.jpg',
reason: Error: Request failed with status code 400
at createError (/usr/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
maxRedirects: 0,
url: 'http://192.168.1.130:2283/api/asset/import',
data: '{"deviceAssetId":"20160424_131545905.jpg-995328","deviceId":"426749e253ef44b3b72ac1cfb71f1824","assetType":"IMAGE","fileCreatedAt":"2016-04-24T17:15:46.000Z","fileModifiedAt":"2016-04-24T17:15:46.000Z","isFavorite":"false","fileExtension":".jpg","duration":"0:00:00.000000","isReadOnly":"true","assetPath":"/shared/20160424_131545905.jpg"}'
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 339,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'POST /api/asset/import HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/json\r\n' +
'x-api-key:
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 400,
statusText: 'Bad Request',
headers: [Object],
config: [Object],
request: [ClientRequest],
data: [Object]
},
isAxiosError: true,
toJSON: [Function: toJSON]
}, response: { statusCode: 400, message: 'File does not exist', error: 'Bad Request' } ` I've confirmed there are images in the /shared directory on the host.
Please send your updated docker-compose file.
version: "3.8"
services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-server.sh"] volumes:
typesense restart: always
immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-microservices.sh"] volumes:
typesense restart: always
immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes:
.env restart: always
immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file:
.env restart: always
typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 environment:
tsdata:/data restart: always
redis: container_name: immich_redis image: redis:6.2 restart: always
database: container_name: immich_postgres image: postgres:14 env_file:
pgdata:/var/lib/postgresql/data restart: always
immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment:
volumes: pgdata: model-cache: tsdata:
Can you post the output of ls -l /shared/20160424_131545905.jpg
run from inside the immich-server container?
It doesn't look like the shared directory is getting created there.
That sounds like a problem with your volume mount not working. Or you haven't successfully applied the configuration to the running stack after changing the docker-compose file.
I used the immich cli tool as mentioned. Also, the /shared drive is populating. I am not sure where else to look.
Is /shared correctly showing in the container?
It is not.
This is not an immich problem and I'm not sure how to help you without more details about your underlying system. A docker volume not mounting more than likely implies a misconfiguration or an unsupported filesystem type. Is there something different about this mount than your upload location one?
The underlying FS is RAID10, and mounted as read-only to the host machine.
It's now working. After updating the docker compose file, I had to re-issue the docker compose up -d command.
I'm having this issue as well. i made sure mount paths are exactly the same and confirmed that files are appearing inside both server and microservices containers with proper permissions. Tried with both CLI docker and the embedded version inside the microservice and server containers. It sucessfully detects all the files but then generates the 400 error for each one of them.
Edit: Also made sure to properly set the external path in Immich settings for my account
The bug
I am following the instructions here: https://immich.app/docs/features/read-only-gallery. This is the output I get: Error asset: { file: '/shared/20160424_131540065.jpg', reason: Error: Request failed with status code 400 at createError (/usr/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: Infinity, maxBodyLength: Infinity, validateStatus: [Function: validateStatus], headers: [Object], method: 'post', maxRedirects: 0, url: 'http://192.168.1.130:2283/api/asset/import', data: '{"deviceAssetId":"20160424_131540065.jpg-1099257","deviceId":"426749e253ef44b3b72ac1cfb71f1824","assetType":"IMAGE","fileCreatedAt":"2016-04-24T17:15:40.000Z","fileModifiedAt":"2016-04-24T17:15:40.000Z","isFavorite":"false","fileExtension":".jpg","duration":"0:00:00.000000","isReadOnly":"true","assetPath":"/shared/20160424_131540065.jpg"}' }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 340, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [Socket], _header: 'POST /api/asset/import HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Content-Type: application/json\r\n' + 'x-api-key:\r\n' +
'User-Agent: axios/0.26.1\r\n' +
'Content-Length: 340\r\n' +
'Host: 192.168.1.130:2283\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/asset/import',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.130',
protocol: 'http:',
}, response: { statusCode: 400, message: 'File does not exist', error: 'Bad Request' } }
The OS that Immich Server is running on
Ubuntu 22.04
Version of Immich Server
1.64.0
Version of Immich Mobile App
1.64.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response