【问题标题】:Trying to run docker container, getting error "api_db_1 exited with code 255"尝试运行 docker 容器,出现错误“api_db_1 exited with code 255”
【发布时间】:2018-05-15 17:06:56
【问题描述】:

我正在尝试运行 docker 容器,但遇到了这个问题。有人可以帮帮我吗?

compose.parallel.feed_queue: Pending: set()
Attaching to api_db_1
compose.cli.verbose_proxy.proxy_callable: docker events <- (filters={'label': ['com.docker.compose.project=api', 'com.docker.compose.oneoff=False
']}, decode=True)
urllib3.connectionpool._make_request: https://192.168.99.100:2376 "GET /v1.25/events?filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3
Dapi%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker events -> <generator object APIClient._stream_helper at 0x0000000003955E08>
db_1                 | New password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word
db_1                 | Retype new password: Changing password for user db2inst1.
db_1                 | passwd: all authentication tokens updated successfully.
db_1                 | Setting password for DB2INST1 as: password
db_1                 | SQL1063N  DB2START processing was successful.
db_1                 |
db_1                 |   Creating database "SAMPLE"...
db_1                 |   Existing "SAMPLE" database found...
db_1                 |     The "-force" option was not specified...
db_1                 |   Attempt to create the database "SAMPLE" failed.
db_1                 |   SQL1005N  The database alias "SAMPLE" already exists in either the local
db_1                 | database directory or system database directory.
db_1                 |
db_1                 |
db_1                 |   'db2sampl' processing complete.
compose.cli.verbose_proxy.proxy_callable: docker wait <- ('ef1ac83ba9ef351e2cb2144789071c53d5ea865804f048d3bf3e0030cfe5a848')
urllib3.connectionpool._new_conn: Starting new HTTPS connection (3): 192.168.99.100db_1                 |

compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('ef1ac83ba9ef351e2cb2144789071c53d5ea865804f048d3bf3e0030cfe5a848')
urllib3.connectionpool._new_conn: Starting new HTTPS connection (4): 192.168.99.100
urllib3.connectionpool._make_request: https://192.168.99.100:2376 "POST /v1.25/containers/ef1ac83ba9ef351e2cb2144789071c53d5ea865804f048d3bf3e003
0cfe5a848/wait HTTP/1.1" 200 32
urllib3.connectionpool._make_request: https://192.168.99.100:2376 "GET /v1.25/containers/ef1ac83ba9ef351e2cb2144789071c53d5ea865804f048d3bf3e0030
cfe5a848/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker wait -> {'Error': None, 'StatusCode': 255}
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {'AppArmorProfile': '',
 'Args': ['start-0.3'],
 'Config': {'ArgsEscaped': True,
            'AttachStderr': False,
            'AttachStdin': False,
            'AttachStdout': False,
            'Cmd': ['start-0.3'],
            'Domainname': '',
            'Entrypoint': ['/entrypoint.sh'],
            'Env': ['PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'],
...
api_db_1 exited with code 255

【问题讨论】:

  • 您好,请将您的问题调整为mcve,特别是请提供docker-compose文件,因为里面可能有问题。另一件事是错误跟踪,请将其作为代码 sn-p 复制并粘贴到此处,而不是照片链接,因为此链接将随着时间的推移而过期 - 而不是迟早。

标签: docker db2 docker-compose containers


【解决方案1】:

操作失败,因为示例数据库已存在于 Db2 实例中。

您的选择包括

  • 使用db2sampl -force 选项将删除并重新创建任何 现有样本数据库

  • 在创建 Db2 实例后不要运行 db2sampl(即安排 对于空的 Db2 实例)。

  • 有条件地删除示例数据库(即如果存在则删除) 在执行您的操作之前。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-03
    • 2018-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-28
    • 2019-12-04
    • 1970-01-01
    相关资源
    最近更新 更多