试图运行docker容器,得到错误" api_db_1退出代码255"

时间:2018-05-15 17:06:56

标签: docker db2 docker-compose containers

我正在尝试运行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

1 个答案:

答案 0 :(得分:0)

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

您的选择包括

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

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

  • 有条件地删除示例数据库(即如果存在则丢弃) 在开始行动之前。